Merge commit 'faca7c1efd28507258d47831423e88265a86773d' into HEAD
diff --git a/common/m2/repository/com/google/protobuf/protobuf-java/2.5.0/NOTICE b/common/m2/repository/com/google/protobuf/protobuf-java/2.5.0/NOTICE
new file mode 100644
index 0000000..f028c82
--- /dev/null
+++ b/common/m2/repository/com/google/protobuf/protobuf-java/2.5.0/NOTICE
@@ -0,0 +1,42 @@
+This license applies to all parts of Protocol Buffers except the following:
+
+ - Atomicops support for generic gcc, located in
+ src/google/protobuf/stubs/atomicops_internals_generic_gcc.h.
+ This file is copyrighted by Red Hat Inc.
+
+ - Atomicops support for AIX/POWER, located in
+ src/google/protobuf/stubs/atomicops_internals_power.h.
+ This file is copyrighted by Bloomberg Finance LP.
+
+Copyright 2014, Google Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Code generated by the Protocol Buffer compiler is owned by the owner
+of the input file used when generating it. This code is not
+standalone and requires a support library to be linked with it. This
+support library is itself covered by the above license.
diff --git a/common/m2/repository/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar b/common/m2/repository/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar
new file mode 100644
index 0000000..4c4e686
--- /dev/null
+++ b/common/m2/repository/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar
Binary files differ
diff --git a/common/m2/repository/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom b/common/m2/repository/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom
new file mode 100644
index 0000000..d468c5f
--- /dev/null
+++ b/common/m2/repository/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>com.google</groupId>
+ <artifactId>google</artifactId>
+ <version>1</version>
+ </parent>
+ <groupId>com.google.protobuf</groupId>
+ <artifactId>protobuf-java</artifactId>
+ <version>2.5.0</version>
+ <packaging>bundle</packaging>
+ <name>Protocol Buffer Java API</name>
+ <description>
+ Protocol Buffers are a way of encoding structured data in an efficient yet
+ extensible format.
+ </description>
+ <inceptionYear>2008</inceptionYear>
+ <url>http://code.google.com/p/protobuf</url>
+ <licenses>
+ <license>
+ <name>New BSD license</name>
+ <url>http://www.opensource.org/licenses/bsd-license.php</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <scm>
+ <url>http://code.google.com/p/protobuf/source/browse</url>
+ <connection>
+ scm:svn:http://protobuf.googlecode.com/svn/trunk/
+ </connection>
+ </scm>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.4</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymock</artifactId>
+ <version>2.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymockclassextension</artifactId>
+ <version>2.2.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/*Test.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-sources</id>
+ <phase>generate-sources</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="target/generated-sources" />
+ <exec executable="../src/protoc">
+ <arg value="--java_out=target/generated-sources" />
+ <arg value="--proto_path=../src" />
+ <arg value="../src/google/protobuf/descriptor.proto" />
+ </exec>
+ </tasks>
+ <sourceRoot>target/generated-sources</sourceRoot>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>generate-test-sources</id>
+ <phase>generate-test-sources</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="target/generated-test-sources" />
+ <exec executable="../src/protoc">
+ <arg value="--java_out=target/generated-test-sources" />
+ <arg value="--proto_path=../src" />
+ <arg value="--proto_path=src/test/java" />
+ <arg value="../src/google/protobuf/unittest.proto" />
+ <arg value="../src/google/protobuf/unittest_import.proto" />
+ <arg value="../src/google/protobuf/unittest_import_public.proto" />
+ <arg value="../src/google/protobuf/unittest_mset.proto" />
+ <arg
+ value="src/test/java/com/google/protobuf/multiple_files_test.proto" />
+ <arg value="src/test/java/com/google/protobuf/nested_builders_test.proto" />
+ <arg value="src/test/java/com/google/protobuf/nested_extension.proto" />
+ <arg value="src/test/java/com/google/protobuf/nested_extension_lite.proto" />
+ <arg value="src/test/java/com/google/protobuf/non_nested_extension.proto" />
+ <arg value="src/test/java/com/google/protobuf/non_nested_extension_lite.proto" />
+ <arg value="src/test/java/com/google/protobuf/test_bad_identifiers.proto" />
+ <arg
+ value="../src/google/protobuf/unittest_optimize_for.proto" />
+ <arg
+ value="../src/google/protobuf/unittest_custom_options.proto" />
+ <arg value="../src/google/protobuf/unittest_lite.proto" />
+ <arg value="../src/google/protobuf/unittest_import_lite.proto" />
+ <arg value="../src/google/protobuf/unittest_import_public_lite.proto" />
+ <arg value="../src/google/protobuf/unittest_lite_imports_nonlite.proto" />
+ <arg value="../src/google/protobuf/unittest_enormous_descriptor.proto" />
+ <arg value="../src/google/protobuf/unittest_no_generic_services.proto" />
+ </exec>
+ </tasks>
+ <testSourceRoot>target/generated-test-sources</testSourceRoot>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-DocURL>http://code.google.com/p/protobuf</Bundle-DocURL>
+ <Bundle-SymbolicName>com.google.protobuf</Bundle-SymbolicName>
+ <Export-Package>com.google.protobuf;version=2.5.0</Export-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>lite</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/AbstractMessageLite.java</include>
+ <include>**/ByteString.java</include>
+ <include>**/CodedInputStream.java</include>
+ <include>**/CodedOutputStream.java</include>
+ <include>**/ExtensionRegistryLite.java</include>
+ <include>**/FieldSet.java</include>
+ <include>**/GeneratedMessageLite.java</include>
+ <include>**/Internal.java</include>
+ <include>**/InvalidProtocolBufferException.java</include>
+ <include>**/LazyStringArrayList.java</include>
+ <include>**/LazyStringList.java</include>
+ <include>**/MessageLite.java</include>
+ <include>**/MessageLiteOrBuilder.java</include>
+ <include>**/SmallSortedMap.java</include>
+ <include>**/UninitializedMessageException.java</include>
+ <include>**/UnmodifiableLazyStringList.java</include>
+ <include>**/WireFormat.java</include>
+ <include>**/Parser.java</include>
+ <include>**/AbstractParser.java</include>
+ <include>**/BoundedByteString.java</include>
+ <include>**/LiteralByteString.java</include>
+ <include>**/RopeByteString.java</include>
+ <include>**/Utf8.java</include>
+ <include>**/LazyField.java</include>
+ </includes>
+ <testIncludes>
+ <testInclude>**/LiteTest.java</testInclude>
+ <testInclude>**/*Lite.java</testInclude>
+ </testIncludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/LiteTest.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <classifier>lite</classifier>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
diff --git a/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14-sources.jar b/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14-sources.jar
new file mode 100644
index 0000000..9d4c817
--- /dev/null
+++ b/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14-sources.jar
Binary files differ
diff --git a/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14-sources.jar.md5 b/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14-sources.jar.md5
new file mode 100644
index 0000000..6dbbd48
--- /dev/null
+++ b/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14-sources.jar.md5
@@ -0,0 +1 @@
+e69b31c93b67d6faef0466b6d50f9c7b
\ No newline at end of file
diff --git a/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14-sources.jar.sha1 b/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14-sources.jar.sha1
new file mode 100644
index 0000000..cbfda6d
--- /dev/null
+++ b/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14-sources.jar.sha1
@@ -0,0 +1 @@
+020639ae33c5ddd41bde77a7a379f8d20d6e6475
\ No newline at end of file
diff --git a/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14.jar b/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14.jar
new file mode 100644
index 0000000..a73aec4
--- /dev/null
+++ b/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14.jar
Binary files differ
diff --git a/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14.jar.md5 b/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14.jar.md5
new file mode 100644
index 0000000..d5c54f4
--- /dev/null
+++ b/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14.jar.md5
@@ -0,0 +1 @@
+61cbf085da79ba728e4eedeb400c173e
\ No newline at end of file
diff --git a/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14.jar.sha1 b/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14.jar.sha1
new file mode 100644
index 0000000..6e40fc9
--- /dev/null
+++ b/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14.jar.sha1
@@ -0,0 +1 @@
+46c48ac69e3483acbe74badc544feaf96172c990
\ No newline at end of file
diff --git a/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14.pom b/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14.pom
new file mode 100644
index 0000000..8166186
--- /dev/null
+++ b/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14.pom
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.gradle</groupId>
+ <artifactId>gradle-tooling-api</artifactId>
+ <version>2.14</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.10</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14.pom.md5 b/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14.pom.md5
new file mode 100644
index 0000000..948d8a5
--- /dev/null
+++ b/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14.pom.md5
@@ -0,0 +1 @@
+81160f6281b96242509a8071553c4c5d
\ No newline at end of file
diff --git a/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14.pom.sha1 b/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14.pom.sha1
new file mode 100644
index 0000000..da72fc4
--- /dev/null
+++ b/common/m2/repository/org/gradle/gradle-tooling-api/2.14/gradle-tooling-api-2.14.pom.sha1
@@ -0,0 +1 @@
+ac7685b72f4d911cc9d196a55cbbd6ef88192044
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/NOTICE b/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/NOTICE
new file mode 100644
index 0000000..f13bf7f
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/NOTICE
@@ -0,0 +1,10 @@
+Copyright (c) 2009, 2015 Mountainminds GmbH & Co. KG and Contributors
+
+The JaCoCo Java Code Coverage Library and all included documentation is made
+available by Mountainminds GmbH & Co. KG, Munich. Except indicated below, the
+Content is provided to you under the terms and conditions of the Eclipse Public
+License Version 1.0 ("EPL"). A copy of the EPL is available at
+http://www.eclipse.org/legal/epl-v10.html.
+
+Please visit http://www.eclemma.org/jacoco/trunk/doc/license.html for the
+complete license information including third party licenses and trademarks.
diff --git a/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812-sources.jar b/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812-sources.jar
new file mode 100644
index 0000000..3a76183
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812-sources.jar
Binary files differ
diff --git a/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812-sources.jar.md5 b/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812-sources.jar.md5
new file mode 100644
index 0000000..c39a6d9
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812-sources.jar.md5
@@ -0,0 +1 @@
+50f4644eaf1ed9bc1b2ad40098300476
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812-sources.jar.sha1 b/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812-sources.jar.sha1
new file mode 100644
index 0000000..2c07a00
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812-sources.jar.sha1
@@ -0,0 +1 @@
+7ec4927f612ce1aed757a1fc74215c61f6313c9b
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812.jar b/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812.jar
new file mode 100644
index 0000000..e0042a5
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812.jar
Binary files differ
diff --git a/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812.jar.md5 b/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812.jar.md5
new file mode 100644
index 0000000..68160a3
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812.jar.md5
@@ -0,0 +1 @@
+c6b523ed67736fd2a711a1f2cf0a34ca
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812.jar.sha1 b/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812.jar.sha1
new file mode 100644
index 0000000..fa062a5
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812.jar.sha1
@@ -0,0 +1 @@
+7cf4f41f6c1f2e47c7f620721374a5169ed8e1ac
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812.pom b/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812.pom
new file mode 100644
index 0000000..8b8a889
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812.pom
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2009, 2016 Mountainminds GmbH & Co. KG and Contributors
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Evgeny Mandrikov - initial API and implementation
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.jacoco</groupId>
+ <artifactId>org.jacoco.build</artifactId>
+ <version>0.7.6.201602180812</version>
+ <relativePath>../org.jacoco.build</relativePath>
+ </parent>
+
+ <artifactId>org.jacoco.agent</artifactId>
+
+ <name>JaCoCo :: Agent</name>
+ <description>JaCoCo Agent</description>
+
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.jacoco.agent.rt</artifactId>
+ <classifier>all</classifier>
+ <version>${project.version}</version>
+ <destFileName>jacocoagent.jar</destFileName>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>${project.build.directory}/classes</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.directory}/classes/jacocoagent.jar</file>
+ <type>jar</type>
+ <classifier>runtime</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812.pom.md5 b/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812.pom.md5
new file mode 100644
index 0000000..226282e
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812.pom.md5
@@ -0,0 +1 @@
+52b7293893a4735567d92eac9a92209c
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812.pom.sha1 b/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812.pom.sha1
new file mode 100644
index 0000000..236bcd5
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812.pom.sha1
@@ -0,0 +1 @@
+0d10963df7b1c32ff74d502e8fa6c99d20c3b6bc
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/NOTICE b/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/NOTICE
new file mode 100644
index 0000000..f13bf7f
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/NOTICE
@@ -0,0 +1,10 @@
+Copyright (c) 2009, 2015 Mountainminds GmbH & Co. KG and Contributors
+
+The JaCoCo Java Code Coverage Library and all included documentation is made
+available by Mountainminds GmbH & Co. KG, Munich. Except indicated below, the
+Content is provided to you under the terms and conditions of the Eclipse Public
+License Version 1.0 ("EPL"). A copy of the EPL is available at
+http://www.eclipse.org/legal/epl-v10.html.
+
+Please visit http://www.eclemma.org/jacoco/trunk/doc/license.html for the
+complete license information including third party licenses and trademarks.
diff --git a/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812-sources.jar b/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812-sources.jar
new file mode 100644
index 0000000..3e9c275
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812-sources.jar
Binary files differ
diff --git a/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812-sources.jar.md5 b/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812-sources.jar.md5
new file mode 100644
index 0000000..4a1cbef
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812-sources.jar.md5
@@ -0,0 +1 @@
+e86f109a893cb77413f987fc3a54dce7
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812-sources.jar.sha1 b/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812-sources.jar.sha1
new file mode 100644
index 0000000..30f89f7
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812-sources.jar.sha1
@@ -0,0 +1 @@
+e603f6d11414dd6d36972a8594ba0a81e8474b14
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812.jar b/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812.jar
new file mode 100644
index 0000000..f85b083
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812.jar
Binary files differ
diff --git a/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812.jar.md5 b/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812.jar.md5
new file mode 100644
index 0000000..24409cb
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812.jar.md5
@@ -0,0 +1 @@
+f5a94c40959bea6ff0388a9f814cd1a8
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812.jar.sha1 b/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812.jar.sha1
new file mode 100644
index 0000000..d7418ac
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812.jar.sha1
@@ -0,0 +1 @@
+366588726d11725024370417f9c80124f52c99cd
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812.pom b/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812.pom
new file mode 100644
index 0000000..e385c9b
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812.pom
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2009, 2016 Mountainminds GmbH & Co. KG and Contributors
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Evgeny Mandrikov - initial API and implementation
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.jacoco</groupId>
+ <artifactId>org.jacoco.build</artifactId>
+ <version>0.7.6.201602180812</version>
+ <relativePath>../org.jacoco.build</relativePath>
+ </parent>
+
+ <artifactId>org.jacoco.ant</artifactId>
+
+ <name>JaCoCo :: Ant</name>
+ <description>JaCoCo Ant Tasks</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.jacoco.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.jacoco.report</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.jacoco.agent</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <shadedArtifactAttached>true</shadedArtifactAttached>
+ <shadedClassifierName>nodeps</shadedClassifierName>
+ <minimizeJar>true</minimizeJar>
+ <relocations>
+ <relocation>
+ <pattern>org.objectweb.asm</pattern>
+ <shadedPattern>org.jacoco.asm</shadedPattern>
+ </relocation>
+ </relocations>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812.pom.md5 b/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812.pom.md5
new file mode 100644
index 0000000..4d59e40
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812.pom.md5
@@ -0,0 +1 @@
+6fbba4ccc56a4310641e9624d253fae7
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812.pom.sha1 b/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812.pom.sha1
new file mode 100644
index 0000000..38c1053
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.ant/0.7.6.201602180812/org.jacoco.ant-0.7.6.201602180812.pom.sha1
@@ -0,0 +1 @@
+7ee185bf5f0e5eeace30a2db3e667a0e1101decc
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.build/0.7.6.201602180812/NOTICE b/common/m2/repository/org/jacoco/org.jacoco.build/0.7.6.201602180812/NOTICE
new file mode 100644
index 0000000..f13bf7f
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.build/0.7.6.201602180812/NOTICE
@@ -0,0 +1,10 @@
+Copyright (c) 2009, 2015 Mountainminds GmbH & Co. KG and Contributors
+
+The JaCoCo Java Code Coverage Library and all included documentation is made
+available by Mountainminds GmbH & Co. KG, Munich. Except indicated below, the
+Content is provided to you under the terms and conditions of the Eclipse Public
+License Version 1.0 ("EPL"). A copy of the EPL is available at
+http://www.eclipse.org/legal/epl-v10.html.
+
+Please visit http://www.eclemma.org/jacoco/trunk/doc/license.html for the
+complete license information including third party licenses and trademarks.
diff --git a/common/m2/repository/org/jacoco/org.jacoco.build/0.7.6.201602180812/org.jacoco.build-0.7.6.201602180812.pom b/common/m2/repository/org/jacoco/org.jacoco.build/0.7.6.201602180812/org.jacoco.build-0.7.6.201602180812.pom
new file mode 100644
index 0000000..0f5acdc
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.build/0.7.6.201602180812/org.jacoco.build-0.7.6.201602180812.pom
@@ -0,0 +1,1018 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2009, 2016 Mountainminds GmbH & Co. KG and Contributors
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Evgeny Mandrikov - initial API and implementation
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.jacoco</groupId>
+ <artifactId>org.jacoco.build</artifactId>
+ <version>0.7.6.201602180812</version>
+ <packaging>pom</packaging>
+
+ <name>JaCoCo</name>
+ <description>JaCoCo - Java Code Coverage Library</description>
+ <url>http://jacoco.org</url>
+ <inceptionYear>2009</inceptionYear>
+ <organization>
+ <name>Mountainminds GmbH & Co. KG</name>
+ </organization>
+ <licenses>
+ <license>
+ <name>Eclipse Public License v1.0</name>
+ <url>http://www.eclipse.org/legal/epl-v10.html</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
+ <developers>
+ <developer>
+ <id>mtnminds</id>
+ <name>Marc R. Hoffmann</name>
+ <email>hoffmann@mountainminds.com</email>
+ <timezone>+1</timezone>
+ <roles>
+ <role>Project Lead</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>brock_j</id>
+ <name>Brock Janiczak</name>
+ <email>brockj@gmail.com</email>
+ <timezone>+10</timezone>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>mandrikov</id>
+ <name>Evgeny Mandrikov</name>
+ <email>mandrikov@gmail.com</email>
+ <url>http://godin.net.ru</url>
+ <organization>SonarSource</organization>
+ <organizationUrl>http://www.sonarsource.com</organizationUrl>
+ <timezone>+3</timezone>
+ <roles>
+ <role>Build and release manager</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>mfriedenhagen</id>
+ <name>Mirko Friedenhagen</name>
+ <email>mfriedenhagen@gmail.com</email>
+ <timezone>+1</timezone>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ </developers>
+
+ <contributors>
+ <contributor>
+ <name>Radek Liba</name>
+ </contributor>
+ <contributor>
+ <name>Christoph Beck</name>
+ </contributor>
+ </contributors>
+
+ <modules>
+ <!-- Order is important: org.jacoco.agent.rt embeds into org.jacoco.agent and JaCoCo Agent used during tests -->
+ <module>../org.jacoco.core</module>
+ <module>../org.jacoco.report</module>
+ <module>../org.jacoco.agent.rt</module>
+ <module>../org.jacoco.agent</module>
+ <module>../org.jacoco.ant</module>
+
+ <module>../jacoco-maven-plugin</module>
+
+ <module>../org.jacoco.tests</module>
+
+ <module>../org.jacoco.examples</module>
+ <module>../org.jacoco.doc</module>
+ <module>../jacoco</module>
+ </modules>
+
+ <scm>
+ <connection>scm:git:git://github.com/jacoco/jacoco.git</connection>
+ <developerConnection>scm:git:ssh://git@github.com:jacoco/jacoco.git</developerConnection>
+ <url>https://github.com/jacoco/jacoco</url>
+ </scm>
+ <issueManagement>
+ <system>GitHub</system>
+ <url>https://github.com/jacoco/jacoco/issues</url>
+ </issueManagement>
+ <distributionManagement>
+ <repository>
+ <id>sonatype-nexus-staging</id>
+ <name>Nexus Release Repository</name>
+ <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
+ </repository>
+ <snapshotRepository>
+ <id>sonatype-nexus-snapshots</id>
+ <name>Sonatype Nexus Snapshots</name>
+ <url>${sonatypeOssDistMgmtSnapshotsUrl}</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <sonatypeOssDistMgmtSnapshotsUrl>https://oss.sonatype.org/content/repositories/snapshots/</sonatypeOssDistMgmtSnapshotsUrl>
+
+ <maven.build.timestamp.format>yyyyMMddhhmm</maven.build.timestamp.format>
+ <jacoco.home.url>http://www.eclemma.org/jacoco</jacoco.home.url>
+ <copyright.years>${project.inceptionYear}, 2016</copyright.years>
+
+ <maven.compiler.source>1.5</maven.compiler.source>
+ <maven.compiler.target>1.5</maven.compiler.target>
+
+ <jvm.args></jvm.args>
+ <argLine>${jvm.args}</argLine>
+
+ <!-- Dependencies versions -->
+ <asm.version>5.0.4</asm.version>
+ <ant.version>1.7.1</ant.version>
+ <junit.version>4.8.2</junit.version>
+
+ <!-- ================== -->
+ <!-- For Sonar analysis -->
+ <!-- ================== -->
+ <sonar.skippedModules>org.jacoco.tests,org.jacoco.doc</sonar.skippedModules>
+
+ <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
+ <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
+ <sonar.jacoco.reportPath>../${project.artifactId}.test/target/jacoco.exec</sonar.jacoco.reportPath>
+ <sonar.surefire.reportsPath>../${project.artifactId}.test/target/surefire-reports/</sonar.surefire.reportsPath>
+
+ <!-- See http://jira.codehaus.org/browse/SONAR-2096 -->
+ <sonar.java.source>1.5</sonar.java.source>
+ <sonar.java.target>1.5</sonar.java.target>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <!-- Project dependencies -->
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.jacoco.core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.jacoco.report</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.jacoco.agent</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.jacoco.agent</artifactId>
+ <classifier>runtime</classifier>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.jacoco.agent.rt</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.jacoco.ant</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.jacoco.ant</artifactId>
+ <classifier>nodeps</classifier>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.jacoco.examples</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!-- Third-party dependencies -->
+ <dependency>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm-debug-all</artifactId>
+ <version>${asm.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>${ant.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-junit</artifactId>
+ <version>${ant.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-antunit</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src</directory>
+ <filtering>false</filtering>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ <exclude>**/*.properties</exclude>
+ </excludes>
+ </resource>
+ <resource>
+ <directory>src</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*.properties</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>.</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>about.html</include>
+ </includes>
+ </resource>
+ </resources>
+
+ <pluginManagement>
+ <plugins>
+ <!-- Apache plugins -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>2.4.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.8.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.0.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>2.3.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <version>1.8</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <version>1.3</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.3.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jarsigner-plugin</artifactId>
+ <version>1.4</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.8</version>
+ <configuration>
+ <quiet>true</quiet>
+ <detectOfflineLinks>false</detectOfflineLinks>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <version>3.3</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+ <mavenExecutorId>forked-path</mavenExecutorId>
+ <useReleaseProfile>false</useReleaseProfile>
+ <!--
+ Allows to activate release profile during release.
+ We don't use releaseProfiles parameter, because it affects only release:perform goal
+ -->
+ <arguments>-Prelease</arguments>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.5</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>1.4</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.1.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.9</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>3.3</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-toolchains-plugin</artifactId>
+ <version>1.0</version>
+ </plugin>
+ <!-- Mojo plugins -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>animal-sniffer-maven-plugin</artifactId>
+ <version>1.6</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.5</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>buildnumber-maven-plugin</artifactId>
+ <version>1.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>xml-maven-plugin</artifactId>
+ <version>1.0</version>
+ </plugin>
+ <!-- Third-party plugins -->
+ <plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <version>1.0</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <testSourceDirectory>${project.build.sourceDirectory}</testSourceDirectory>
+ <testClassesDirectory>${project.build.outputDirectory}</testClassesDirectory>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <configuration>
+ <!-- We can't use delimiters "${*}" and "$*$" together - probably it's bug in plugin -->
+ <!-- so for now we will define only our delimiters in compliance with https://sourceforge.net/apps/trac/eclemma/changeset/1229 -->
+ <!-- but it would be better to use defaults -->
+ <useDefaultDelimiters>false</useDefaultDelimiters>
+ <delimiters>
+ <delimiter>@*@</delimiter>
+ <delimiter>$*$</delimiter>
+ </delimiters>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <configuration>
+ <filters>
+ <!-- Don't include signatures -->
+ <filter>
+ <artifact>*:*</artifact>
+ <excludes>
+ <exclude>META-INF/*.SF</exclude>
+ <exclude>META-INF/*.DSA</exclude>
+ <exclude>META-INF/*.RSA</exclude>
+ </excludes>
+ </filter>
+ </filters>
+ <transformers>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+ <manifestEntries>
+ <Implementation-Title>${project.description}</Implementation-Title>
+ <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
+ <Implementation-Version>${project.version}</Implementation-Version>
+ </manifestEntries>
+ </transformer>
+ </transformers>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <archiverConfig>
+ <!-- Workaround for http://jira.codehaus.org/browse/MASSEMBLY-422 -->
+ <!-- 420(dec) = 644(oct) -->
+ <fileMode>420</fileMode>
+ <!-- 493(dec) = 755(oct) -->
+ <directoryMode>493</directoryMode>
+ <defaultDirectoryMode>493</defaultDirectoryMode>
+ </archiverConfig>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>enforce</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireNoRepositories>
+ <message>The rules for repo1.maven.org are that pom.xml files should not include repository definitions.</message>
+ <banRepositories>true</banRepositories>
+ <banPluginRepositories>true</banPluginRepositories>
+ </requireNoRepositories>
+ <requireReleaseDeps>
+ <message>No SNAPSHOT versions allowed for dependencies</message>
+ <onlyWhenRelease>true</onlyWhenRelease>
+ </requireReleaseDeps>
+ <requireMavenVersion>
+ <!-- Maven 3.0.3 contains bug - see http://jira.codehaus.org/browse/MINVOKER-107 -->
+ <version>[2.2.1,3.0.0),[3.0.4,)</version>
+ </requireMavenVersion>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>check-license-header</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <fileset dir="${basedir}" includes="**/*.java,**/*.xml,**/*.bsh" excludes="target/**,.idea/**,nb-configuration.xml" id="missinglicense.fileset">
+ <not>
+ <and>
+ <contains text="Copyright (c) 2009, 2016 Mountainminds GmbH & Co. KG and Contributors"/>
+ <contains text="All rights reserved. This program and the accompanying materials"/>
+ <contains text="are made available under the terms of the Eclipse Public License v1.0"/>
+ <contains text="which accompanies this distribution, and is available at"/>
+ <contains text="http://www.eclipse.org/legal/epl-v10.html"/>
+ </and>
+ </not>
+ </fileset>
+ <pathconvert property="missing" refid="missinglicense.fileset"/>
+ <fail message="Invalid license info in: ${missing}">
+ <condition>
+ <not>
+ <equals arg1="${missing}" arg2=""/>
+ </not>
+ </condition>
+ </fail>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>parse-version</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>parse-version</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>buildnumber-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <doCheck>false</doCheck>
+ <doUpdate>false</doUpdate>
+ <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
+ <revisionOnScmFailure>0000000</revisionOnScmFailure>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>parse-version</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source>
+ major = project.properties['parsedVersion.majorVersion']
+ minor = project.properties['parsedVersion.minorVersion']
+ incremental = project.properties['parsedVersion.incrementalVersion']
+ qualifier = "${maven.build.timestamp}"
+ project.properties['buildQualifier'] = qualifier
+ project.properties['unqualifiedVersion'] = major + '.' + minor + '.' + incremental
+ project.properties['qualified.bundle.version'] = project.properties['unqualifiedVersion'] + '.' + project.properties['buildQualifier']
+ project.properties['build.date'] = qualifier.substring(0, 4) + '/' + qualifier.substring(4, 6) + '/' + qualifier.substring(6, 8)
+ buildNumber = project.properties['buildNumber']
+ project.properties['jacoco.runtime.package.name'] = "org.jacoco.agent.rt.internal_" + buildNumber.substring(buildNumber.length() - 7, buildNumber.length())
+ </source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <!-- This profile is used to launch tests with different JDK versions. -->
+ <profile>
+ <id>integration-tests</id>
+ <activation>
+ <property>
+ <name>jdk.version</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <!-- See http://maven.apache.org/guides/mini/guide-using-toolchains.html -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-toolchains-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>toolchain</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <toolchains>
+ <jdk>
+ <version>${jdk.version}</version>
+ </jdk>
+ </toolchains>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!-- This profile is used to launch tests with compilation into specific bytecode version. -->
+ <profile>
+ <id>bytecode</id>
+ <activation>
+ <property>
+ <name>bytecode.version</name>
+ </property>
+ </activation>
+ <properties>
+ <maven.compiler.source>${bytecode.version}</maven.compiler.source>
+ <maven.compiler.target>${bytecode.version}</maven.compiler.target>
+ </properties>
+ </profile>
+
+ <profile>
+ <id>jdk16</id>
+ <activation>
+ <property>
+ <name>jdk.version</name>
+ <value>1.6</value>
+ </property>
+ </activation>
+ <properties>
+ <jvm.args>-XX:-FailOverToOldVerifier -Xverify:all</jvm.args>
+ </properties>
+ </profile>
+
+ <profile>
+ <id>jdk17</id>
+ <activation>
+ <property>
+ <name>jdk.version</name>
+ <value>1.7</value>
+ </property>
+ </activation>
+ <properties>
+ <jvm.args>-XX:-FailOverToOldVerifier -Xverify:all</jvm.args>
+ </properties>
+ </profile>
+
+ <profile>
+ <id>jdk18</id>
+ <activation>
+ <property>
+ <name>jdk.version</name>
+ <value>1.8</value>
+ </property>
+ </activation>
+ <properties>
+ <jvm.args>-XX:-FailOverToOldVerifier -Xverify:all</jvm.args>
+ </properties>
+ </profile>
+
+ <profile>
+ <id>sign</id>
+ <activation>
+ <property>
+ <name>jarsigner.alias</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jarsigner-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>sign</id>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>manifest</id>
+ <activation>
+ <file>
+ <exists>META-INF/MANIFEST.MF</exists>
+ </file>
+ </activation>
+ <properties>
+ <bundle-manifest>${project.build.directory}/META-INF/MANIFEST.MF</bundle-manifest>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>translate-qualifier</id>
+ <phase>generate-resources</phase>
+ <configuration>
+ <target>
+ <copy file="META-INF/MANIFEST.MF" tofile="${bundle-manifest}" overwrite="true"/>
+ <replace file="${bundle-manifest}">
+ <replacefilter token=".qualifier" value=".${buildQualifier}"/>
+ </replace>
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestFile>${bundle-manifest}</manifestFile>
+ <manifestEntries>
+ <Eclipse-SourceReferences>scm:git:git://github.com/jacoco/jacoco.git;path="${project.artifactId}";commitId=${buildNumber}</Eclipse-SourceReferences>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>sources</id>
+ <activation>
+ <file>
+ <exists>src/</exists>
+ </file>
+ </activation>
+ <build>
+ <plugins>
+ <!-- Generates jar with sources -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar-no-fork</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- Generates Javadoc -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!-- This profile is activated when a project is released. -->
+ <profile>
+ <id>release</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <inherited>false</inherited>
+ <executions>
+ <execution>
+ <id>enforce-release-rules</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <!--
+ <requireActiveProfile>
+ <message>You must sign JARs during release.</message>
+ <profiles>sign</profiles>
+ </requireActiveProfile>
+ -->
+ <requireReleaseVersion/>
+ <requireProperty>
+ <property>buildNumber</property>
+ <regex>[0-9a-f]{40}</regex>
+ </requireProperty>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- Checks compatibility with Java API -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>animal-sniffer-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>enforce-java-api-compatibility</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <configuration>
+ <signature>
+ <groupId>org.codehaus.mojo.signature</groupId>
+ <artifactId>java15</artifactId>
+ <version>1.0</version>
+ </signature>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- Signs artifacts -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>sign-artifacts</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!-- This profile is active only when used from Eclipse m2e and is used only to store settings. -->
+ <profile>
+ <id>m2e</id>
+ <activation>
+ <property>
+ <name>m2e.version</name>
+ </property>
+ </activation>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <versionRange>[0,)</versionRange>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <versionRange>[0,)</versionRange>
+ <goals>
+ <goal>install</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <versionRange>[0,)</versionRange>
+ <goals>
+ <goal>unpack</goal>
+ <goal>copy-dependencies</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <versionRange>[0,)</versionRange>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>xml-maven-plugin</artifactId>
+ <versionRange>[0,)</versionRange>
+ <goals>
+ <goal>transform</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <versionRange>[0,)</versionRange>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <versionRange>[0,)</versionRange>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <versionRange>[0,)</versionRange>
+ <goals>
+ <goal>parse-version</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/common/m2/repository/org/jacoco/org.jacoco.build/0.7.6.201602180812/org.jacoco.build-0.7.6.201602180812.pom.md5 b/common/m2/repository/org/jacoco/org.jacoco.build/0.7.6.201602180812/org.jacoco.build-0.7.6.201602180812.pom.md5
new file mode 100644
index 0000000..fea30f3
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.build/0.7.6.201602180812/org.jacoco.build-0.7.6.201602180812.pom.md5
@@ -0,0 +1 @@
+55994ed6762c781cde2cceaa5e243eff
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.build/0.7.6.201602180812/org.jacoco.build-0.7.6.201602180812.pom.sha1 b/common/m2/repository/org/jacoco/org.jacoco.build/0.7.6.201602180812/org.jacoco.build-0.7.6.201602180812.pom.sha1
new file mode 100644
index 0000000..029b566
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.build/0.7.6.201602180812/org.jacoco.build-0.7.6.201602180812.pom.sha1
@@ -0,0 +1 @@
+06b4a6e6c582fb44fab31b67c6d55e2ce627e467
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/NOTICE b/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/NOTICE
new file mode 100644
index 0000000..f13bf7f
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/NOTICE
@@ -0,0 +1,10 @@
+Copyright (c) 2009, 2015 Mountainminds GmbH & Co. KG and Contributors
+
+The JaCoCo Java Code Coverage Library and all included documentation is made
+available by Mountainminds GmbH & Co. KG, Munich. Except indicated below, the
+Content is provided to you under the terms and conditions of the Eclipse Public
+License Version 1.0 ("EPL"). A copy of the EPL is available at
+http://www.eclipse.org/legal/epl-v10.html.
+
+Please visit http://www.eclemma.org/jacoco/trunk/doc/license.html for the
+complete license information including third party licenses and trademarks.
diff --git a/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812-sources.jar b/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812-sources.jar
new file mode 100644
index 0000000..8df38f5
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812-sources.jar
Binary files differ
diff --git a/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812-sources.jar.md5 b/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812-sources.jar.md5
new file mode 100644
index 0000000..140176d
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812-sources.jar.md5
@@ -0,0 +1 @@
+d8665fdf0cffdfaecec75ae41c46b99d
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812-sources.jar.sha1 b/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812-sources.jar.sha1
new file mode 100644
index 0000000..7ff664a
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812-sources.jar.sha1
@@ -0,0 +1 @@
+288b877fa13a6290c8384bddf27331f16cfd5263
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812.jar b/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812.jar
new file mode 100644
index 0000000..6dfb9d6
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812.jar
Binary files differ
diff --git a/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812.jar.md5 b/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812.jar.md5
new file mode 100644
index 0000000..d9f6f4b
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812.jar.md5
@@ -0,0 +1 @@
+9ecfd08f661b21e6fa627aa89eec726c
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812.jar.sha1 b/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812.jar.sha1
new file mode 100644
index 0000000..0861b22
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812.jar.sha1
@@ -0,0 +1 @@
+88d729e2cf2af80fe8873ab605905576cb50d23a
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812.pom b/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812.pom
new file mode 100644
index 0000000..1659cfa
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812.pom
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2009, 2016 Mountainminds GmbH & Co. KG and Contributors
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Evgeny Mandrikov - initial API and implementation
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.jacoco</groupId>
+ <artifactId>org.jacoco.build</artifactId>
+ <version>0.7.6.201602180812</version>
+ <relativePath>../org.jacoco.build</relativePath>
+ </parent>
+
+ <artifactId>org.jacoco.core</artifactId>
+
+ <name>JaCoCo :: Core</name>
+ <description>JaCoCo Core</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm-debug-all</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ </build>
+</project>
diff --git a/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812.pom.md5 b/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812.pom.md5
new file mode 100644
index 0000000..aa9147e
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812.pom.md5
@@ -0,0 +1 @@
+97579986f83937341e3177440ac2aa77
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812.pom.sha1 b/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812.pom.sha1
new file mode 100644
index 0000000..c8b5893
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.core/0.7.6.201602180812/org.jacoco.core-0.7.6.201602180812.pom.sha1
@@ -0,0 +1 @@
+4acf483171ef500a73a77c10924ba0ea6eeb40ae
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/NOTICE b/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/NOTICE
new file mode 100644
index 0000000..f13bf7f
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/NOTICE
@@ -0,0 +1,10 @@
+Copyright (c) 2009, 2015 Mountainminds GmbH & Co. KG and Contributors
+
+The JaCoCo Java Code Coverage Library and all included documentation is made
+available by Mountainminds GmbH & Co. KG, Munich. Except indicated below, the
+Content is provided to you under the terms and conditions of the Eclipse Public
+License Version 1.0 ("EPL"). A copy of the EPL is available at
+http://www.eclipse.org/legal/epl-v10.html.
+
+Please visit http://www.eclemma.org/jacoco/trunk/doc/license.html for the
+complete license information including third party licenses and trademarks.
diff --git a/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812-sources.jar b/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812-sources.jar
new file mode 100644
index 0000000..7171706
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812-sources.jar
Binary files differ
diff --git a/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812-sources.jar.md5 b/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812-sources.jar.md5
new file mode 100644
index 0000000..9c387c8
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812-sources.jar.md5
@@ -0,0 +1 @@
+343cb9ed8ec2269ca25f5bb429325507
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812-sources.jar.sha1 b/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812-sources.jar.sha1
new file mode 100644
index 0000000..0bb44e2
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812-sources.jar.sha1
@@ -0,0 +1 @@
+493641c3f53be3e26189f55197c0edc2faaf9099
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812.jar b/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812.jar
new file mode 100644
index 0000000..dc2a12f
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812.jar
Binary files differ
diff --git a/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812.jar.md5 b/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812.jar.md5
new file mode 100644
index 0000000..4ef8b1e
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812.jar.md5
@@ -0,0 +1 @@
+05d53f0389288306568b9cad98d5e133
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812.jar.sha1 b/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812.jar.sha1
new file mode 100644
index 0000000..19d95f2
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812.jar.sha1
@@ -0,0 +1 @@
+9fd248e4d4622aa1eae776e9252ab46dd05400ea
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812.pom b/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812.pom
new file mode 100644
index 0000000..8fd1c12
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812.pom
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2009, 2016 Mountainminds GmbH & Co. KG and Contributors
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Evgeny Mandrikov - initial API and implementation
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.jacoco</groupId>
+ <artifactId>org.jacoco.build</artifactId>
+ <version>0.7.6.201602180812</version>
+ <relativePath>../org.jacoco.build</relativePath>
+ </parent>
+
+ <artifactId>org.jacoco.report</artifactId>
+
+ <name>JaCoCo :: Report</name>
+ <description>JaCoCo Reporting</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.jacoco.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm-debug-all</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ </build>
+</project>
diff --git a/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812.pom.md5 b/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812.pom.md5
new file mode 100644
index 0000000..a13c7b9
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812.pom.md5
@@ -0,0 +1 @@
+49852662ff03c711cd2fd6495f60222c
\ No newline at end of file
diff --git a/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812.pom.sha1 b/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812.pom.sha1
new file mode 100644
index 0000000..5a52352
--- /dev/null
+++ b/common/m2/repository/org/jacoco/org.jacoco.report/0.7.6.201602180812/org.jacoco.report-0.7.6.201602180812.pom.sha1
@@ -0,0 +1 @@
+bd653a51b8993120503fcbb915b8bc7ccad304c3
\ No newline at end of file
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-android-extensions/1.0.2/kotlin-android-extensions-1.0.2.jar b/common/m2/repository/org/jetbrains/kotlin/kotlin-android-extensions/1.0.2/kotlin-android-extensions-1.0.2.jar
new file mode 100644
index 0000000..925406c
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-android-extensions/1.0.2/kotlin-android-extensions-1.0.2.jar
Binary files differ
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-android-extensions/1.0.2/kotlin-android-extensions-1.0.2.jar.sha1 b/common/m2/repository/org/jetbrains/kotlin/kotlin-android-extensions/1.0.2/kotlin-android-extensions-1.0.2.jar.sha1
new file mode 100644
index 0000000..5942362
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-android-extensions/1.0.2/kotlin-android-extensions-1.0.2.jar.sha1
@@ -0,0 +1 @@
+aa5c3dcba43516a11146ca50375d340a330ed625
\ No newline at end of file
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-android-extensions/1.0.2/kotlin-android-extensions-1.0.2.pom b/common/m2/repository/org/jetbrains/kotlin/kotlin-android-extensions/1.0.2/kotlin-android-extensions-1.0.2.pom
new file mode 100644
index 0000000..5217924
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-android-extensions/1.0.2/kotlin-android-extensions-1.0.2.pom
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <modelVersion>4.0.0</modelVersion>
+ <properties>
+ <maven-plugin-anno.version>1.4.1</maven-plugin-anno.version>
+ <maven.version>3.0.4</maven.version>
+ </properties>
+
+ <parent>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-project</artifactId>
+ <version>1.0.2</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>kotlin-android-extensions</artifactId>
+ <packaging>jar</packaging>
+
+ <description>Android compiler plugin for Kotlin</description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>kotlin-maven-plugin</artifactId>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <version>${project.version}</version>
+
+ <executions>
+ <execution>
+ <id>compile</id>
+ <phase>compile</phase>
+ <goals> <goal>compile</goal> </goals>
+ <configuration>
+ <sourceDirs>
+ <sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
+ </sourceDirs>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>test-compile</id>
+ <phase>test-compile</phase>
+ <goals> <goal>test-compile</goal> </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.7</version>
+ <executions>
+ <execution>
+ <id>prepare</id>
+ <phase>compile</phase>
+ <configuration>
+ <tasks>
+ <unzip src="${kotlin-sdk}/lib/android-extensions-compiler.jar" dest="target/classes/" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>sources-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <classifier>sources</classifier>
+ <classesDirectory>${basedir}/../../../plugins/android-extensions/android-extensions-compiler/src</classesDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+
+ <repositories>
+ <repository>
+ <id>jetbrains-utils</id>
+ <url>http://repository.jetbrains.com/utils</url>
+ </repository>
+ </repositories>
+</project>
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-android-extensions/1.0.2/kotlin-android-extensions-1.0.2.pom.sha1 b/common/m2/repository/org/jetbrains/kotlin/kotlin-android-extensions/1.0.2/kotlin-android-extensions-1.0.2.pom.sha1
new file mode 100644
index 0000000..ea1cdf4
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-android-extensions/1.0.2/kotlin-android-extensions-1.0.2.pom.sha1
@@ -0,0 +1 @@
+fecaa2e12a58f77d516bf229bd1f01dca108b044
\ No newline at end of file
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-annotation-processing/1.0.2/kotlin-annotation-processing-1.0.2.jar b/common/m2/repository/org/jetbrains/kotlin/kotlin-annotation-processing/1.0.2/kotlin-annotation-processing-1.0.2.jar
new file mode 100644
index 0000000..9886436
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-annotation-processing/1.0.2/kotlin-annotation-processing-1.0.2.jar
Binary files differ
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-annotation-processing/1.0.2/kotlin-annotation-processing-1.0.2.jar.sha1 b/common/m2/repository/org/jetbrains/kotlin/kotlin-annotation-processing/1.0.2/kotlin-annotation-processing-1.0.2.jar.sha1
new file mode 100644
index 0000000..bb6ad2a
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-annotation-processing/1.0.2/kotlin-annotation-processing-1.0.2.jar.sha1
@@ -0,0 +1 @@
+e9c5802f2ea60d581fb2ccb6e55ccec79fa0d7c4
\ No newline at end of file
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-annotation-processing/1.0.2/kotlin-annotation-processing-1.0.2.pom b/common/m2/repository/org/jetbrains/kotlin/kotlin-annotation-processing/1.0.2/kotlin-annotation-processing-1.0.2.pom
new file mode 100644
index 0000000..06dc338
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-annotation-processing/1.0.2/kotlin-annotation-processing-1.0.2.pom
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <modelVersion>4.0.0</modelVersion>
+ <properties>
+ <maven.version>3.0.4</maven.version>
+ </properties>
+
+ <parent>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-project</artifactId>
+ <version>1.0.2</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>kotlin-annotation-processing</artifactId>
+ <packaging>jar</packaging>
+
+ <description>Annotation Processor wrapper for Kotlin</description>
+
+ <repositories>
+ <repository>
+ <id>jetbrains-utils</id>
+ <url>http://repository.jetbrains.com/utils</url>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-stdlib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>gradle-api</artifactId>
+ <version>1.6</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.android.tools.build</groupId>
+ <artifactId>gradle</artifactId>
+ <version>1.1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
+ <testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
+
+ <plugins>
+ <plugin>
+ <artifactId>kotlin-maven-plugin</artifactId>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <version>${project.version}</version>
+ <configuration>
+ <annotationPaths>
+ <annotationPath>${basedir}/kotlinAnnotation</annotationPath>
+ </annotationPaths>
+ </configuration>
+
+ <executions>
+ <execution>
+ <id>compile</id>
+ <phase>compile</phase>
+ <goals> <goal>compile</goal> </goals>
+ </execution>
+
+ <execution>
+ <id>test-compile</id>
+ <phase>test-compile</phase>
+ <goals> <goal>test-compile</goal> </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-annotation-processing/1.0.2/kotlin-annotation-processing-1.0.2.pom.sha1 b/common/m2/repository/org/jetbrains/kotlin/kotlin-annotation-processing/1.0.2/kotlin-annotation-processing-1.0.2.pom.sha1
new file mode 100644
index 0000000..848c8f1
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-annotation-processing/1.0.2/kotlin-annotation-processing-1.0.2.pom.sha1
@@ -0,0 +1 @@
+4193f1de966d4ccc02200c33ca04822f50a97780
\ No newline at end of file
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.0.2/kotlin-compiler-embeddable-1.0.2.jar b/common/m2/repository/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.0.2/kotlin-compiler-embeddable-1.0.2.jar
new file mode 100644
index 0000000..408f5d5
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.0.2/kotlin-compiler-embeddable-1.0.2.jar
Binary files differ
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.0.2/kotlin-compiler-embeddable-1.0.2.jar.sha1 b/common/m2/repository/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.0.2/kotlin-compiler-embeddable-1.0.2.jar.sha1
new file mode 100644
index 0000000..6a350f9
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.0.2/kotlin-compiler-embeddable-1.0.2.jar.sha1
@@ -0,0 +1 @@
+fedf16a2961c4d63c8b4746bef269a12049bf37a
\ No newline at end of file
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.0.2/kotlin-compiler-embeddable-1.0.2.pom b/common/m2/repository/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.0.2/kotlin-compiler-embeddable-1.0.2.pom
new file mode 100644
index 0000000..42ac738
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.0.2/kotlin-compiler-embeddable-1.0.2.pom
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>kotlin-project</artifactId>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <version>1.0.2</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>kotlin-compiler-embeddable</artifactId>
+ <description>the Kotlin compiler embeddable</description>
+ <build>
+ <testSourceDirectory>test/kotlin</testSourceDirectory>
+ <plugins>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-sources-for-shade-plugin</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar-no-fork</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.7</version>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${kotlin-dist}/kotlin-compiler-javadoc.jar</file>
+ <type>jar</type>
+ <classifier>javadoc</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ <execution>
+ <id>attach-empty-javadoc</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <skipAttach>true</skipAttach>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>2.4.1</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
+ <shadedArtifactAttached>false</shadedArtifactAttached>
+ <createDependencyReducedPom>true</createDependencyReducedPom>
+ <createSourcesJar>true</createSourcesJar>
+ <filters>
+ <filter>
+ <artifact>*:kotlin-runtime</artifact>
+ <excludes>
+ <exclude>META-INF/**</exclude>
+ </excludes>
+ <artifact>*:kotlin-reflect</artifact>
+ <excludes>
+ <exclude>META-INF/**</exclude>
+ </excludes>
+ <artifact>*:kotlin-stdlib</artifact>
+ <excludes>
+ <exclude>META-INF/**</exclude>
+ </excludes>
+ </filter>
+ </filters>
+ <relocations>
+ <relocation>
+ <pattern>com.google</pattern>
+ <shadedPattern>${kotlin.relocated.package}.com.google</shadedPattern>
+ <excludes>
+ <exclude>com.google.protobuf.*</exclude>
+ </excludes>
+ </relocation>
+ <relocation>
+ <pattern>com.sampullara</pattern>
+ <shadedPattern>${kotlin.relocated.package}.com.sampullara</shadedPattern>
+ </relocation>
+ <relocation>
+ <pattern>org.apache</pattern>
+ <shadedPattern>${kotlin.relocated.package}.org.apache</shadedPattern>
+ </relocation>
+ <relocation>
+ <pattern>org.jdom</pattern>
+ <shadedPattern>${kotlin.relocated.package}.org.jdom</shadedPattern>
+ </relocation>
+ <relocation>
+ <pattern>org.fusesource</pattern>
+ <shadedPattern>${kotlin.relocated.package}.org.fusesource</shadedPattern>
+ <excludes>
+ <exclude>org.fusesource.jansi.internal.CLibrary</exclude>
+ </excludes>
+ </relocation>
+ <relocation>
+ <pattern>org.picocontainer</pattern>
+ <shadedPattern>${kotlin.relocated.package}.org.picocontainer</shadedPattern>
+ </relocation>
+ <relocation>
+ <pattern>jline</pattern>
+ <shadedPattern>${kotlin.relocated.package}.jline</shadedPattern>
+ </relocation>
+ <relocation>
+ <pattern>gnu</pattern>
+ <shadedPattern>${kotlin.relocated.package}.gnu</shadedPattern>
+ </relocation>
+ <relocation>
+ <pattern>javax.inject</pattern>
+ <shadedPattern>${kotlin.relocated.package}.javax.inject</shadedPattern>
+ </relocation>
+ </relocations>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-maven-plugin</artifactId>
+ <version>${project.version}</version>
+ <executions>
+ <execution>
+ <id>test-compile</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test-compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${surefire-version}</version>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <systemPropertyVariables>
+ <compilerJar>${artifactId}-${parent.version}.jar</compilerJar>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.11</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <artifactId>hamcrest-core</artifactId>
+ <groupId>org.hamcrest</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ <properties>
+ <kotlin.relocated.package>org.jetbrains.kotlin.relocated</kotlin.relocated.package>
+ <maven-plugin-anno.version>1.4.1</maven-plugin-anno.version>
+ <maven.version>3.0.4</maven.version>
+ <surefire-version>2.16</surefire-version>
+ </properties>
+</project>
+
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.0.2/kotlin-compiler-embeddable-1.0.2.pom.sha1 b/common/m2/repository/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.0.2/kotlin-compiler-embeddable-1.0.2.pom.sha1
new file mode 100644
index 0000000..af84506
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.0.2/kotlin-compiler-embeddable-1.0.2.pom.sha1
@@ -0,0 +1 @@
+f8f92d5960a0249abcb34c3a612edeb5e1d68405
\ No newline at end of file
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.0.2/kotlin-gradle-plugin-api-1.0.2.jar b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.0.2/kotlin-gradle-plugin-api-1.0.2.jar
new file mode 100644
index 0000000..df441d0
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.0.2/kotlin-gradle-plugin-api-1.0.2.jar
Binary files differ
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.0.2/kotlin-gradle-plugin-api-1.0.2.jar.sha1 b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.0.2/kotlin-gradle-plugin-api-1.0.2.jar.sha1
new file mode 100644
index 0000000..088b454
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.0.2/kotlin-gradle-plugin-api-1.0.2.jar.sha1
@@ -0,0 +1 @@
+e4fd4b778bb4297306aa62ed9719523bb785cfbc
\ No newline at end of file
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.0.2/kotlin-gradle-plugin-api-1.0.2.pom b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.0.2/kotlin-gradle-plugin-api-1.0.2.pom
new file mode 100644
index 0000000..2bcabff
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.0.2/kotlin-gradle-plugin-api-1.0.2.pom
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <modelVersion>4.0.0</modelVersion>
+ <properties>
+ <maven-plugin-anno.version>1.4.1</maven-plugin-anno.version>
+ <maven.version>3.0.4</maven.version>
+ </properties>
+
+ <parent>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-project</artifactId>
+ <version>1.0.2</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>kotlin-gradle-plugin-api</artifactId>
+ <packaging>jar</packaging>
+
+ <description>Gradle plugin API for Kotlin</description>
+
+ <repositories>
+ <repository>
+ <id>jetbrains-utils</id>
+ <url>http://repository.jetbrains.com/utils</url>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-stdlib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>gradle-api</artifactId>
+ <version>1.6</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.android.tools.build</groupId>
+ <artifactId>gradle</artifactId>
+ <version>0.4.2</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
+
+ <plugins>
+ <plugin>
+ <artifactId>kotlin-maven-plugin</artifactId>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <version>${project.version}</version>
+
+ <executions>
+ <execution>
+ <id>compile</id>
+ <phase>compile</phase>
+ <goals> <goal>compile</goal> </goals>
+ </execution>
+
+ <execution>
+ <id>test-compile</id>
+ <phase>test-compile</phase>
+ <goals> <goal>test-compile</goal> </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.0.2/kotlin-gradle-plugin-api-1.0.2.pom.sha1 b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.0.2/kotlin-gradle-plugin-api-1.0.2.pom.sha1
new file mode 100644
index 0000000..87d10dd
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.0.2/kotlin-gradle-plugin-api-1.0.2.pom.sha1
@@ -0,0 +1 @@
+cbda77c294bbbba3a1e75b6480a2dfb300fe17b0
\ No newline at end of file
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-core/1.0.2/kotlin-gradle-plugin-core-1.0.2.jar b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-core/1.0.2/kotlin-gradle-plugin-core-1.0.2.jar
new file mode 100644
index 0000000..a2daec1
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-core/1.0.2/kotlin-gradle-plugin-core-1.0.2.jar
Binary files differ
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-core/1.0.2/kotlin-gradle-plugin-core-1.0.2.jar.sha1 b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-core/1.0.2/kotlin-gradle-plugin-core-1.0.2.jar.sha1
new file mode 100644
index 0000000..5356c75
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-core/1.0.2/kotlin-gradle-plugin-core-1.0.2.jar.sha1
@@ -0,0 +1 @@
+05ce0c7c70e5e226a8640e5be1fbdff25bc491b9
\ No newline at end of file
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-core/1.0.2/kotlin-gradle-plugin-core-1.0.2.pom b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-core/1.0.2/kotlin-gradle-plugin-core-1.0.2.pom
new file mode 100644
index 0000000..ab34a1f
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-core/1.0.2/kotlin-gradle-plugin-core-1.0.2.pom
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+
+ <modelVersion>4.0.0</modelVersion>
+ <properties>
+ <maven.version>3.0.4</maven.version>
+ </properties>
+
+ <parent>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-project</artifactId>
+ <version>1.0.2</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>kotlin-gradle-plugin-core</artifactId>
+ <packaging>jar</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-gradle-plugin-api</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency> <!-- required in runtime -->
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.6</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>gradle-api</artifactId>
+ <version>2.2</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-compiler-embeddable</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-annotation-processing</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-stdlib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+
+ <build>
+ <sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
+
+ <resources>
+ <resource>
+ <directory>${project.basedir}/src/main/resources</directory>
+ </resource>
+ </resources>
+
+ <plugins>
+ <plugin>
+ <artifactId>kotlin-maven-plugin</artifactId>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <version>${project.version}</version>
+
+ <executions>
+ <execution>
+ <id>compile</id>
+ <phase>compile</phase>
+ <goals> <goal>compile</goal> </goals>
+ </execution>
+
+ <execution>
+ <id>test-compile</id>
+ <phase>test-compile</phase>
+ <goals> <goal>test-compile</goal> </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <repositories>
+ <repository>
+ <id>jetbrains-utils</id>
+ <url>http://repository.jetbrains.com/utils</url>
+ </repository>
+ </repositories>
+</project>
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-core/1.0.2/kotlin-gradle-plugin-core-1.0.2.pom.sha1 b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-core/1.0.2/kotlin-gradle-plugin-core-1.0.2.pom.sha1
new file mode 100644
index 0000000..ac315ae
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin-core/1.0.2/kotlin-gradle-plugin-core-1.0.2.pom.sha1
@@ -0,0 +1 @@
+5d813949c72496e7fc4ab0eeda123dd54d1d977b
\ No newline at end of file
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.2/kotlin-gradle-plugin-1.0.2.jar b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.2/kotlin-gradle-plugin-1.0.2.jar
new file mode 100644
index 0000000..258e0a2
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.2/kotlin-gradle-plugin-1.0.2.jar
Binary files differ
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.2/kotlin-gradle-plugin-1.0.2.jar.sha1 b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.2/kotlin-gradle-plugin-1.0.2.jar.sha1
new file mode 100644
index 0000000..8394633
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.2/kotlin-gradle-plugin-1.0.2.jar.sha1
@@ -0,0 +1 @@
+05debd813305c36f1c61d18110fdc13a5f663bbd
\ No newline at end of file
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.2/kotlin-gradle-plugin-1.0.2.pom b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.2/kotlin-gradle-plugin-1.0.2.pom
new file mode 100644
index 0000000..31b602e
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.2/kotlin-gradle-plugin-1.0.2.pom
@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+
+ <modelVersion>4.0.0</modelVersion>
+ <properties>
+ <maven.version>3.0.4</maven.version>
+ </properties>
+
+ <parent>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-project</artifactId>
+ <version>1.0.2</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>kotlin-gradle-plugin</artifactId>
+ <packaging>jar</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-stdlib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-android-extensions</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.android.tools.build</groupId>
+ <artifactId>gradle</artifactId>
+ <version>1.1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>gradle-api</artifactId>
+ <version>2.2</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-gradle-plugin-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-gradle-plugin-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-gradle-subplugin-example</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-build-common-test</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+
+ <build>
+ <sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
+ <testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
+
+ <resources>
+ <resource>
+ <directory>${project.basedir}/src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+
+ <plugins>
+ <plugin>
+ <artifactId>kotlin-maven-plugin</artifactId>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <version>${project.version}</version>
+
+ <executions>
+ <execution>
+ <id>compile</id>
+ <phase>compile</phase>
+ <goals> <goal>compile</goal> </goals>
+ <configuration>
+ <sourceDirs>
+ <sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
+ </sourceDirs>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>test-compile</id>
+ <phase>test-compile</phase>
+ <goals> <goal>test-compile</goal> </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <!-- Invoker plugin maintains local maven repository in local-repo for gradle integration tests -->
+ <artifactId>maven-invoker-plugin</artifactId>
+ <version>1.8</version>
+ <configuration>
+ <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+ <localRepositoryPath>local-repo</localRepositoryPath>
+ <postBuildHookScript>verify</postBuildHookScript> <!-- no extension required -->
+ <extraArtifacts>
+ <extraArtifact>org.jetbrains.kotlin:kotlin-gradle-plugin-core:${project.version}</extraArtifact>
+ <extraArtifact>org.jetbrains.kotlin:kotlin-js-library:${project.version}</extraArtifact>
+ </extraArtifacts>
+ </configuration>
+ <executions>
+ <execution>
+ <id>create_local</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>install</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.gmaven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <version>1.5</version>
+ <configuration>
+ <providerSelection>2.0</providerSelection>
+ <source/>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>process-sources</phase>
+ <goals> <goal>compile</goal></goals>
+ <configuration>
+ <sources>
+ <fileset>
+ <directory>${project.basedir}/src/main/kotlin</directory>
+ <includes>
+ <include>**/*.groovy</include>
+ </includes>
+ </fileset>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <repositories>
+ <repository>
+ <id>jetbrains-utils</id>
+ <url>http://repository.jetbrains.com/utils</url>
+ </repository>
+ <repository>
+ <id>central</id>
+ <name>bintray</name>
+ <url>http://jcenter.bintray.com</url>
+ </repository>
+ </repositories>
+</project>
\ No newline at end of file
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.2/kotlin-gradle-plugin-1.0.2.pom.sha1 b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.2/kotlin-gradle-plugin-1.0.2.pom.sha1
new file mode 100644
index 0000000..0c0dc14
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.2/kotlin-gradle-plugin-1.0.2.pom.sha1
@@ -0,0 +1 @@
+d76e28eabc93499d9840576460a067678e52c564
\ No newline at end of file
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-project/1.0.2/_remote.repositories b/common/m2/repository/org/jetbrains/kotlin/kotlin-project/1.0.2/_remote.repositories
new file mode 100644
index 0000000..47ccfb4
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-project/1.0.2/_remote.repositories
@@ -0,0 +1,3 @@
+#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
+#Thu Jun 16 22:26:05 PDT 2016
+kotlin-project-1.0.2.pom>central=
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-project/1.0.2/kotlin-project-1.0.2.pom b/common/m2/repository/org/jetbrains/kotlin/kotlin-project/1.0.2/kotlin-project-1.0.2.pom
new file mode 100644
index 0000000..5e36683
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-project/1.0.2/kotlin-project-1.0.2.pom
@@ -0,0 +1,275 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-project</artifactId>
+ <version>1.0.2</version>
+ <packaging>pom</packaging>
+
+ <name>Kotlin</name>
+ <description>Kotlin is a statically typed programming language that compiles to JVM byte codes and JavaScript</description>
+ <url>http://kotlinlang.org/</url>
+
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ <comments>A business-friendly OSS license</comments>
+ </license>
+ </licenses>
+
+ <scm>
+ <url>https://github.com/JetBrains/kotlin</url>
+ <connection>scm:git:https://github.com/JetBrains/kotlin.git</connection>
+ <developerConnection>scm:git:https://github.com/JetBrains/kotlin.git</developerConnection>
+ </scm>
+
+ <developers>
+ <developer>
+ <id>JetBrains</id>
+ <name>JetBrains Team</name>
+ <organization>JetBrains</organization>
+ <organizationUrl>http://www.jetbrains.com</organizationUrl>
+ </developer>
+ </developers>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project-root>../../..</project-root>
+
+ <junit-version>4.11</junit-version>
+ <pegdown.version>1.1.0</pegdown.version>
+ <surefire-version>2.16</surefire-version>
+ <exec-maven-plugin.version>1.2.1</exec-maven-plugin.version>
+ <selenium.version>2.37.1</selenium.version>
+
+ <kotlin-dist>${project-root}/dist</kotlin-dist>
+ <kotlin-sdk>${kotlin-dist}/kotlinc</kotlin-sdk>
+
+ <maven.compiler.source>1.6</maven.compiler.source>
+ <maven.compiler.target>1.6</maven.compiler.target>
+ </properties>
+
+ <prerequisites>
+ <maven>3.0.2</maven>
+ </prerequisites>
+
+ <distributionManagement>
+ <repository>
+ <id>${deploy-repo}</id>
+ <url>${deploy-url}</url>
+ </repository>
+ <snapshotRepository>
+ <id>sonatype-nexus-staging</id>
+ <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+ <modules>
+ <module>tools/kotlin-compiler</module>
+ <module>tools/kotlin-compiler-embeddable</module>
+ <module>tools/kotlin-build-common</module>
+ <module>tools/kotlin-build-common-test</module>
+ <module>tools/kotlin-maven-plugin</module>
+
+ <module>tools/runtime</module>
+ <module>stdlib</module>
+ <module>tools/kotlin-reflect</module>
+ <module>tools/kotlin-osgi-bundle</module>
+
+ <module>tools/maven-archetypes</module>
+
+ <module>tools/binary-compatibility-validator</module>
+
+ <!--NB! kotlin-js-library should be built before kotlin-gradle-plugin-->
+ <!--because it is used in tests but cannot be added as test-dependency-->
+ <!--(kotlin-gradle-plugin module will be recognized as kotlin-js module)-->
+ <module>tools/idl2k</module>
+ <module>tools/kotlin-js-library</module>
+ <module>tools/kotlin-annotation-processing</module>
+ <module>examples/annotation-processor-example</module>
+ <module>tools/kotlin-gradle-plugin</module>
+ <module>tools/kotlin-gradle-plugin-core</module>
+ <module>tools/kotlin-gradle-plugin-api</module>
+ <module>tools/kotlin-android-extensions</module>
+ <module>tools/kotlin-maven-plugin-test</module>
+ <module>tools/kotlin-js-tests</module>
+ <module>tools/kotlin-js-tests-junit</module>
+
+ <module>kotlin.test</module>
+
+ <module>examples/kotlin-java-example</module>
+ <module>examples/js-example</module>
+ <module>examples/kotlin-js-library-example</module>
+ <module>examples/browser-example</module>
+ <module>examples/browser-example-with-library</module>
+ <module>examples/kotlin-gradle-subplugin-example</module>
+ </modules>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit-version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>${maven.compiler.source}</source>
+ <target>${maven.compiler.target}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.1.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.9</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.7</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.7</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${surefire-version}</version>
+ <configuration>
+ <forkMode>once</forkMode>
+ <useSystemClassLoader>false</useSystemClassLoader>
+ <useManifestOnlyJar>false</useManifestOnlyJar>
+ <failIfNoTests>false</failIfNoTests>
+ <includes>
+ <include>**/*Test.*</include>
+ </includes>
+ <excludes>
+ </excludes>
+ <systemProperties>
+ <project.version>${project.version}</project.version>
+ </systemProperties>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <configuration>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar-no-fork</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-empty-javadoc</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${highest-basedir}/lib/empty-javadoc.jar</file>
+ <type>jar</type>
+ <classifier>javadoc</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.commonjava.maven.plugins</groupId>
+ <artifactId>directory-maven-plugin</artifactId>
+ <version>0.1</version>
+ <executions>
+ <execution>
+ <id>directories</id>
+ <goals>
+ <goal>highest-basedir</goal>
+ </goals>
+ <phase>initialize</phase>
+ <configuration>
+ <property>highest-basedir</property>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>sign-artifacts</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <version>1.4</version>
+ <configuration>
+ <passphrase>${kotlin.key.passphrase}</passphrase>
+ <keyname>${kotlin.key.name}</keyname>
+ <homedir>${highest-basedir}/.gnupg</homedir>
+ </configuration>
+ <executions>
+ <execution>
+ <id>sign-artifacts</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-project/1.0.2/kotlin-project-1.0.2.pom.sha1 b/common/m2/repository/org/jetbrains/kotlin/kotlin-project/1.0.2/kotlin-project-1.0.2.pom.sha1
new file mode 100644
index 0000000..23aab2d
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-project/1.0.2/kotlin-project-1.0.2.pom.sha1
@@ -0,0 +1 @@
+aba1496558cf2840efa5ed7e370574e6ab5fc9eb
\ No newline at end of file
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-runtime/1.0.2/kotlin-runtime-1.0.2.jar b/common/m2/repository/org/jetbrains/kotlin/kotlin-runtime/1.0.2/kotlin-runtime-1.0.2.jar
new file mode 100644
index 0000000..6298865
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-runtime/1.0.2/kotlin-runtime-1.0.2.jar
Binary files differ
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-runtime/1.0.2/kotlin-runtime-1.0.2.jar.sha1 b/common/m2/repository/org/jetbrains/kotlin/kotlin-runtime/1.0.2/kotlin-runtime-1.0.2.jar.sha1
new file mode 100644
index 0000000..af0967f
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-runtime/1.0.2/kotlin-runtime-1.0.2.jar.sha1
@@ -0,0 +1 @@
+8ec2d49a780ddba5e9b6860a72969e4d5bbc0c55
\ No newline at end of file
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-runtime/1.0.2/kotlin-runtime-1.0.2.pom b/common/m2/repository/org/jetbrains/kotlin/kotlin-runtime/1.0.2/kotlin-runtime-1.0.2.pom
new file mode 100644
index 0000000..bd66d95
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-runtime/1.0.2/kotlin-runtime-1.0.2.pom
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-project</artifactId>
+ <version>1.0.2</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>kotlin-runtime</artifactId>
+ <packaging>jar</packaging>
+
+ <build>
+ <sourceDirectory>target/copied-sources</sourceDirectory>
+
+ <resources>
+ <resource>
+ <directory>${basedir}/../../../dist/builtins</directory>
+ <includes>
+ <include>**/*.kotlin_builtins</include>
+ </includes>
+ </resource>
+ </resources>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.7</version>
+
+ <executions>
+ <execution>
+ <id>copy-sources</id>
+ <phase>process-sources</phase>
+ <configuration>
+ <target>
+ <delete dir="${basedir}/target/copied-sources" failonerror="false"/>
+ <copy todir="${basedir}/target/copied-sources">
+ <fileset dir="${basedir}/../../../core/builtins/src"/>
+ <fileset dir="${basedir}/../../../core/runtime.jvm/src"/>
+ </copy>
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.7</version>
+ <executions>
+ <execution>
+ <id>attach-empty-javadoc</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <skipAttach>true</skipAttach>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-maven-plugin</artifactId>
+ <version>${project.version}</version>
+
+ <configuration>
+ <args>
+ <arg>-Xallow-kotlin-package</arg>
+ </args>
+ </configuration>
+
+ <executions>
+ <execution>
+ <id>compile</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ <configuration>
+ <args combine.children="append">
+ <arg>-Xdump-declarations-to</arg>
+ <arg>${basedir}/target/runtime-declarations.json</arg>
+ </args>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-runtime/1.0.2/kotlin-runtime-1.0.2.pom.sha1 b/common/m2/repository/org/jetbrains/kotlin/kotlin-runtime/1.0.2/kotlin-runtime-1.0.2.pom.sha1
new file mode 100644
index 0000000..de8a84f
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-runtime/1.0.2/kotlin-runtime-1.0.2.pom.sha1
@@ -0,0 +1 @@
+ec665b7fadbb91c8be4d247151ce1bc8026f8573
\ No newline at end of file
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.0.2/kotlin-stdlib-1.0.2.jar b/common/m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.0.2/kotlin-stdlib-1.0.2.jar
new file mode 100644
index 0000000..30119c5
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.0.2/kotlin-stdlib-1.0.2.jar
Binary files differ
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.0.2/kotlin-stdlib-1.0.2.jar.sha1 b/common/m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.0.2/kotlin-stdlib-1.0.2.jar.sha1
new file mode 100644
index 0000000..02edc97
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.0.2/kotlin-stdlib-1.0.2.jar.sha1
@@ -0,0 +1 @@
+22063f19bfd8e50f21fc310842a91ff5b31bb272
\ No newline at end of file
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.0.2/kotlin-stdlib-1.0.2.pom b/common/m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.0.2/kotlin-stdlib-1.0.2.pom
new file mode 100644
index 0000000..10c8ae7
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.0.2/kotlin-stdlib-1.0.2.pom
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-project</artifactId>
+ <version>1.0.2</version>
+ </parent>
+
+ <artifactId>kotlin-stdlib</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-runtime</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-test-junit</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ <testSourceDirectory>test</testSourceDirectory>
+
+ <plugins>
+ <plugin>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-maven-plugin</artifactId>
+ <version>${project.version}</version>
+
+ <configuration>
+ <args>
+ <arg>-Xallow-kotlin-package</arg>
+ </args>
+ </configuration>
+
+ <executions>
+ <execution>
+ <id>compile</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ <configuration>
+ <args combine.children="append">
+ <arg>-Xmultifile-parts-inherit</arg>
+ <arg>-Xdump-declarations-to</arg>
+ <arg>${basedir}/target/stdlib-declarations.json</arg>
+ </args>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>test-compile</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>test-compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/common/m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.0.2/kotlin-stdlib-1.0.2.pom.sha1 b/common/m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.0.2/kotlin-stdlib-1.0.2.pom.sha1
new file mode 100644
index 0000000..b7ebbd3
--- /dev/null
+++ b/common/m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.0.2/kotlin-stdlib-1.0.2.pom.sha1
@@ -0,0 +1 @@
+7c21f153a9711f2a1fbc11ccbf9f92c13ff3ba5d
\ No newline at end of file
diff --git a/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/NOTICE b/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/NOTICE
new file mode 100644
index 0000000..1a71c4c
--- /dev/null
+++ b/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/NOTICE
@@ -0,0 +1,27 @@
+ASM: a very small and fast Java bytecode manipulation framework
+Copyright (c) 2000-2011 INRIA, France Telecom
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the copyright holders nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4-sources.jar b/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4-sources.jar
new file mode 100644
index 0000000..c2765f9
--- /dev/null
+++ b/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4-sources.jar
Binary files differ
diff --git a/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4-sources.jar.md5 b/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4-sources.jar.md5
new file mode 100644
index 0000000..fcb712b
--- /dev/null
+++ b/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4-sources.jar.md5
@@ -0,0 +1 @@
+739ae6acf9d4ff279ddd60667fab98b2
\ No newline at end of file
diff --git a/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4-sources.jar.sha1 b/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4-sources.jar.sha1
new file mode 100644
index 0000000..951a8bc
--- /dev/null
+++ b/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4-sources.jar.sha1
@@ -0,0 +1 @@
+112ff54474f1f04ccf1384c92e39fdc566f0bb5e
\ No newline at end of file
diff --git a/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4.jar b/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4.jar
new file mode 100644
index 0000000..6b07e0f
--- /dev/null
+++ b/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4.jar
Binary files differ
diff --git a/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4.jar.md5 b/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4.jar.md5
new file mode 100644
index 0000000..925501a
--- /dev/null
+++ b/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4.jar.md5
@@ -0,0 +1 @@
+9285b14584a3cb7fed4e869d4a4bf864
\ No newline at end of file
diff --git a/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4.jar.sha1 b/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4.jar.sha1
new file mode 100644
index 0000000..b0bada9
--- /dev/null
+++ b/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4.jar.sha1
@@ -0,0 +1 @@
+702b8525fcf81454235e5e2fa2a35f15ffc0ec7e
\ No newline at end of file
diff --git a/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4.pom b/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4.pom
new file mode 100644
index 0000000..77d4cff
--- /dev/null
+++ b/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4.pom
@@ -0,0 +1,45 @@
+<!--
+ ! ASM: a very small and fast Java bytecode manipulation framework
+ ! Copyright (c) 2000-2011 INRIA, France Telecom
+ ! All rights reserved.
+ !
+ ! Redistribution and use in source and binary forms, with or without
+ ! modification, are permitted provided that the following conditions
+ ! are met:
+ ! 1. Redistributions of source code must retain the above copyright
+ ! notice, this list of conditions and the following disclaimer.
+ ! 2. Redistributions in binary form must reproduce the above copyright
+ ! notice, this list of conditions and the following disclaimer in the
+ ! documentation and/or other materials provided with the distribution.
+ ! 3. Neither the name of the copyright holders nor the names of its
+ ! contributors may be used to endorse or promote products derived from
+ ! this software without specific prior written permission.
+ !
+ ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ ! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ ! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ! ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ ! LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ ! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ ! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ ! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ ! THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm-parent</artifactId>
+ <version>5.0.4</version>
+ </parent>
+
+ <name>ASM Debug All</name>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm-debug-all</artifactId>
+ <packaging>jar</packaging>
+
+</project>
diff --git a/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4.pom.md5 b/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4.pom.md5
new file mode 100644
index 0000000..7f2844e
--- /dev/null
+++ b/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4.pom.md5
@@ -0,0 +1 @@
+478be5460c955a95ae520f37cd154844
\ No newline at end of file
diff --git a/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4.pom.sha1 b/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4.pom.sha1
new file mode 100644
index 0000000..e80403c
--- /dev/null
+++ b/common/m2/repository/org/ow2/asm/asm-debug-all/5.0.4/asm-debug-all-5.0.4.pom.sha1
@@ -0,0 +1 @@
+7e83e3be05eae6ababd43829b1900acb2872103f
\ No newline at end of file
diff --git a/common/offline-m2/com/android/databinding/baseLibrary/2.2.0-alpha4/baseLibrary-2.2.0-alpha4.jar b/common/offline-m2/com/android/databinding/baseLibrary/2.2.0-alpha4/baseLibrary-2.2.0-alpha4.jar
index 3ae58ab..b24affe 100644
--- a/common/offline-m2/com/android/databinding/baseLibrary/2.2.0-alpha4/baseLibrary-2.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/databinding/baseLibrary/2.2.0-alpha4/baseLibrary-2.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/databinding/baseLibrary/2.2.0-alpha3/baseLibrary-2.2.0-alpha3.jar b/common/offline-m2/com/android/databinding/baseLibrary/2.2.0-beta1/baseLibrary-2.2.0-beta1.jar
similarity index 75%
rename from common/offline-m2/com/android/databinding/baseLibrary/2.2.0-alpha3/baseLibrary-2.2.0-alpha3.jar
rename to common/offline-m2/com/android/databinding/baseLibrary/2.2.0-beta1/baseLibrary-2.2.0-beta1.jar
index e088529..f6e0263 100644
--- a/common/offline-m2/com/android/databinding/baseLibrary/2.2.0-alpha3/baseLibrary-2.2.0-alpha3.jar
+++ b/common/offline-m2/com/android/databinding/baseLibrary/2.2.0-beta1/baseLibrary-2.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/databinding/baseLibrary/2.2.0-alpha3/baseLibrary-2.2.0-alpha3.pom b/common/offline-m2/com/android/databinding/baseLibrary/2.2.0-beta1/baseLibrary-2.2.0-beta1.pom
similarity index 96%
rename from common/offline-m2/com/android/databinding/baseLibrary/2.2.0-alpha3/baseLibrary-2.2.0-alpha3.pom
rename to common/offline-m2/com/android/databinding/baseLibrary/2.2.0-beta1/baseLibrary-2.2.0-beta1.pom
index d751222..a6766b7 100644
--- a/common/offline-m2/com/android/databinding/baseLibrary/2.2.0-alpha3/baseLibrary-2.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/databinding/baseLibrary/2.2.0-beta1/baseLibrary-2.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.databinding</groupId>
<artifactId>baseLibrary</artifactId>
- <version>2.2.0-alpha3</version>
+ <version>2.2.0-beta1</version>
<name>Data Binding Base Library</name>
<description>Shared library between Data Binding runtime lib and compiler</description>
<url>http://tools.android.com</url>
diff --git a/common/offline-m2/com/android/databinding/compiler/2.2.0-alpha4/compiler-2.2.0-alpha4.jar b/common/offline-m2/com/android/databinding/compiler/2.2.0-alpha4/compiler-2.2.0-alpha4.jar
index a875ae0..690e41a 100644
--- a/common/offline-m2/com/android/databinding/compiler/2.2.0-alpha4/compiler-2.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/databinding/compiler/2.2.0-alpha4/compiler-2.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/databinding/compiler/2.2.0-alpha4/compiler-2.2.0-alpha4.pom b/common/offline-m2/com/android/databinding/compiler/2.2.0-alpha4/compiler-2.2.0-alpha4.pom
index eb93bea..6749464 100644
--- a/common/offline-m2/com/android/databinding/compiler/2.2.0-alpha4/compiler-2.2.0-alpha4.pom
+++ b/common/offline-m2/com/android/databinding/compiler/2.2.0-alpha4/compiler-2.2.0-alpha4.pom
@@ -45,34 +45,34 @@
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.databinding</groupId>
- <artifactId>compilerCommon</artifactId>
- <version>2.2.0-alpha4</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.10</version>
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.databinding</groupId>
- <artifactId>baseLibrary</artifactId>
- <version>2.2.0-alpha4</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
<scope>compile</scope>
</dependency>
<dependency>
+ <groupId>com.android.databinding</groupId>
+ <artifactId>baseLibrary</artifactId>
+ <version>2.2.0-alpha4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>com.android.databinding</groupId>
+ <artifactId>compilerCommon</artifactId>
+ <version>2.2.0-alpha4</version>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/common/offline-m2/com/android/databinding/compiler/2.2.0-alpha3/compiler-2.2.0-alpha3.jar b/common/offline-m2/com/android/databinding/compiler/2.2.0-beta1/compiler-2.2.0-beta1.jar
similarity index 95%
rename from common/offline-m2/com/android/databinding/compiler/2.2.0-alpha3/compiler-2.2.0-alpha3.jar
rename to common/offline-m2/com/android/databinding/compiler/2.2.0-beta1/compiler-2.2.0-beta1.jar
index 103bf80..949ab21 100644
--- a/common/offline-m2/com/android/databinding/compiler/2.2.0-alpha3/compiler-2.2.0-alpha3.jar
+++ b/common/offline-m2/com/android/databinding/compiler/2.2.0-beta1/compiler-2.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/databinding/compiler/2.2.0-alpha3/compiler-2.2.0-alpha3.pom b/common/offline-m2/com/android/databinding/compiler/2.2.0-beta1/compiler-2.2.0-beta1.pom
similarity index 95%
rename from common/offline-m2/com/android/databinding/compiler/2.2.0-alpha3/compiler-2.2.0-alpha3.pom
rename to common/offline-m2/com/android/databinding/compiler/2.2.0-beta1/compiler-2.2.0-beta1.pom
index 15c442d..4d15d00 100644
--- a/common/offline-m2/com/android/databinding/compiler/2.2.0-alpha3/compiler-2.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/databinding/compiler/2.2.0-beta1/compiler-2.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.databinding</groupId>
<artifactId>compiler</artifactId>
- <version>2.2.0-alpha3</version>
+ <version>2.2.0-beta1</version>
<name>Data Binding Annotation Processor</name>
<description>The annotation processor for Data Binding. Generates binding classes for runtime.</description>
<url>http://tools.android.com</url>
@@ -27,18 +27,18 @@
</scm>
<dependencies>
<dependency>
- <groupId>com.android.databinding</groupId>
- <artifactId>compilerCommon</artifactId>
- <version>2.2.0-alpha3</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4</artifactId>
<version>4.5.3</version>
<scope>compile</scope>
</dependency>
<dependency>
+ <groupId>com.android.databinding</groupId>
+ <artifactId>compilerCommon</artifactId>
+ <version>2.2.0-beta1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
@@ -63,15 +63,15 @@
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>org.jetbrains.kotlin</groupId>
- <artifactId>kotlin-stdlib</artifactId>
- <version>1.0.0</version>
+ <groupId>com.android.databinding</groupId>
+ <artifactId>baseLibrary</artifactId>
+ <version>2.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.databinding</groupId>
- <artifactId>baseLibrary</artifactId>
- <version>2.2.0-alpha3</version>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-stdlib</artifactId>
+ <version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
diff --git a/common/offline-m2/com/android/databinding/compilerCommon/2.2.0-alpha4/compilerCommon-2.2.0-alpha4.jar b/common/offline-m2/com/android/databinding/compilerCommon/2.2.0-alpha4/compilerCommon-2.2.0-alpha4.jar
index 17c8345..c824ef4 100644
--- a/common/offline-m2/com/android/databinding/compilerCommon/2.2.0-alpha4/compilerCommon-2.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/databinding/compilerCommon/2.2.0-alpha4/compilerCommon-2.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/databinding/compilerCommon/2.2.0-alpha4/compilerCommon-2.2.0-alpha4.pom b/common/offline-m2/com/android/databinding/compilerCommon/2.2.0-alpha4/compilerCommon-2.2.0-alpha4.pom
index 8e5fc71..1e55e2f 100644
--- a/common/offline-m2/com/android/databinding/compilerCommon/2.2.0-alpha4/compilerCommon-2.2.0-alpha4.pom
+++ b/common/offline-m2/com/android/databinding/compilerCommon/2.2.0-alpha4/compilerCommon-2.2.0-alpha4.pom
@@ -57,16 +57,16 @@
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.databinding</groupId>
- <artifactId>baseLibrary</artifactId>
- <version>2.2.0-alpha4</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>com.android.databinding</groupId>
+ <artifactId>baseLibrary</artifactId>
+ <version>2.2.0-alpha4</version>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/common/offline-m2/com/android/databinding/compilerCommon/2.2.0-alpha3/compilerCommon-2.2.0-alpha3.jar b/common/offline-m2/com/android/databinding/compilerCommon/2.2.0-beta1/compilerCommon-2.2.0-beta1.jar
similarity index 92%
rename from common/offline-m2/com/android/databinding/compilerCommon/2.2.0-alpha3/compilerCommon-2.2.0-alpha3.jar
rename to common/offline-m2/com/android/databinding/compilerCommon/2.2.0-beta1/compilerCommon-2.2.0-beta1.jar
index 841b79c..e5e25ae 100644
--- a/common/offline-m2/com/android/databinding/compilerCommon/2.2.0-alpha3/compilerCommon-2.2.0-alpha3.jar
+++ b/common/offline-m2/com/android/databinding/compilerCommon/2.2.0-beta1/compilerCommon-2.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/databinding/compilerCommon/2.2.0-alpha3/compilerCommon-2.2.0-alpha3.pom b/common/offline-m2/com/android/databinding/compilerCommon/2.2.0-beta1/compilerCommon-2.2.0-beta1.pom
similarity index 96%
rename from common/offline-m2/com/android/databinding/compilerCommon/2.2.0-alpha3/compilerCommon-2.2.0-alpha3.pom
rename to common/offline-m2/com/android/databinding/compilerCommon/2.2.0-beta1/compilerCommon-2.2.0-beta1.pom
index b4e17d9..39bc9ba 100644
--- a/common/offline-m2/com/android/databinding/compilerCommon/2.2.0-alpha3/compilerCommon-2.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/databinding/compilerCommon/2.2.0-beta1/compilerCommon-2.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.databinding</groupId>
<artifactId>compilerCommon</artifactId>
- <version>2.2.0-alpha3</version>
+ <version>2.2.0-beta1</version>
<name>Data Binding Compiler Common</name>
<description>Common library that can be shared between different build tools</description>
<url>http://tools.android.com</url>
@@ -65,7 +65,7 @@
<dependency>
<groupId>com.android.databinding</groupId>
<artifactId>baseLibrary</artifactId>
- <version>2.2.0-alpha3</version>
+ <version>2.2.0-beta1</version>
<scope>compile</scope>
</dependency>
</dependencies>
diff --git a/common/offline-m2/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha4/constraint-layout-solver-1.0.0-alpha4.jar b/common/offline-m2/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha4/constraint-layout-solver-1.0.0-alpha4.jar
new file mode 100644
index 0000000..10bdbf0
--- /dev/null
+++ b/common/offline-m2/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha4/constraint-layout-solver-1.0.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha4/constraint-layout-solver-1.0.0-alpha4.jar.md5 b/common/offline-m2/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha4/constraint-layout-solver-1.0.0-alpha4.jar.md5
new file mode 100644
index 0000000..f58967f
--- /dev/null
+++ b/common/offline-m2/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha4/constraint-layout-solver-1.0.0-alpha4.jar.md5
@@ -0,0 +1 @@
+4748d407a5c48a70367c670d5b5ff2f9
\ No newline at end of file
diff --git a/common/offline-m2/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha4/constraint-layout-solver-1.0.0-alpha4.jar.sha1 b/common/offline-m2/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha4/constraint-layout-solver-1.0.0-alpha4.jar.sha1
new file mode 100644
index 0000000..6e553aa
--- /dev/null
+++ b/common/offline-m2/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha4/constraint-layout-solver-1.0.0-alpha4.jar.sha1
@@ -0,0 +1 @@
+181f2d21b10d80b77b7c36e4a940379a7f5a7c29
\ No newline at end of file
diff --git a/common/offline-m2/com/android/databinding/baseLibrary/2.2.0-alpha3/baseLibrary-2.2.0-alpha3.pom b/common/offline-m2/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha4/constraint-layout-solver-1.0.0-alpha4.pom
similarity index 61%
copy from common/offline-m2/com/android/databinding/baseLibrary/2.2.0-alpha3/baseLibrary-2.2.0-alpha3.pom
copy to common/offline-m2/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha4/constraint-layout-solver-1.0.0-alpha4.pom
index d751222..c30c1ae 100644
--- a/common/offline-m2/com/android/databinding/baseLibrary/2.2.0-alpha3/baseLibrary-2.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha4/constraint-layout-solver-1.0.0-alpha4.pom
@@ -2,11 +2,11 @@
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <groupId>com.android.databinding</groupId>
- <artifactId>baseLibrary</artifactId>
- <version>2.2.0-alpha3</version>
- <name>Data Binding Base Library</name>
- <description>Shared library between Data Binding runtime lib and compiler</description>
+ <groupId>com.android.support.constraint</groupId>
+ <artifactId>constraint-layout-solver</artifactId>
+ <version>1.0.0-alpha4</version>
+ <name>Android ConstraintLayout Solver</name>
+ <description>Solver for ConstraintLayout</description>
<url>http://tools.android.com</url>
<inceptionYear>2007</inceptionYear>
<licenses>
@@ -22,14 +22,14 @@
</developer>
</developers>
<scm>
- <connection>git://android.googlesource.com/platform/tools/base.git</connection>
- <url>https://android.googlesource.com/platform/tools/base</url>
+ <connection>git://android.googlesource.com/platform/tools/sherpa.git</connection>
+ <url>https://android.googlesource.com/platform/tools/sherpa</url>
</scm>
<dependencies>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.12</version>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>6.9.10</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/common/offline-m2/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha4/constraint-layout-solver-1.0.0-alpha4.pom.md5 b/common/offline-m2/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha4/constraint-layout-solver-1.0.0-alpha4.pom.md5
new file mode 100644
index 0000000..9c863f3
--- /dev/null
+++ b/common/offline-m2/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha4/constraint-layout-solver-1.0.0-alpha4.pom.md5
@@ -0,0 +1 @@
+db341de90dde2b42e6df8c3c35dccf40
\ No newline at end of file
diff --git a/common/offline-m2/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha4/constraint-layout-solver-1.0.0-alpha4.pom.sha1 b/common/offline-m2/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha4/constraint-layout-solver-1.0.0-alpha4.pom.sha1
new file mode 100644
index 0000000..f538cda
--- /dev/null
+++ b/common/offline-m2/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha4/constraint-layout-solver-1.0.0-alpha4.pom.sha1
@@ -0,0 +1 @@
+0be0e96c98baf00595247bc586403a0c6f17921f
\ No newline at end of file
diff --git a/common/offline-m2/com/android/support/constraint/constraint-layout-solver/maven-metadata.xml b/common/offline-m2/com/android/support/constraint/constraint-layout-solver/maven-metadata.xml
index 6c544ed..0f6a51e 100644
--- a/common/offline-m2/com/android/support/constraint/constraint-layout-solver/maven-metadata.xml
+++ b/common/offline-m2/com/android/support/constraint/constraint-layout-solver/maven-metadata.xml
@@ -3,12 +3,13 @@
<groupId>com.android.support.constraint</groupId>
<artifactId>constraint-layout-solver</artifactId>
<versioning>
- <release>1.0.0-alpha3</release>
+ <release>1.0.0-alpha4</release>
<versions>
<version>1.0.0-alpha1</version>
<version>1.0.0-alpha2</version>
<version>1.0.0-alpha3</version>
+ <version>1.0.0-alpha4</version>
</versions>
- <lastUpdated>20160531232605</lastUpdated>
+ <lastUpdated>20160626174109</lastUpdated>
</versioning>
</metadata>
diff --git a/common/offline-m2/com/android/support/constraint/constraint-layout-solver/maven-metadata.xml.md5 b/common/offline-m2/com/android/support/constraint/constraint-layout-solver/maven-metadata.xml.md5
index 4b764a2..aefcb01 100644
--- a/common/offline-m2/com/android/support/constraint/constraint-layout-solver/maven-metadata.xml.md5
+++ b/common/offline-m2/com/android/support/constraint/constraint-layout-solver/maven-metadata.xml.md5
@@ -1 +1 @@
-d01884df516899a39add1e1c8303f225
\ No newline at end of file
+a887f95d9fb0733339946763e0c74046
\ No newline at end of file
diff --git a/common/offline-m2/com/android/support/constraint/constraint-layout-solver/maven-metadata.xml.sha1 b/common/offline-m2/com/android/support/constraint/constraint-layout-solver/maven-metadata.xml.sha1
index 2f8fbb7..5ac0929 100644
--- a/common/offline-m2/com/android/support/constraint/constraint-layout-solver/maven-metadata.xml.sha1
+++ b/common/offline-m2/com/android/support/constraint/constraint-layout-solver/maven-metadata.xml.sha1
@@ -1 +1 @@
-afbffd17e8597b9c95003b9189d8f11145a03206
\ No newline at end of file
+1400ec322abd21871724bee51d88fca89c3da296
\ No newline at end of file
diff --git a/common/offline-m2/com/android/support/constraint/constraint-layout/1.0.0-alpha4/constraint-layout-1.0.0-alpha4.aar b/common/offline-m2/com/android/support/constraint/constraint-layout/1.0.0-alpha4/constraint-layout-1.0.0-alpha4.aar
new file mode 100644
index 0000000..837c69c
--- /dev/null
+++ b/common/offline-m2/com/android/support/constraint/constraint-layout/1.0.0-alpha4/constraint-layout-1.0.0-alpha4.aar
Binary files differ
diff --git a/common/offline-m2/com/android/support/constraint/constraint-layout/1.0.0-alpha4/constraint-layout-1.0.0-alpha4.aar.md5 b/common/offline-m2/com/android/support/constraint/constraint-layout/1.0.0-alpha4/constraint-layout-1.0.0-alpha4.aar.md5
new file mode 100644
index 0000000..ba4baa2
--- /dev/null
+++ b/common/offline-m2/com/android/support/constraint/constraint-layout/1.0.0-alpha4/constraint-layout-1.0.0-alpha4.aar.md5
@@ -0,0 +1 @@
+0b6eb33a7562e298866699f84f49cfcb
\ No newline at end of file
diff --git a/common/offline-m2/com/android/support/constraint/constraint-layout/1.0.0-alpha4/constraint-layout-1.0.0-alpha4.aar.sha1 b/common/offline-m2/com/android/support/constraint/constraint-layout/1.0.0-alpha4/constraint-layout-1.0.0-alpha4.aar.sha1
new file mode 100644
index 0000000..d461b2e
--- /dev/null
+++ b/common/offline-m2/com/android/support/constraint/constraint-layout/1.0.0-alpha4/constraint-layout-1.0.0-alpha4.aar.sha1
@@ -0,0 +1 @@
+741f3863eda276f59c1d4b07d4878a0ba5122fa2
\ No newline at end of file
diff --git a/common/offline-m2/com/android/support/constraint/constraint-layout/1.0.0-alpha4/constraint-layout-1.0.0-alpha4.pom b/common/offline-m2/com/android/support/constraint/constraint-layout/1.0.0-alpha4/constraint-layout-1.0.0-alpha4.pom
new file mode 100644
index 0000000..04fbfa5
--- /dev/null
+++ b/common/offline-m2/com/android/support/constraint/constraint-layout/1.0.0-alpha4/constraint-layout-1.0.0-alpha4.pom
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.android.support.constraint</groupId>
+ <artifactId>constraint-layout</artifactId>
+ <version>1.0.0-alpha4</version>
+ <packaging>aar</packaging>
+ <name>Android ConstraintLayout</name>
+ <description>ConstraintLayout for Android</description>
+ <url>http://tools.android.com</url>
+ <inceptionYear>2007</inceptionYear>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <developers>
+ <developer>
+ <name>The Android Open Source Project</name>
+ </developer>
+ </developers>
+ <scm>
+ <connection>git://android.googlesource.com/platform/tools/sherpa.git</connection>
+ <url>https://android.googlesource.com/platform/tools/sherpa</url>
+ </scm>
+ <dependencies>
+ <dependency>
+ <groupId>com.android.support.constraint</groupId>
+ <artifactId>constraint-layout-solver</artifactId>
+ <version>1.0.0-alpha4</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/common/offline-m2/com/android/support/constraint/constraint-layout/1.0.0-alpha4/constraint-layout-1.0.0-alpha4.pom.md5 b/common/offline-m2/com/android/support/constraint/constraint-layout/1.0.0-alpha4/constraint-layout-1.0.0-alpha4.pom.md5
new file mode 100644
index 0000000..86652f5
--- /dev/null
+++ b/common/offline-m2/com/android/support/constraint/constraint-layout/1.0.0-alpha4/constraint-layout-1.0.0-alpha4.pom.md5
@@ -0,0 +1 @@
+ee815137faa2c85f346c6a9b9e40a1d8
\ No newline at end of file
diff --git a/common/offline-m2/com/android/support/constraint/constraint-layout/1.0.0-alpha4/constraint-layout-1.0.0-alpha4.pom.sha1 b/common/offline-m2/com/android/support/constraint/constraint-layout/1.0.0-alpha4/constraint-layout-1.0.0-alpha4.pom.sha1
new file mode 100644
index 0000000..d4a8a57
--- /dev/null
+++ b/common/offline-m2/com/android/support/constraint/constraint-layout/1.0.0-alpha4/constraint-layout-1.0.0-alpha4.pom.sha1
@@ -0,0 +1 @@
+c04c06546856a948f2fba1725e434562f7ac3c6c
\ No newline at end of file
diff --git a/common/offline-m2/com/android/support/constraint/constraint-layout/maven-metadata.xml b/common/offline-m2/com/android/support/constraint/constraint-layout/maven-metadata.xml
index 5ebc82f..396cddd 100644
--- a/common/offline-m2/com/android/support/constraint/constraint-layout/maven-metadata.xml
+++ b/common/offline-m2/com/android/support/constraint/constraint-layout/maven-metadata.xml
@@ -3,12 +3,13 @@
<groupId>com.android.support.constraint</groupId>
<artifactId>constraint-layout</artifactId>
<versioning>
- <release>1.0.0-alpha3</release>
+ <release>1.0.0-alpha4</release>
<versions>
<version>1.0.0-alpha1</version>
<version>1.0.0-alpha2</version>
<version>1.0.0-alpha3</version>
+ <version>1.0.0-alpha4</version>
</versions>
- <lastUpdated>20160531232605</lastUpdated>
+ <lastUpdated>20160626174109</lastUpdated>
</versioning>
</metadata>
diff --git a/common/offline-m2/com/android/support/constraint/constraint-layout/maven-metadata.xml.md5 b/common/offline-m2/com/android/support/constraint/constraint-layout/maven-metadata.xml.md5
index c8bf1bc..40e3d98 100644
--- a/common/offline-m2/com/android/support/constraint/constraint-layout/maven-metadata.xml.md5
+++ b/common/offline-m2/com/android/support/constraint/constraint-layout/maven-metadata.xml.md5
@@ -1 +1 @@
-26d6a2dadc96787ded15318cf3dcf299
\ No newline at end of file
+965b33c40eef57c71cf08101ad2b63fe
\ No newline at end of file
diff --git a/common/offline-m2/com/android/support/constraint/constraint-layout/maven-metadata.xml.sha1 b/common/offline-m2/com/android/support/constraint/constraint-layout/maven-metadata.xml.sha1
index 81d0f07..b4544a0 100644
--- a/common/offline-m2/com/android/support/constraint/constraint-layout/maven-metadata.xml.sha1
+++ b/common/offline-m2/com/android/support/constraint/constraint-layout/maven-metadata.xml.sha1
@@ -1 +1 @@
-c39011983265e0d2c0d6084d98776faf3dd707ac
\ No newline at end of file
+bdeb1e6b31b4af8a44994fefe3e18e30b5cddccc
\ No newline at end of file
diff --git a/common/offline-m2/com/android/tools/analytics-library/tracker/25.2.0-beta1/tracker-25.2.0-beta1.jar b/common/offline-m2/com/android/tools/analytics-library/tracker/25.2.0-beta1/tracker-25.2.0-beta1.jar
new file mode 100644
index 0000000..9fbbf22
--- /dev/null
+++ b/common/offline-m2/com/android/tools/analytics-library/tracker/25.2.0-beta1/tracker-25.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/analytics-library/tracker/25.2.0-beta1/tracker-25.2.0-beta1.pom b/common/offline-m2/com/android/tools/analytics-library/tracker/25.2.0-beta1/tracker-25.2.0-beta1.pom
new file mode 100644
index 0000000..6075f0c
--- /dev/null
+++ b/common/offline-m2/com/android/tools/analytics-library/tracker/25.2.0-beta1/tracker-25.2.0-beta1.pom
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.android.tools.analytics-library</groupId>
+ <artifactId>tracker</artifactId>
+ <version>25.2.0-beta1</version>
+ <name>Android Tools Analytics Tracker</name>
+ <description>Library for tracking usage analytics.</description>
+ <url>http://tools.android.com</url>
+ <inceptionYear>2007</inceptionYear>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <developers>
+ <developer>
+ <name>The Android Open Source Project</name>
+ </developer>
+ </developers>
+ <scm>
+ <connection>git://android.googlesource.com/platform/tools/base.git</connection>
+ <url>https://android.googlesource.com/platform/tools/base</url>
+ </scm>
+ <dependencies>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>17.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.android.tools</groupId>
+ <artifactId>common</artifactId>
+ <version>25.2.0-beta1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.truth</groupId>
+ <artifactId>truth</artifactId>
+ <version>0.28</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.android.tools</groupId>
+ <artifactId>annotations</artifactId>
+ <version>25.2.0-beta1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.android.tools.analytics-library</groupId>
+ <artifactId>analytics-shared</artifactId>
+ <version>25.2.0-beta1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.protobuf</groupId>
+ <artifactId>protobuf-java</artifactId>
+ <version>2.5.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.android.tools</groupId>
+ <artifactId>testutils</artifactId>
+ <version>25.2.0-beta1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.android.tools.analytics-library</groupId>
+ <artifactId>analytics-protos</artifactId>
+ <version>25.2.0-beta1</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/common/offline-m2/com/android/tools/annotations/25.2.0-alpha4/annotations-25.2.0-alpha4.jar b/common/offline-m2/com/android/tools/annotations/25.2.0-alpha4/annotations-25.2.0-alpha4.jar
index 5fcf417..5e69c4a 100644
--- a/common/offline-m2/com/android/tools/annotations/25.2.0-alpha4/annotations-25.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/tools/annotations/25.2.0-alpha4/annotations-25.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/annotations/25.2.0-alpha3/annotations-25.2.0-alpha3.jar b/common/offline-m2/com/android/tools/annotations/25.2.0-beta1/annotations-25.2.0-beta1.jar
similarity index 80%
rename from common/offline-m2/com/android/tools/annotations/25.2.0-alpha3/annotations-25.2.0-alpha3.jar
rename to common/offline-m2/com/android/tools/annotations/25.2.0-beta1/annotations-25.2.0-beta1.jar
index a50aa26..6600529 100644
--- a/common/offline-m2/com/android/tools/annotations/25.2.0-alpha3/annotations-25.2.0-alpha3.jar
+++ b/common/offline-m2/com/android/tools/annotations/25.2.0-beta1/annotations-25.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/annotations/25.2.0-alpha3/annotations-25.2.0-alpha3.pom b/common/offline-m2/com/android/tools/annotations/25.2.0-beta1/annotations-25.2.0-beta1.pom
similarity index 96%
rename from common/offline-m2/com/android/tools/annotations/25.2.0-alpha3/annotations-25.2.0-alpha3.pom
rename to common/offline-m2/com/android/tools/annotations/25.2.0-beta1/annotations-25.2.0-beta1.pom
index ab0a36a..16c1b90 100644
--- a/common/offline-m2/com/android/tools/annotations/25.2.0-alpha3/annotations-25.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/tools/annotations/25.2.0-beta1/annotations-25.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.tools</groupId>
<artifactId>annotations</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<name>Android Tools Annotations library</name>
<description>annotations used throughout the Android tools libraries.</description>
<url>http://tools.android.com</url>
diff --git a/common/offline-m2/com/android/tools/build/builder-model/2.2.0-alpha4/builder-model-2.2.0-alpha4.jar b/common/offline-m2/com/android/tools/build/builder-model/2.2.0-alpha4/builder-model-2.2.0-alpha4.jar
index b9a51c2..93d864a 100644
--- a/common/offline-m2/com/android/tools/build/builder-model/2.2.0-alpha4/builder-model-2.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/tools/build/builder-model/2.2.0-alpha4/builder-model-2.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/build/builder-model/2.2.0-alpha3/builder-model-2.2.0-alpha3.jar b/common/offline-m2/com/android/tools/build/builder-model/2.2.0-beta1/builder-model-2.2.0-beta1.jar
similarity index 60%
rename from common/offline-m2/com/android/tools/build/builder-model/2.2.0-alpha3/builder-model-2.2.0-alpha3.jar
rename to common/offline-m2/com/android/tools/build/builder-model/2.2.0-beta1/builder-model-2.2.0-beta1.jar
index af4fea5..9b92a9e 100644
--- a/common/offline-m2/com/android/tools/build/builder-model/2.2.0-alpha3/builder-model-2.2.0-alpha3.jar
+++ b/common/offline-m2/com/android/tools/build/builder-model/2.2.0-beta1/builder-model-2.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/build/builder-model/2.2.0-alpha3/builder-model-2.2.0-alpha3.pom b/common/offline-m2/com/android/tools/build/builder-model/2.2.0-beta1/builder-model-2.2.0-beta1.pom
similarity index 93%
rename from common/offline-m2/com/android/tools/build/builder-model/2.2.0-alpha3/builder-model-2.2.0-alpha3.pom
rename to common/offline-m2/com/android/tools/build/builder-model/2.2.0-beta1/builder-model-2.2.0-beta1.pom
index d18dde3..ef87f00 100644
--- a/common/offline-m2/com/android/tools/build/builder-model/2.2.0-alpha3/builder-model-2.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/tools/build/builder-model/2.2.0-beta1/builder-model-2.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.tools.build</groupId>
<artifactId>builder-model</artifactId>
- <version>2.2.0-alpha3</version>
+ <version>2.2.0-beta1</version>
<name>Android Builder Model library</name>
<description>Model for the Builder library.</description>
<url>http://tools.android.com</url>
@@ -29,7 +29,7 @@
<dependency>
<groupId>com.android.tools</groupId>
<artifactId>annotations</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<scope>compile</scope>
</dependency>
</dependencies>
diff --git a/common/offline-m2/com/android/tools/build/builder-test-api/2.2.0-alpha4/builder-test-api-2.2.0-alpha4.jar b/common/offline-m2/com/android/tools/build/builder-test-api/2.2.0-alpha4/builder-test-api-2.2.0-alpha4.jar
index 7ec4961..249c26e 100644
--- a/common/offline-m2/com/android/tools/build/builder-test-api/2.2.0-alpha4/builder-test-api-2.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/tools/build/builder-test-api/2.2.0-alpha4/builder-test-api-2.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/build/builder-test-api/2.2.0-alpha3/builder-test-api-2.2.0-alpha3.jar b/common/offline-m2/com/android/tools/build/builder-test-api/2.2.0-beta1/builder-test-api-2.2.0-beta1.jar
similarity index 77%
rename from common/offline-m2/com/android/tools/build/builder-test-api/2.2.0-alpha3/builder-test-api-2.2.0-alpha3.jar
rename to common/offline-m2/com/android/tools/build/builder-test-api/2.2.0-beta1/builder-test-api-2.2.0-beta1.jar
index 9db19b6..eca872d 100644
--- a/common/offline-m2/com/android/tools/build/builder-test-api/2.2.0-alpha3/builder-test-api-2.2.0-alpha3.jar
+++ b/common/offline-m2/com/android/tools/build/builder-test-api/2.2.0-beta1/builder-test-api-2.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/build/builder-test-api/2.2.0-alpha3/builder-test-api-2.2.0-alpha3.pom b/common/offline-m2/com/android/tools/build/builder-test-api/2.2.0-beta1/builder-test-api-2.2.0-beta1.pom
similarity index 94%
rename from common/offline-m2/com/android/tools/build/builder-test-api/2.2.0-alpha3/builder-test-api-2.2.0-alpha3.pom
rename to common/offline-m2/com/android/tools/build/builder-test-api/2.2.0-beta1/builder-test-api-2.2.0-beta1.pom
index a2cfac8..469980a 100644
--- a/common/offline-m2/com/android/tools/build/builder-test-api/2.2.0-alpha3/builder-test-api-2.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/tools/build/builder-test-api/2.2.0-beta1/builder-test-api-2.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.tools.build</groupId>
<artifactId>builder-test-api</artifactId>
- <version>2.2.0-alpha3</version>
+ <version>2.2.0-beta1</version>
<name>Android Builder Test API library</name>
<description>API for the Test extension point in the Builder library.</description>
<url>http://tools.android.com</url>
@@ -27,16 +27,16 @@
</scm>
<dependencies>
<dependency>
+ <groupId>com.android.tools.ddms</groupId>
+ <artifactId>ddmlib</artifactId>
+ <version>25.2.0-beta1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>com.android.tools.ddms</groupId>
- <artifactId>ddmlib</artifactId>
- <version>25.2.0-alpha3</version>
- <scope>compile</scope>
- </dependency>
</dependencies>
</project>
diff --git a/common/offline-m2/com/android/tools/build/builder/2.2.0-alpha4/builder-2.2.0-alpha4.jar b/common/offline-m2/com/android/tools/build/builder/2.2.0-alpha4/builder-2.2.0-alpha4.jar
index 3bed212..ea07db4 100644
--- a/common/offline-m2/com/android/tools/build/builder/2.2.0-alpha4/builder-2.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/tools/build/builder/2.2.0-alpha4/builder-2.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/build/builder/2.2.0-alpha4/builder-2.2.0-alpha4.pom b/common/offline-m2/com/android/tools/build/builder/2.2.0-alpha4/builder-2.2.0-alpha4.pom
index a24b50a..8624896 100644
--- a/common/offline-m2/com/android/tools/build/builder/2.2.0-alpha4/builder-2.2.0-alpha4.pom
+++ b/common/offline-m2/com/android/tools/build/builder/2.2.0-alpha4/builder-2.2.0-alpha4.pom
@@ -33,14 +33,32 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>com.android.tools.build</groupId>
+ <artifactId>manifest-merger</artifactId>
+ <version>25.2.0-alpha4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.android.tools.build</groupId>
+ <artifactId>builder-model</artifactId>
+ <version>2.2.0-alpha4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.android.tools</groupId>
+ <artifactId>common</artifactId>
+ <version>25.2.0-alpha4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>5.0.4</version>
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.tools.build</groupId>
- <artifactId>manifest-merger</artifactId>
+ <groupId>com.android.tools.ddms</groupId>
+ <artifactId>ddmlib</artifactId>
<version>25.2.0-alpha4</version>
<scope>compile</scope>
</dependency>
@@ -52,20 +70,8 @@
</dependency>
<dependency>
<groupId>com.android.tools</groupId>
- <artifactId>testutils</artifactId>
+ <artifactId>sdklib</artifactId>
<version>25.2.0-alpha4</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.android.tools</groupId>
- <artifactId>common</artifactId>
- <version>25.2.0-alpha4</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>com.android.tools.jack</groupId>
- <artifactId>jack-api</artifactId>
- <version>0.10.0</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -75,16 +81,16 @@
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.tools</groupId>
- <artifactId>sdk-common</artifactId>
- <version>25.2.0-alpha4</version>
+ <groupId>com.android.tools.build</groupId>
+ <artifactId>builder-test-api</artifactId>
+ <version>2.2.0-alpha4</version>
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.tools.build</groupId>
- <artifactId>builder-model</artifactId>
- <version>2.2.0-alpha4</version>
- <scope>compile</scope>
+ <groupId>com.android.tools</groupId>
+ <artifactId>testutils</artifactId>
+ <version>25.2.0-alpha4</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.truth</groupId>
@@ -93,39 +99,33 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.android.tools</groupId>
- <artifactId>sdklib</artifactId>
- <version>25.2.0-alpha4</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>com.android.tools.ddms</groupId>
- <artifactId>ddmlib</artifactId>
- <version>25.2.0-alpha4</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>com.squareup</groupId>
<artifactId>javawriter</artifactId>
<version>2.5.0</version>
<scope>compile</scope>
</dependency>
<dependency>
+ <groupId>com.android.tools.jack</groupId>
+ <artifactId>jack-api</artifactId>
+ <version>0.10.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.48</version>
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>org.bouncycastle</groupId>
- <artifactId>bcpkix-jdk15on</artifactId>
- <version>1.48</version>
+ <groupId>com.android.tools</groupId>
+ <artifactId>sdk-common</artifactId>
+ <version>25.2.0-alpha4</version>
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.tools.build</groupId>
- <artifactId>builder-test-api</artifactId>
- <version>2.2.0-alpha4</version>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcpkix-jdk15on</artifactId>
+ <version>1.48</version>
<scope>compile</scope>
</dependency>
<dependency>
diff --git a/common/offline-m2/com/android/tools/build/builder/2.2.0-alpha3/builder-2.2.0-alpha3.jar b/common/offline-m2/com/android/tools/build/builder/2.2.0-beta1/builder-2.2.0-beta1.jar
similarity index 78%
rename from common/offline-m2/com/android/tools/build/builder/2.2.0-alpha3/builder-2.2.0-alpha3.jar
rename to common/offline-m2/com/android/tools/build/builder/2.2.0-beta1/builder-2.2.0-beta1.jar
index 255cd1b..c1afc04 100644
--- a/common/offline-m2/com/android/tools/build/builder/2.2.0-alpha3/builder-2.2.0-alpha3.jar
+++ b/common/offline-m2/com/android/tools/build/builder/2.2.0-beta1/builder-2.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/build/builder/2.2.0-alpha3/builder-2.2.0-alpha3.pom b/common/offline-m2/com/android/tools/build/builder/2.2.0-beta1/builder-2.2.0-beta1.pom
similarity index 80%
rename from common/offline-m2/com/android/tools/build/builder/2.2.0-alpha3/builder-2.2.0-alpha3.pom
rename to common/offline-m2/com/android/tools/build/builder/2.2.0-beta1/builder-2.2.0-beta1.pom
index 8c7ee06..ec5658c 100644
--- a/common/offline-m2/com/android/tools/build/builder/2.2.0-alpha3/builder-2.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/tools/build/builder/2.2.0-beta1/builder-2.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.tools.build</groupId>
<artifactId>builder</artifactId>
- <version>2.2.0-alpha3</version>
+ <version>2.2.0-beta1</version>
<name>Android Builder library</name>
<description>Library to build Android applications.</description>
<url>http://tools.android.com</url>
@@ -27,27 +27,51 @@
</scm>
<dependencies>
<dependency>
+ <groupId>com.android.tools.ddms</groupId>
+ <artifactId>ddmlib</artifactId>
+ <version>25.2.0-beta1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.android.tools.analytics-library</groupId>
+ <artifactId>tracker</artifactId>
+ <version>25.2.0-beta1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.android.tools</groupId>
+ <artifactId>sdklib</artifactId>
+ <version>25.2.0-beta1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>com.android.tools</groupId>
+ <artifactId>common</artifactId>
+ <version>25.2.0-beta1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>5.0.4</version>
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.tools</groupId>
- <artifactId>testutils</artifactId>
- <version>25.2.0-alpha3</version>
- <scope>test</scope>
+ <groupId>com.android.tools.build</groupId>
+ <artifactId>builder-test-api</artifactId>
+ <version>2.2.0-beta1</version>
+ <scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.tools</groupId>
- <artifactId>common</artifactId>
- <version>25.2.0-alpha3</version>
+ <groupId>com.android.tools.jill</groupId>
+ <artifactId>jill-api</artifactId>
+ <version>0.10.0</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -59,37 +83,25 @@
<dependency>
<groupId>com.android.tools.build</groupId>
<artifactId>manifest-merger</artifactId>
- <version>25.2.0-alpha3</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>com.android.tools.build</groupId>
- <artifactId>builder-test-api</artifactId>
- <version>2.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.android.tools.build</groupId>
<artifactId>builder-model</artifactId>
- <version>2.2.0-alpha3</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>com.android.tools.ddms</groupId>
- <artifactId>ddmlib</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>2.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.android.tools</groupId>
- <artifactId>sdk-common</artifactId>
- <version>25.2.0-alpha3</version>
- <scope>compile</scope>
+ <artifactId>testutils</artifactId>
+ <version>25.2.0-beta1</version>
+ <scope>test</scope>
</dependency>
<dependency>
- <groupId>com.android.tools.jill</groupId>
- <artifactId>jill-api</artifactId>
- <version>0.10.0</version>
+ <groupId>com.android.tools.analytics-library</groupId>
+ <artifactId>analytics-protos</artifactId>
+ <version>25.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -106,14 +118,14 @@
</dependency>
<dependency>
<groupId>com.android.tools</groupId>
- <artifactId>sdklib</artifactId>
- <version>25.2.0-alpha3</version>
+ <artifactId>sdk-common</artifactId>
+ <version>25.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.tools.jack</groupId>
- <artifactId>jack-api</artifactId>
- <version>0.10.0</version>
+ <groupId>com.android.tools.analytics-library</groupId>
+ <artifactId>analytics-shared</artifactId>
+ <version>25.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -123,6 +135,12 @@
<scope>compile</scope>
</dependency>
<dependency>
+ <groupId>com.android.tools.jack</groupId>
+ <artifactId>jack-api</artifactId>
+ <version>0.10.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.48</version>
diff --git a/common/offline-m2/com/android/tools/build/gradle-api/2.2.0-alpha4/gradle-api-2.2.0-alpha4.jar b/common/offline-m2/com/android/tools/build/gradle-api/2.2.0-alpha4/gradle-api-2.2.0-alpha4.jar
index d46e000..96cb07e 100644
--- a/common/offline-m2/com/android/tools/build/gradle-api/2.2.0-alpha4/gradle-api-2.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/tools/build/gradle-api/2.2.0-alpha4/gradle-api-2.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/build/gradle-api/2.2.0-alpha3/gradle-api-2.2.0-alpha3.jar b/common/offline-m2/com/android/tools/build/gradle-api/2.2.0-beta1/gradle-api-2.2.0-beta1.jar
similarity index 67%
rename from common/offline-m2/com/android/tools/build/gradle-api/2.2.0-alpha3/gradle-api-2.2.0-alpha3.jar
rename to common/offline-m2/com/android/tools/build/gradle-api/2.2.0-beta1/gradle-api-2.2.0-beta1.jar
index ab77014..891f457 100644
--- a/common/offline-m2/com/android/tools/build/gradle-api/2.2.0-alpha3/gradle-api-2.2.0-alpha3.jar
+++ b/common/offline-m2/com/android/tools/build/gradle-api/2.2.0-beta1/gradle-api-2.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/build/gradle-api/2.2.0-alpha3/gradle-api-2.2.0-alpha3.pom b/common/offline-m2/com/android/tools/build/gradle-api/2.2.0-beta1/gradle-api-2.2.0-beta1.pom
similarity index 94%
rename from common/offline-m2/com/android/tools/build/gradle-api/2.2.0-alpha3/gradle-api-2.2.0-alpha3.pom
rename to common/offline-m2/com/android/tools/build/gradle-api/2.2.0-beta1/gradle-api-2.2.0-beta1.pom
index 4904bff..4844bc8 100644
--- a/common/offline-m2/com/android/tools/build/gradle-api/2.2.0-alpha3/gradle-api-2.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/tools/build/gradle-api/2.2.0-beta1/gradle-api-2.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.tools.build</groupId>
<artifactId>gradle-api</artifactId>
- <version>2.2.0-alpha3</version>
+ <version>2.2.0-beta1</version>
<name>Android Gradle API</name>
<description>APIs to customize Android Gradle Builds</description>
<url>http://tools.android.com</url>
@@ -41,7 +41,7 @@
<dependency>
<groupId>com.android.tools.build</groupId>
<artifactId>builder-model</artifactId>
- <version>2.2.0-alpha3</version>
+ <version>2.2.0-beta1</version>
<scope>compile</scope>
</dependency>
</dependencies>
diff --git a/common/offline-m2/com/android/tools/build/gradle-core/2.2.0-alpha3/gradle-core-2.2.0-alpha3.jar b/common/offline-m2/com/android/tools/build/gradle-core/2.2.0-alpha3/gradle-core-2.2.0-alpha3.jar
deleted file mode 100644
index 6a42595..0000000
--- a/common/offline-m2/com/android/tools/build/gradle-core/2.2.0-alpha3/gradle-core-2.2.0-alpha3.jar
+++ /dev/null
Binary files differ
diff --git a/common/offline-m2/com/android/tools/build/gradle-core/2.2.0-alpha4/gradle-core-2.2.0-alpha4.jar b/common/offline-m2/com/android/tools/build/gradle-core/2.2.0-alpha4/gradle-core-2.2.0-alpha4.jar
index a8df2b0..a5349e8 100644
--- a/common/offline-m2/com/android/tools/build/gradle-core/2.2.0-alpha4/gradle-core-2.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/tools/build/gradle-core/2.2.0-alpha4/gradle-core-2.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/build/gradle-core/2.2.0-alpha4/gradle-core-2.2.0-alpha4.pom b/common/offline-m2/com/android/tools/build/gradle-core/2.2.0-alpha4/gradle-core-2.2.0-alpha4.pom
index 147d597..078f1ae 100644
--- a/common/offline-m2/com/android/tools/build/gradle-core/2.2.0-alpha4/gradle-core-2.2.0-alpha4.pom
+++ b/common/offline-m2/com/android/tools/build/gradle-core/2.2.0-alpha4/gradle-core-2.2.0-alpha4.pom
@@ -51,15 +51,9 @@
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.tools</groupId>
- <artifactId>testutils</artifactId>
- <version>25.2.0-alpha4</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>com.android.tools.build</groupId>
- <artifactId>builder</artifactId>
- <version>2.2.0-alpha4</version>
+ <artifactId>transform-api</artifactId>
+ <version>2.0.0-deprecated-use-gradle-api</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -69,6 +63,12 @@
<scope>compile</scope>
</dependency>
<dependency>
+ <groupId>tools.base.instant-run</groupId>
+ <artifactId>instant-run-runtime</artifactId>
+ <version>unspecified</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.report</artifactId>
<version>0.7.5.201505241946</version>
@@ -81,10 +81,10 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.android.tools.lint</groupId>
- <artifactId>lint</artifactId>
+ <groupId>com.android.tools</groupId>
+ <artifactId>testutils</artifactId>
<version>25.2.0-alpha4</version>
- <scope>compile</scope>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>net.sf.jopt-simple</groupId>
@@ -93,14 +93,14 @@
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.tools.build</groupId>
- <artifactId>transform-api</artifactId>
- <version>2.0.0-deprecated-use-gradle-api</version>
- <scope>compile</scope>
+ <groupId>tools.base.instant-run</groupId>
+ <artifactId>instant-run-annotations</artifactId>
+ <version>unspecified</version>
+ <scope>test</scope>
</dependency>
<dependency>
- <groupId>com.android.databinding</groupId>
- <artifactId>compilerCommon</artifactId>
+ <groupId>com.android.tools.build</groupId>
+ <artifactId>builder</artifactId>
<version>2.2.0-alpha4</version>
<scope>compile</scope>
</dependency>
@@ -123,22 +123,22 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>com.android.tools.lint</groupId>
+ <artifactId>lint</artifactId>
+ <version>25.2.0-alpha4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<groupId>com.android.tools.build</groupId>
<artifactId>gradle-api</artifactId>
<version>2.2.0-alpha4</version>
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>tools.base.instant-run</groupId>
- <artifactId>instant-run-annotations</artifactId>
- <version>unspecified</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>tools.base.instant-run</groupId>
- <artifactId>instant-run-runtime</artifactId>
- <version>unspecified</version>
- <scope>test</scope>
+ <groupId>com.android.databinding</groupId>
+ <artifactId>compilerCommon</artifactId>
+ <version>2.2.0-alpha4</version>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
diff --git a/common/offline-m2/com/android/tools/build/gradle-core/2.2.0-beta1/gradle-core-2.2.0-beta1.jar b/common/offline-m2/com/android/tools/build/gradle-core/2.2.0-beta1/gradle-core-2.2.0-beta1.jar
new file mode 100644
index 0000000..e180028
--- /dev/null
+++ b/common/offline-m2/com/android/tools/build/gradle-core/2.2.0-beta1/gradle-core-2.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/build/gradle-core/2.2.0-alpha3/gradle-core-2.2.0-alpha3.pom b/common/offline-m2/com/android/tools/build/gradle-core/2.2.0-beta1/gradle-core-2.2.0-beta1.pom
similarity index 94%
rename from common/offline-m2/com/android/tools/build/gradle-core/2.2.0-alpha3/gradle-core-2.2.0-alpha3.pom
rename to common/offline-m2/com/android/tools/build/gradle-core/2.2.0-beta1/gradle-core-2.2.0-beta1.pom
index 40cf428..2ea40eb 100644
--- a/common/offline-m2/com/android/tools/build/gradle-core/2.2.0-alpha3/gradle-core-2.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/tools/build/gradle-core/2.2.0-beta1/gradle-core-2.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.tools.build</groupId>
<artifactId>gradle-core</artifactId>
- <version>2.2.0-alpha3</version>
+ <version>2.2.0-beta1</version>
<name>Core Library for Android Gradle Plug-in</name>
<description>Core library to build Android Gradle plugin.</description>
<url>http://tools.android.com</url>
@@ -27,9 +27,9 @@
</scm>
<dependencies>
<dependency>
- <groupId>com.android.databinding</groupId>
- <artifactId>compilerCommon</artifactId>
- <version>2.2.0-alpha3</version>
+ <groupId>com.android.tools.lint</groupId>
+ <artifactId>lint</artifactId>
+ <version>25.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -39,12 +39,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.android.tools.build</groupId>
- <artifactId>transform-api</artifactId>
- <version>2.0.0-deprecated-use-gradle-api</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
@@ -57,22 +51,16 @@
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.tools</groupId>
- <artifactId>testutils</artifactId>
- <version>25.2.0-alpha3</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>5.0.4</version>
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>tools.base</groupId>
- <artifactId>project-test-lib</artifactId>
- <version>unspecified</version>
- <scope>test</scope>
+ <groupId>com.android.tools.build</groupId>
+ <artifactId>transform-api</artifactId>
+ <version>2.0.0-deprecated-use-gradle-api</version>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
@@ -81,24 +69,12 @@
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.tools.lint</groupId>
- <artifactId>lint</artifactId>
- <version>25.2.0-alpha3</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>tools.base.instant-run</groupId>
<artifactId>instant-run-annotations</artifactId>
<version>unspecified</version>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.jacoco</groupId>
- <artifactId>org.jacoco.report</artifactId>
- <version>0.7.5.201505241946</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>tools.base.instant-run</groupId>
<artifactId>instant-run-runtime</artifactId>
<version>unspecified</version>
@@ -107,7 +83,31 @@
<dependency>
<groupId>com.android.tools.build</groupId>
<artifactId>builder</artifactId>
- <version>2.2.0-alpha3</version>
+ <version>2.2.0-beta1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jacoco</groupId>
+ <artifactId>org.jacoco.report</artifactId>
+ <version>0.7.5.201505241946</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.android.tools</groupId>
+ <artifactId>testutils</artifactId>
+ <version>25.2.0-beta1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>tools.base</groupId>
+ <artifactId>project-test-lib</artifactId>
+ <version>unspecified</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.android.databinding</groupId>
+ <artifactId>compilerCommon</artifactId>
+ <version>2.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -123,6 +123,12 @@
<scope>compile</scope>
</dependency>
<dependency>
+ <groupId>com.android.tools.build</groupId>
+ <artifactId>gradle-api</artifactId>
+ <version>2.2.0-beta1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-gradle</artifactId>
<version>5.2.1</version>
@@ -135,9 +141,9 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.android.tools.build</groupId>
- <artifactId>gradle-api</artifactId>
- <version>2.2.0-alpha3</version>
+ <groupId>com.google.protobuf</groupId>
+ <artifactId>protobuf-java</artifactId>
+ <version>2.5.0</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -146,11 +152,5 @@
<version>1.9.5</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- <version>2.6.1</version>
- <scope>compile</scope>
- </dependency>
</dependencies>
</project>
diff --git a/common/offline-m2/com/android/tools/build/gradle-experimental/0.8.0-alpha3/gradle-experimental-0.8.0-alpha3.jar b/common/offline-m2/com/android/tools/build/gradle-experimental/0.8.0-alpha3/gradle-experimental-0.8.0-alpha3.jar
deleted file mode 100644
index 22faf0b..0000000
--- a/common/offline-m2/com/android/tools/build/gradle-experimental/0.8.0-alpha3/gradle-experimental-0.8.0-alpha3.jar
+++ /dev/null
Binary files differ
diff --git a/common/offline-m2/com/android/tools/build/gradle-experimental/0.8.0-alpha4/gradle-experimental-0.8.0-alpha4.jar b/common/offline-m2/com/android/tools/build/gradle-experimental/0.8.0-alpha4/gradle-experimental-0.8.0-alpha4.jar
index 04add72..76a2e92 100644
--- a/common/offline-m2/com/android/tools/build/gradle-experimental/0.8.0-alpha4/gradle-experimental-0.8.0-alpha4.jar
+++ b/common/offline-m2/com/android/tools/build/gradle-experimental/0.8.0-alpha4/gradle-experimental-0.8.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/build/gradle-experimental/0.8.0-alpha4/gradle-experimental-0.8.0-alpha4.pom b/common/offline-m2/com/android/tools/build/gradle-experimental/0.8.0-alpha4/gradle-experimental-0.8.0-alpha4.pom
index 003b254..d7a2fa5 100644
--- a/common/offline-m2/com/android/tools/build/gradle-experimental/0.8.0-alpha4/gradle-experimental-0.8.0-alpha4.pom
+++ b/common/offline-m2/com/android/tools/build/gradle-experimental/0.8.0-alpha4/gradle-experimental-0.8.0-alpha4.pom
@@ -33,16 +33,16 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.android.tools.build</groupId>
- <artifactId>gradle-core</artifactId>
- <version>2.2.0-alpha4</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>tools.base</groupId>
<artifactId>project-test-lib</artifactId>
<version>unspecified</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>com.android.tools.build</groupId>
+ <artifactId>gradle-core</artifactId>
+ <version>2.2.0-alpha4</version>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/common/offline-m2/com/android/tools/build/gradle-experimental/0.8.0-beta1/gradle-experimental-0.8.0-beta1.jar b/common/offline-m2/com/android/tools/build/gradle-experimental/0.8.0-beta1/gradle-experimental-0.8.0-beta1.jar
new file mode 100644
index 0000000..07b901c
--- /dev/null
+++ b/common/offline-m2/com/android/tools/build/gradle-experimental/0.8.0-beta1/gradle-experimental-0.8.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/build/gradle-experimental/0.8.0-alpha3/gradle-experimental-0.8.0-alpha3.pom b/common/offline-m2/com/android/tools/build/gradle-experimental/0.8.0-beta1/gradle-experimental-0.8.0-beta1.pom
similarity index 95%
rename from common/offline-m2/com/android/tools/build/gradle-experimental/0.8.0-alpha3/gradle-experimental-0.8.0-alpha3.pom
rename to common/offline-m2/com/android/tools/build/gradle-experimental/0.8.0-beta1/gradle-experimental-0.8.0-beta1.pom
index d2c9d76..81799e6 100644
--- a/common/offline-m2/com/android/tools/build/gradle-experimental/0.8.0-alpha3/gradle-experimental-0.8.0-alpha3.pom
+++ b/common/offline-m2/com/android/tools/build/gradle-experimental/0.8.0-beta1/gradle-experimental-0.8.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.tools.build</groupId>
<artifactId>gradle-experimental</artifactId>
- <version>0.8.0-alpha3</version>
+ <version>0.8.0-beta1</version>
<name>Gradle Plug-in for Android Using Component Model</name>
<description>Gradle plug-in to build Android applications.</description>
<url>http://tools.android.com</url>
@@ -27,9 +27,15 @@
</scm>
<dependencies>
<dependency>
+ <groupId>tools.base</groupId>
+ <artifactId>project-test-lib</artifactId>
+ <version>unspecified</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>com.android.tools.build</groupId>
<artifactId>gradle-core</artifactId>
- <version>2.2.0-alpha3</version>
+ <version>2.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -38,11 +44,5 @@
<version>4.12</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>tools.base</groupId>
- <artifactId>project-test-lib</artifactId>
- <version>unspecified</version>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
diff --git a/common/offline-m2/com/android/tools/build/gradle/2.2.0-alpha3/gradle-2.2.0-alpha3.jar b/common/offline-m2/com/android/tools/build/gradle/2.2.0-alpha3/gradle-2.2.0-alpha3.jar
deleted file mode 100644
index 6f3f118..0000000
--- a/common/offline-m2/com/android/tools/build/gradle/2.2.0-alpha3/gradle-2.2.0-alpha3.jar
+++ /dev/null
Binary files differ
diff --git a/common/offline-m2/com/android/tools/build/gradle/2.2.0-alpha4/gradle-2.2.0-alpha4.jar b/common/offline-m2/com/android/tools/build/gradle/2.2.0-alpha4/gradle-2.2.0-alpha4.jar
index 4c03539..0b74936 100644
--- a/common/offline-m2/com/android/tools/build/gradle/2.2.0-alpha4/gradle-2.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/tools/build/gradle/2.2.0-alpha4/gradle-2.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/build/gradle/2.2.0-alpha4/gradle-2.2.0-alpha4.pom b/common/offline-m2/com/android/tools/build/gradle/2.2.0-alpha4/gradle-2.2.0-alpha4.pom
index 58b13c4..7e62129 100644
--- a/common/offline-m2/com/android/tools/build/gradle/2.2.0-alpha4/gradle-2.2.0-alpha4.pom
+++ b/common/offline-m2/com/android/tools/build/gradle/2.2.0-alpha4/gradle-2.2.0-alpha4.pom
@@ -33,12 +33,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.android.tools.build</groupId>
- <artifactId>gradle-core</artifactId>
- <version>2.2.0-alpha4</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<version>0.28</version>
@@ -50,5 +44,11 @@
<version>unspecified</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>com.android.tools.build</groupId>
+ <artifactId>gradle-core</artifactId>
+ <version>2.2.0-alpha4</version>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/common/offline-m2/com/android/tools/build/gradle/2.2.0-beta1/gradle-2.2.0-beta1.jar b/common/offline-m2/com/android/tools/build/gradle/2.2.0-beta1/gradle-2.2.0-beta1.jar
new file mode 100644
index 0000000..c3a6d9e
--- /dev/null
+++ b/common/offline-m2/com/android/tools/build/gradle/2.2.0-beta1/gradle-2.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/build/gradle/2.2.0-alpha3/gradle-2.2.0-alpha3.pom b/common/offline-m2/com/android/tools/build/gradle/2.2.0-beta1/gradle-2.2.0-beta1.pom
similarity index 95%
rename from common/offline-m2/com/android/tools/build/gradle/2.2.0-alpha3/gradle-2.2.0-alpha3.pom
rename to common/offline-m2/com/android/tools/build/gradle/2.2.0-beta1/gradle-2.2.0-beta1.pom
index 70af914..a2bd372 100644
--- a/common/offline-m2/com/android/tools/build/gradle/2.2.0-alpha3/gradle-2.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/tools/build/gradle/2.2.0-beta1/gradle-2.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.tools.build</groupId>
<artifactId>gradle</artifactId>
- <version>2.2.0-alpha3</version>
+ <version>2.2.0-beta1</version>
<name>Gradle Plug-in for Android</name>
<description>Gradle plug-in to build Android applications.</description>
<url>http://tools.android.com</url>
@@ -27,9 +27,15 @@
</scm>
<dependencies>
<dependency>
+ <groupId>tools.base</groupId>
+ <artifactId>project-test-lib</artifactId>
+ <version>unspecified</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>com.android.tools.build</groupId>
<artifactId>gradle-core</artifactId>
- <version>2.2.0-alpha3</version>
+ <version>2.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -44,11 +50,5 @@
<version>0.28</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>tools.base</groupId>
- <artifactId>project-test-lib</artifactId>
- <version>unspecified</version>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
diff --git a/common/offline-m2/com/android/tools/build/manifest-merger/25.2.0-alpha4/manifest-merger-25.2.0-alpha4.jar b/common/offline-m2/com/android/tools/build/manifest-merger/25.2.0-alpha4/manifest-merger-25.2.0-alpha4.jar
index 3ec0605..8c6b411 100644
--- a/common/offline-m2/com/android/tools/build/manifest-merger/25.2.0-alpha4/manifest-merger-25.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/tools/build/manifest-merger/25.2.0-alpha4/manifest-merger-25.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/build/manifest-merger/25.2.0-alpha4/manifest-merger-25.2.0-alpha4.pom b/common/offline-m2/com/android/tools/build/manifest-merger/25.2.0-alpha4/manifest-merger-25.2.0-alpha4.pom
index c9d56a0..6a3410c 100644
--- a/common/offline-m2/com/android/tools/build/manifest-merger/25.2.0-alpha4/manifest-merger-25.2.0-alpha4.pom
+++ b/common/offline-m2/com/android/tools/build/manifest-merger/25.2.0-alpha4/manifest-merger-25.2.0-alpha4.pom
@@ -33,12 +33,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.android.tools</groupId>
- <artifactId>sdk-common</artifactId>
- <version>25.2.0-alpha4</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>net.sf.kxml</groupId>
<artifactId>kxml2</artifactId>
<version>2.3.0</version>
@@ -46,13 +40,19 @@
</dependency>
<dependency>
<groupId>com.android.tools</groupId>
- <artifactId>sdklib</artifactId>
+ <artifactId>common</artifactId>
<version>25.2.0-alpha4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.android.tools</groupId>
- <artifactId>common</artifactId>
+ <artifactId>sdk-common</artifactId>
+ <version>25.2.0-alpha4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.android.tools</groupId>
+ <artifactId>sdklib</artifactId>
<version>25.2.0-alpha4</version>
<scope>compile</scope>
</dependency>
diff --git a/common/offline-m2/com/android/tools/build/manifest-merger/25.2.0-alpha3/manifest-merger-25.2.0-alpha3.jar b/common/offline-m2/com/android/tools/build/manifest-merger/25.2.0-beta1/manifest-merger-25.2.0-beta1.jar
similarity index 91%
rename from common/offline-m2/com/android/tools/build/manifest-merger/25.2.0-alpha3/manifest-merger-25.2.0-alpha3.jar
rename to common/offline-m2/com/android/tools/build/manifest-merger/25.2.0-beta1/manifest-merger-25.2.0-beta1.jar
index 5cac539..847c437 100644
--- a/common/offline-m2/com/android/tools/build/manifest-merger/25.2.0-alpha3/manifest-merger-25.2.0-alpha3.jar
+++ b/common/offline-m2/com/android/tools/build/manifest-merger/25.2.0-beta1/manifest-merger-25.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/build/manifest-merger/25.2.0-alpha3/manifest-merger-25.2.0-alpha3.pom b/common/offline-m2/com/android/tools/build/manifest-merger/25.2.0-beta1/manifest-merger-25.2.0-beta1.pom
similarity index 92%
rename from common/offline-m2/com/android/tools/build/manifest-merger/25.2.0-alpha3/manifest-merger-25.2.0-alpha3.pom
rename to common/offline-m2/com/android/tools/build/manifest-merger/25.2.0-beta1/manifest-merger-25.2.0-beta1.pom
index c417196..42cfae0 100644
--- a/common/offline-m2/com/android/tools/build/manifest-merger/25.2.0-alpha3/manifest-merger-25.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/tools/build/manifest-merger/25.2.0-beta1/manifest-merger-25.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.tools.build</groupId>
<artifactId>manifest-merger</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<name>Android Tools Manifest Merger library</name>
<description>A Library to merge Android manifests.</description>
<url>http://tools.android.com</url>
@@ -27,6 +27,12 @@
</scm>
<dependencies>
<dependency>
+ <groupId>com.android.tools</groupId>
+ <artifactId>sdklib</artifactId>
+ <version>25.2.0-beta1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
@@ -41,19 +47,13 @@
<dependency>
<groupId>com.android.tools</groupId>
<artifactId>common</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.android.tools</groupId>
<artifactId>sdk-common</artifactId>
- <version>25.2.0-alpha3</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>com.android.tools</groupId>
- <artifactId>sdklib</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
diff --git a/common/offline-m2/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.jar b/common/offline-m2/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.jar
index 6dc3561..e242825 100644
--- a/common/offline-m2/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.jar
+++ b/common/offline-m2/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/common/25.2.0-alpha3/common-25.2.0-alpha3.jar b/common/offline-m2/com/android/tools/common/25.2.0-alpha3/common-25.2.0-alpha3.jar
deleted file mode 100644
index 985f839..0000000
--- a/common/offline-m2/com/android/tools/common/25.2.0-alpha3/common-25.2.0-alpha3.jar
+++ /dev/null
Binary files differ
diff --git a/common/offline-m2/com/android/tools/common/25.2.0-alpha4/common-25.2.0-alpha4.jar b/common/offline-m2/com/android/tools/common/25.2.0-alpha4/common-25.2.0-alpha4.jar
index ddbaacf..f2d887f 100644
--- a/common/offline-m2/com/android/tools/common/25.2.0-alpha4/common-25.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/tools/common/25.2.0-alpha4/common-25.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/common/25.2.0-alpha4/common-25.2.0-alpha4.pom b/common/offline-m2/com/android/tools/common/25.2.0-alpha4/common-25.2.0-alpha4.pom
index 70945bf..8469aee 100644
--- a/common/offline-m2/com/android/tools/common/25.2.0-alpha4/common-25.2.0-alpha4.pom
+++ b/common/offline-m2/com/android/tools/common/25.2.0-alpha4/common-25.2.0-alpha4.pom
@@ -39,16 +39,16 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.android.tools</groupId>
- <artifactId>annotations</artifactId>
- <version>25.2.0-alpha4</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<version>0.28</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>com.android.tools</groupId>
+ <artifactId>annotations</artifactId>
+ <version>25.2.0-alpha4</version>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/common/offline-m2/com/android/tools/common/25.2.0-beta1/common-25.2.0-beta1.jar b/common/offline-m2/com/android/tools/common/25.2.0-beta1/common-25.2.0-beta1.jar
new file mode 100644
index 0000000..9ba3834
--- /dev/null
+++ b/common/offline-m2/com/android/tools/common/25.2.0-beta1/common-25.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/common/25.2.0-alpha3/common-25.2.0-alpha3.pom b/common/offline-m2/com/android/tools/common/25.2.0-beta1/common-25.2.0-beta1.pom
similarity index 95%
rename from common/offline-m2/com/android/tools/common/25.2.0-alpha3/common-25.2.0-alpha3.pom
rename to common/offline-m2/com/android/tools/common/25.2.0-beta1/common-25.2.0-beta1.pom
index 118307c..e53963c 100644
--- a/common/offline-m2/com/android/tools/common/25.2.0-alpha3/common-25.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/tools/common/25.2.0-beta1/common-25.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.tools</groupId>
<artifactId>common</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<name>Android Tools common library</name>
<description>common library used by other Android tools libraries.</description>
<url>http://tools.android.com</url>
@@ -39,16 +39,16 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.android.tools</groupId>
- <artifactId>annotations</artifactId>
- <version>25.2.0-alpha3</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<version>0.28</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>com.android.tools</groupId>
+ <artifactId>annotations</artifactId>
+ <version>25.2.0-beta1</version>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/common/offline-m2/com/android/tools/ddms/ddmlib/25.2.0-alpha4/ddmlib-25.2.0-alpha4.jar b/common/offline-m2/com/android/tools/ddms/ddmlib/25.2.0-alpha4/ddmlib-25.2.0-alpha4.jar
index 75aa99b..64748f4 100644
--- a/common/offline-m2/com/android/tools/ddms/ddmlib/25.2.0-alpha4/ddmlib-25.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/tools/ddms/ddmlib/25.2.0-alpha4/ddmlib-25.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/ddms/ddmlib/25.2.0-alpha3/ddmlib-25.2.0-alpha3.jar b/common/offline-m2/com/android/tools/ddms/ddmlib/25.2.0-beta1/ddmlib-25.2.0-beta1.jar
similarity index 92%
rename from common/offline-m2/com/android/tools/ddms/ddmlib/25.2.0-alpha3/ddmlib-25.2.0-alpha3.jar
rename to common/offline-m2/com/android/tools/ddms/ddmlib/25.2.0-beta1/ddmlib-25.2.0-beta1.jar
index 9746187..6627c52 100644
--- a/common/offline-m2/com/android/tools/ddms/ddmlib/25.2.0-alpha3/ddmlib-25.2.0-alpha3.jar
+++ b/common/offline-m2/com/android/tools/ddms/ddmlib/25.2.0-beta1/ddmlib-25.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/ddms/ddmlib/25.2.0-alpha3/ddmlib-25.2.0-alpha3.pom b/common/offline-m2/com/android/tools/ddms/ddmlib/25.2.0-beta1/ddmlib-25.2.0-beta1.pom
similarity index 95%
rename from common/offline-m2/com/android/tools/ddms/ddmlib/25.2.0-alpha3/ddmlib-25.2.0-alpha3.pom
rename to common/offline-m2/com/android/tools/ddms/ddmlib/25.2.0-beta1/ddmlib-25.2.0-beta1.pom
index 429c2e3..62c09f9 100644
--- a/common/offline-m2/com/android/tools/ddms/ddmlib/25.2.0-alpha3/ddmlib-25.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/tools/ddms/ddmlib/25.2.0-beta1/ddmlib-25.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.tools.ddms</groupId>
<artifactId>ddmlib</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<name>Android Tools ddmlib</name>
<description>Library providing APIs to talk to Android devices</description>
<url>http://tools.android.com</url>
@@ -41,7 +41,7 @@
<dependency>
<groupId>com.android.tools</groupId>
<artifactId>common</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
diff --git a/common/offline-m2/com/android/tools/dvlib/25.2.0-alpha4/dvlib-25.2.0-alpha4.jar b/common/offline-m2/com/android/tools/dvlib/25.2.0-alpha4/dvlib-25.2.0-alpha4.jar
index 93b4fc3..35da6e8 100644
--- a/common/offline-m2/com/android/tools/dvlib/25.2.0-alpha4/dvlib-25.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/tools/dvlib/25.2.0-alpha4/dvlib-25.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/dvlib/25.2.0-alpha3/dvlib-25.2.0-alpha3.jar b/common/offline-m2/com/android/tools/dvlib/25.2.0-beta1/dvlib-25.2.0-beta1.jar
similarity index 94%
rename from common/offline-m2/com/android/tools/dvlib/25.2.0-alpha3/dvlib-25.2.0-alpha3.jar
rename to common/offline-m2/com/android/tools/dvlib/25.2.0-beta1/dvlib-25.2.0-beta1.jar
index c0b294b..a79c64a 100644
--- a/common/offline-m2/com/android/tools/dvlib/25.2.0-alpha3/dvlib-25.2.0-alpha3.jar
+++ b/common/offline-m2/com/android/tools/dvlib/25.2.0-beta1/dvlib-25.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/dvlib/25.2.0-alpha3/dvlib-25.2.0-alpha3.pom b/common/offline-m2/com/android/tools/dvlib/25.2.0-beta1/dvlib-25.2.0-beta1.pom
similarity index 94%
rename from common/offline-m2/com/android/tools/dvlib/25.2.0-alpha3/dvlib-25.2.0-alpha3.pom
rename to common/offline-m2/com/android/tools/dvlib/25.2.0-beta1/dvlib-25.2.0-beta1.pom
index 63677bb..6a9c944 100644
--- a/common/offline-m2/com/android/tools/dvlib/25.2.0-alpha3/dvlib-25.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/tools/dvlib/25.2.0-beta1/dvlib-25.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.tools</groupId>
<artifactId>dvlib</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<name>Android Tools dvlib</name>
<description>A Library to manage the Android device database XML files.</description>
<url>http://tools.android.com</url>
@@ -35,7 +35,7 @@
<dependency>
<groupId>com.android.tools</groupId>
<artifactId>common</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<scope>compile</scope>
</dependency>
</dependencies>
diff --git a/common/offline-m2/com/android/tools/jack/jack-api/0.10.0/jack-api-0.10.0.jar b/common/offline-m2/com/android/tools/jack/jack-api/0.10.0/jack-api-0.10.0.jar
index bb81aa1..69c9cd9 100644
--- a/common/offline-m2/com/android/tools/jack/jack-api/0.10.0/jack-api-0.10.0.jar
+++ b/common/offline-m2/com/android/tools/jack/jack-api/0.10.0/jack-api-0.10.0.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/jill/jill-api/0.10.0/jill-api-0.10.0.jar b/common/offline-m2/com/android/tools/jill/jill-api/0.10.0/jill-api-0.10.0.jar
index b5db46b..fff22dd 100644
--- a/common/offline-m2/com/android/tools/jill/jill-api/0.10.0/jill-api-0.10.0.jar
+++ b/common/offline-m2/com/android/tools/jill/jill-api/0.10.0/jill-api-0.10.0.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/layoutlib/layoutlib-api/25.2.0-alpha4/layoutlib-api-25.2.0-alpha4.jar b/common/offline-m2/com/android/tools/layoutlib/layoutlib-api/25.2.0-alpha4/layoutlib-api-25.2.0-alpha4.jar
index 9073447..ab527fd 100644
--- a/common/offline-m2/com/android/tools/layoutlib/layoutlib-api/25.2.0-alpha4/layoutlib-api-25.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/tools/layoutlib/layoutlib-api/25.2.0-alpha4/layoutlib-api-25.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/layoutlib/layoutlib-api/25.2.0-alpha4/layoutlib-api-25.2.0-alpha4.pom b/common/offline-m2/com/android/tools/layoutlib/layoutlib-api/25.2.0-alpha4/layoutlib-api-25.2.0-alpha4.pom
index 161b799..cb30923 100644
--- a/common/offline-m2/com/android/tools/layoutlib/layoutlib-api/25.2.0-alpha4/layoutlib-api-25.2.0-alpha4.pom
+++ b/common/offline-m2/com/android/tools/layoutlib/layoutlib-api/25.2.0-alpha4/layoutlib-api-25.2.0-alpha4.pom
@@ -40,13 +40,13 @@
</dependency>
<dependency>
<groupId>com.android.tools</groupId>
- <artifactId>annotations</artifactId>
+ <artifactId>common</artifactId>
<version>25.2.0-alpha4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.android.tools</groupId>
- <artifactId>common</artifactId>
+ <artifactId>annotations</artifactId>
<version>25.2.0-alpha4</version>
<scope>compile</scope>
</dependency>
diff --git a/common/offline-m2/com/android/tools/layoutlib/layoutlib-api/25.2.0-alpha3/layoutlib-api-25.2.0-alpha3.jar b/common/offline-m2/com/android/tools/layoutlib/layoutlib-api/25.2.0-beta1/layoutlib-api-25.2.0-beta1.jar
similarity index 75%
rename from common/offline-m2/com/android/tools/layoutlib/layoutlib-api/25.2.0-alpha3/layoutlib-api-25.2.0-alpha3.jar
rename to common/offline-m2/com/android/tools/layoutlib/layoutlib-api/25.2.0-beta1/layoutlib-api-25.2.0-beta1.jar
index 0673c55..a98cdb5 100644
--- a/common/offline-m2/com/android/tools/layoutlib/layoutlib-api/25.2.0-alpha3/layoutlib-api-25.2.0-alpha3.jar
+++ b/common/offline-m2/com/android/tools/layoutlib/layoutlib-api/25.2.0-beta1/layoutlib-api-25.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/layoutlib/layoutlib-api/25.2.0-alpha3/layoutlib-api-25.2.0-alpha3.pom b/common/offline-m2/com/android/tools/layoutlib/layoutlib-api/25.2.0-beta1/layoutlib-api-25.2.0-beta1.pom
similarity index 93%
rename from common/offline-m2/com/android/tools/layoutlib/layoutlib-api/25.2.0-alpha3/layoutlib-api-25.2.0-alpha3.pom
rename to common/offline-m2/com/android/tools/layoutlib/layoutlib-api/25.2.0-beta1/layoutlib-api-25.2.0-beta1.pom
index 8ddb473..c283c1b 100644
--- a/common/offline-m2/com/android/tools/layoutlib/layoutlib-api/25.2.0-alpha3/layoutlib-api-25.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/tools/layoutlib/layoutlib-api/25.2.0-beta1/layoutlib-api-25.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.tools.layoutlib</groupId>
<artifactId>layoutlib-api</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<name>Android Tools layoutlib-api</name>
<description>Library to use the rendering library for Android layouts: layoutlib</description>
<url>http://tools.android.com</url>
@@ -41,13 +41,13 @@
<dependency>
<groupId>com.android.tools</groupId>
<artifactId>common</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.android.tools</groupId>
<artifactId>annotations</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
diff --git a/common/offline-m2/com/android/tools/lint/lint-api/25.2.0-alpha4/lint-api-25.2.0-alpha4.jar b/common/offline-m2/com/android/tools/lint/lint-api/25.2.0-alpha4/lint-api-25.2.0-alpha4.jar
index 7b06060..e80efb3 100644
--- a/common/offline-m2/com/android/tools/lint/lint-api/25.2.0-alpha4/lint-api-25.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/tools/lint/lint-api/25.2.0-alpha4/lint-api-25.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/lint/lint-api/25.2.0-alpha4/lint-api-25.2.0-alpha4.pom b/common/offline-m2/com/android/tools/lint/lint-api/25.2.0-alpha4/lint-api-25.2.0-alpha4.pom
index fd1195a..dac0e5f 100644
--- a/common/offline-m2/com/android/tools/lint/lint-api/25.2.0-alpha4/lint-api-25.2.0-alpha4.pom
+++ b/common/offline-m2/com/android/tools/lint/lint-api/25.2.0-alpha4/lint-api-25.2.0-alpha4.pom
@@ -27,12 +27,6 @@
</scm>
<dependencies>
<dependency>
- <groupId>com.android.tools</groupId>
- <artifactId>sdk-common</artifactId>
- <version>25.2.0-alpha4</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>com.android.tools.build</groupId>
<artifactId>builder-model</artifactId>
<version>2.2.0-alpha4</version>
@@ -62,5 +56,11 @@
<version>145.597.3</version>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>com.android.tools</groupId>
+ <artifactId>sdk-common</artifactId>
+ <version>25.2.0-alpha4</version>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/common/offline-m2/com/android/tools/lint/lint-api/25.2.0-alpha3/lint-api-25.2.0-alpha3.jar b/common/offline-m2/com/android/tools/lint/lint-api/25.2.0-beta1/lint-api-25.2.0-beta1.jar
similarity index 67%
rename from common/offline-m2/com/android/tools/lint/lint-api/25.2.0-alpha3/lint-api-25.2.0-alpha3.jar
rename to common/offline-m2/com/android/tools/lint/lint-api/25.2.0-beta1/lint-api-25.2.0-beta1.jar
index 13ac6cd..05dca51 100644
--- a/common/offline-m2/com/android/tools/lint/lint-api/25.2.0-alpha3/lint-api-25.2.0-alpha3.jar
+++ b/common/offline-m2/com/android/tools/lint/lint-api/25.2.0-beta1/lint-api-25.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/lint/lint-api/25.2.0-alpha3/lint-api-25.2.0-alpha3.pom b/common/offline-m2/com/android/tools/lint/lint-api/25.2.0-beta1/lint-api-25.2.0-beta1.pom
similarity index 94%
rename from common/offline-m2/com/android/tools/lint/lint-api/25.2.0-alpha3/lint-api-25.2.0-alpha3.pom
rename to common/offline-m2/com/android/tools/lint/lint-api/25.2.0-beta1/lint-api-25.2.0-beta1.pom
index a3e1912..6f99a74 100644
--- a/common/offline-m2/com/android/tools/lint/lint-api/25.2.0-alpha3/lint-api-25.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/tools/lint/lint-api/25.2.0-beta1/lint-api-25.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.tools.lint</groupId>
<artifactId>lint-api</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<name>Android Tools Lint API</name>
<description>API to build lint checks</description>
<url>http://tools.android.com</url>
@@ -33,30 +33,30 @@
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.tools.build</groupId>
- <artifactId>builder-model</artifactId>
- <version>2.2.0-alpha3</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>com.android.tools.external.lombok</groupId>
<artifactId>lombok-ast</artifactId>
<version>0.2.3</version>
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.tools</groupId>
- <artifactId>sdk-common</artifactId>
- <version>25.2.0-alpha3</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-tree</artifactId>
<version>5.0.4</version>
<scope>compile</scope>
</dependency>
<dependency>
+ <groupId>com.android.tools</groupId>
+ <artifactId>sdk-common</artifactId>
+ <version>25.2.0-beta1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.android.tools.build</groupId>
+ <artifactId>builder-model</artifactId>
+ <version>2.2.0-beta1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<groupId>com.android.tools.external.com-intellij</groupId>
<artifactId>uast</artifactId>
<version>145.597.3</version>
diff --git a/common/offline-m2/com/android/tools/lint/lint-checks/25.2.0-alpha4/lint-checks-25.2.0-alpha4.jar b/common/offline-m2/com/android/tools/lint/lint-checks/25.2.0-alpha4/lint-checks-25.2.0-alpha4.jar
index 3538ae4..60b847f 100644
--- a/common/offline-m2/com/android/tools/lint/lint-checks/25.2.0-alpha4/lint-checks-25.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/tools/lint/lint-checks/25.2.0-alpha4/lint-checks-25.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/lint/lint-checks/25.2.0-alpha3/lint-checks-25.2.0-alpha3.jar b/common/offline-m2/com/android/tools/lint/lint-checks/25.2.0-beta1/lint-checks-25.2.0-beta1.jar
similarity index 67%
rename from common/offline-m2/com/android/tools/lint/lint-checks/25.2.0-alpha3/lint-checks-25.2.0-alpha3.jar
rename to common/offline-m2/com/android/tools/lint/lint-checks/25.2.0-beta1/lint-checks-25.2.0-beta1.jar
index 9fe7dca..3aa0157 100644
--- a/common/offline-m2/com/android/tools/lint/lint-checks/25.2.0-alpha3/lint-checks-25.2.0-alpha3.jar
+++ b/common/offline-m2/com/android/tools/lint/lint-checks/25.2.0-beta1/lint-checks-25.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/lint/lint-checks/25.2.0-alpha3/lint-checks-25.2.0-alpha3.pom b/common/offline-m2/com/android/tools/lint/lint-checks/25.2.0-beta1/lint-checks-25.2.0-beta1.pom
similarity index 94%
rename from common/offline-m2/com/android/tools/lint/lint-checks/25.2.0-alpha3/lint-checks-25.2.0-alpha3.pom
rename to common/offline-m2/com/android/tools/lint/lint-checks/25.2.0-beta1/lint-checks-25.2.0-beta1.pom
index 393810e..68d7fb6 100644
--- a/common/offline-m2/com/android/tools/lint/lint-checks/25.2.0-alpha3/lint-checks-25.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/tools/lint/lint-checks/25.2.0-beta1/lint-checks-25.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.tools.lint</groupId>
<artifactId>lint-checks</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<name>Android Lint Checks</name>
<description>Checks for Android Lint</description>
<url>http://tools.android.com</url>
@@ -27,15 +27,15 @@
</scm>
<dependencies>
<dependency>
- <groupId>org.ow2.asm</groupId>
- <artifactId>asm-analysis</artifactId>
- <version>5.0.4</version>
+ <groupId>com.android.tools.lint</groupId>
+ <artifactId>lint-api</artifactId>
+ <version>25.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.tools.lint</groupId>
- <artifactId>lint-api</artifactId>
- <version>25.2.0-alpha3</version>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm-analysis</artifactId>
+ <version>5.0.4</version>
<scope>compile</scope>
</dependency>
</dependencies>
diff --git a/common/offline-m2/com/android/tools/lint/lint/25.2.0-alpha4/lint-25.2.0-alpha4.jar b/common/offline-m2/com/android/tools/lint/lint/25.2.0-alpha4/lint-25.2.0-alpha4.jar
index 0a62634..da8b2ed 100644
--- a/common/offline-m2/com/android/tools/lint/lint/25.2.0-alpha4/lint-25.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/tools/lint/lint/25.2.0-alpha4/lint-25.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/lint/lint/25.2.0-alpha3/lint-25.2.0-alpha3.jar b/common/offline-m2/com/android/tools/lint/lint/25.2.0-beta1/lint-25.2.0-beta1.jar
similarity index 93%
rename from common/offline-m2/com/android/tools/lint/lint/25.2.0-alpha3/lint-25.2.0-alpha3.jar
rename to common/offline-m2/com/android/tools/lint/lint/25.2.0-beta1/lint-25.2.0-beta1.jar
index 8aa5b7f..e527fee 100644
--- a/common/offline-m2/com/android/tools/lint/lint/25.2.0-alpha3/lint-25.2.0-alpha3.jar
+++ b/common/offline-m2/com/android/tools/lint/lint/25.2.0-beta1/lint-25.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/lint/lint/25.2.0-alpha3/lint-25.2.0-alpha3.pom b/common/offline-m2/com/android/tools/lint/lint/25.2.0-beta1/lint-25.2.0-beta1.pom
similarity index 94%
rename from common/offline-m2/com/android/tools/lint/lint/25.2.0-alpha3/lint-25.2.0-alpha3.pom
rename to common/offline-m2/com/android/tools/lint/lint/25.2.0-beta1/lint-25.2.0-beta1.pom
index 138c9d4..fae05b1 100644
--- a/common/offline-m2/com/android/tools/lint/lint/25.2.0-alpha3/lint-25.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/tools/lint/lint/25.2.0-beta1/lint-25.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.tools.lint</groupId>
<artifactId>lint</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<name>Android Lint Tool</name>
<description>Lint tools. Both a Command line tool and a library to add lint features to other tools</description>
<url>http://tools.android.com</url>
@@ -29,7 +29,7 @@
<dependency>
<groupId>com.android.tools.lint</groupId>
<artifactId>lint-checks</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
diff --git a/common/offline-m2/com/android/tools/repository/25.2.0-alpha4/repository-25.2.0-alpha4.jar b/common/offline-m2/com/android/tools/repository/25.2.0-alpha4/repository-25.2.0-alpha4.jar
index 258896d..3716821 100644
--- a/common/offline-m2/com/android/tools/repository/25.2.0-alpha4/repository-25.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/tools/repository/25.2.0-alpha4/repository-25.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/repository/25.2.0-alpha3/repository-25.2.0-alpha3.jar b/common/offline-m2/com/android/tools/repository/25.2.0-beta1/repository-25.2.0-beta1.jar
similarity index 65%
rename from common/offline-m2/com/android/tools/repository/25.2.0-alpha3/repository-25.2.0-alpha3.jar
rename to common/offline-m2/com/android/tools/repository/25.2.0-beta1/repository-25.2.0-beta1.jar
index 94c0822..d121c1e 100644
--- a/common/offline-m2/com/android/tools/repository/25.2.0-alpha3/repository-25.2.0-alpha3.jar
+++ b/common/offline-m2/com/android/tools/repository/25.2.0-beta1/repository-25.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/repository/25.2.0-alpha3/repository-25.2.0-alpha3.pom b/common/offline-m2/com/android/tools/repository/25.2.0-beta1/repository-25.2.0-beta1.pom
similarity index 86%
rename from common/offline-m2/com/android/tools/repository/25.2.0-alpha3/repository-25.2.0-alpha3.pom
rename to common/offline-m2/com/android/tools/repository/25.2.0-beta1/repository-25.2.0-beta1.pom
index b3a7741..eead993 100644
--- a/common/offline-m2/com/android/tools/repository/25.2.0-alpha3/repository-25.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/tools/repository/25.2.0-beta1/repository-25.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.tools</groupId>
<artifactId>repository</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<name>Android Tools repository</name>
<description>A library for downloading and managing package repositories</description>
<url>http://tools.android.com</url>
@@ -35,7 +35,13 @@
<dependency>
<groupId>com.android.tools</groupId>
<artifactId>common</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.jimfs</groupId>
+ <artifactId>jimfs</artifactId>
+ <version>1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
diff --git a/common/offline-m2/com/android/tools/sdk-common/25.2.0-alpha4/sdk-common-25.2.0-alpha4.jar b/common/offline-m2/com/android/tools/sdk-common/25.2.0-alpha4/sdk-common-25.2.0-alpha4.jar
index 7af3bd3..743b592 100644
--- a/common/offline-m2/com/android/tools/sdk-common/25.2.0-alpha4/sdk-common-25.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/tools/sdk-common/25.2.0-alpha4/sdk-common-25.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/sdk-common/25.2.0-alpha4/sdk-common-25.2.0-alpha4.pom b/common/offline-m2/com/android/tools/sdk-common/25.2.0-alpha4/sdk-common-25.2.0-alpha4.pom
index c62bde5..a55dcd0 100644
--- a/common/offline-m2/com/android/tools/sdk-common/25.2.0-alpha4/sdk-common-25.2.0-alpha4.pom
+++ b/common/offline-m2/com/android/tools/sdk-common/25.2.0-alpha4/sdk-common-25.2.0-alpha4.pom
@@ -27,36 +27,36 @@
</scm>
<dependencies>
<dependency>
+ <groupId>com.android.tools.build</groupId>
+ <artifactId>builder-test-api</artifactId>
+ <version>2.2.0-alpha4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>com.android.tools</groupId>
+ <artifactId>testutils</artifactId>
+ <version>25.2.0-alpha4</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>com.android.tools.build</groupId>
<artifactId>builder-model</artifactId>
<version>2.2.0-alpha4</version>
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.tools</groupId>
- <artifactId>testutils</artifactId>
- <version>25.2.0-alpha4</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<version>0.28</version>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.android.tools</groupId>
- <artifactId>sdklib</artifactId>
- <version>25.2.0-alpha4</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.48</version>
@@ -69,15 +69,15 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.bouncycastle</groupId>
- <artifactId>bcpkix-jdk15on</artifactId>
- <version>1.48</version>
+ <groupId>com.android.tools</groupId>
+ <artifactId>sdklib</artifactId>
+ <version>25.2.0-alpha4</version>
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.tools.build</groupId>
- <artifactId>builder-test-api</artifactId>
- <version>2.2.0-alpha4</version>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcpkix-jdk15on</artifactId>
+ <version>1.48</version>
<scope>compile</scope>
</dependency>
<dependency>
diff --git a/common/offline-m2/com/android/tools/sdk-common/25.2.0-alpha3/sdk-common-25.2.0-alpha3.jar b/common/offline-m2/com/android/tools/sdk-common/25.2.0-beta1/sdk-common-25.2.0-beta1.jar
similarity index 75%
rename from common/offline-m2/com/android/tools/sdk-common/25.2.0-alpha3/sdk-common-25.2.0-alpha3.jar
rename to common/offline-m2/com/android/tools/sdk-common/25.2.0-beta1/sdk-common-25.2.0-beta1.jar
index 9866009..c117fbe 100644
--- a/common/offline-m2/com/android/tools/sdk-common/25.2.0-alpha3/sdk-common-25.2.0-alpha3.jar
+++ b/common/offline-m2/com/android/tools/sdk-common/25.2.0-beta1/sdk-common-25.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/sdk-common/25.2.0-alpha3/sdk-common-25.2.0-alpha3.pom b/common/offline-m2/com/android/tools/sdk-common/25.2.0-beta1/sdk-common-25.2.0-beta1.pom
similarity index 92%
rename from common/offline-m2/com/android/tools/sdk-common/25.2.0-alpha3/sdk-common-25.2.0-alpha3.pom
rename to common/offline-m2/com/android/tools/sdk-common/25.2.0-beta1/sdk-common-25.2.0-beta1.pom
index 4c5ab8c..317cc52 100644
--- a/common/offline-m2/com/android/tools/sdk-common/25.2.0-alpha3/sdk-common-25.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/tools/sdk-common/25.2.0-beta1/sdk-common-25.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.tools</groupId>
<artifactId>sdk-common</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<name>Android Tools sdk-common library</name>
<description>sdk-common library used by other Android tools libraries.</description>
<url>http://tools.android.com</url>
@@ -27,9 +27,9 @@
</scm>
<dependencies>
<dependency>
- <groupId>com.android.tools.build</groupId>
- <artifactId>builder-test-api</artifactId>
- <version>2.2.0-alpha3</version>
+ <groupId>com.android.tools</groupId>
+ <artifactId>sdklib</artifactId>
+ <version>25.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -39,15 +39,9 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.android.tools</groupId>
- <artifactId>testutils</artifactId>
- <version>25.2.0-alpha3</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>com.android.tools.build</groupId>
- <artifactId>builder-model</artifactId>
- <version>2.2.0-alpha3</version>
+ <artifactId>builder-test-api</artifactId>
+ <version>2.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -57,9 +51,9 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.android.tools</groupId>
- <artifactId>sdklib</artifactId>
- <version>25.2.0-alpha3</version>
+ <groupId>com.android.tools.build</groupId>
+ <artifactId>builder-model</artifactId>
+ <version>2.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -81,6 +75,12 @@
<scope>compile</scope>
</dependency>
<dependency>
+ <groupId>com.android.tools</groupId>
+ <artifactId>testutils</artifactId>
+ <version>25.2.0-beta1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
diff --git a/common/offline-m2/com/android/tools/sdklib/25.2.0-alpha4/sdklib-25.2.0-alpha4.jar b/common/offline-m2/com/android/tools/sdklib/25.2.0-alpha4/sdklib-25.2.0-alpha4.jar
index cd93f3a..6f3c65f 100644
--- a/common/offline-m2/com/android/tools/sdklib/25.2.0-alpha4/sdklib-25.2.0-alpha4.jar
+++ b/common/offline-m2/com/android/tools/sdklib/25.2.0-alpha4/sdklib-25.2.0-alpha4.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/sdklib/25.2.0-alpha4/sdklib-25.2.0-alpha4.pom b/common/offline-m2/com/android/tools/sdklib/25.2.0-alpha4/sdklib-25.2.0-alpha4.pom
index c16a700..b0776c2 100644
--- a/common/offline-m2/com/android/tools/sdklib/25.2.0-alpha4/sdklib-25.2.0-alpha4.pom
+++ b/common/offline-m2/com/android/tools/sdklib/25.2.0-alpha4/sdklib-25.2.0-alpha4.pom
@@ -27,18 +27,6 @@
</scm>
<dependencies>
<dependency>
- <groupId>com.android.tools.layoutlib</groupId>
- <artifactId>layoutlib-api</artifactId>
- <version>25.2.0-alpha4</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>com.android.tools</groupId>
- <artifactId>dvlib</artifactId>
- <version>25.2.0-alpha4</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.1.1</version>
@@ -51,6 +39,18 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>com.android.tools.layoutlib</groupId>
+ <artifactId>layoutlib-api</artifactId>
+ <version>25.2.0-alpha4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.android.tools</groupId>
+ <artifactId>dvlib</artifactId>
+ <version>25.2.0-alpha4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<groupId>com.android.tools</groupId>
<artifactId>repository</artifactId>
<version>25.2.0-alpha4</version>
diff --git a/common/offline-m2/com/android/tools/sdklib/25.2.0-alpha3/sdklib-25.2.0-alpha3.jar b/common/offline-m2/com/android/tools/sdklib/25.2.0-beta1/sdklib-25.2.0-beta1.jar
similarity index 79%
rename from common/offline-m2/com/android/tools/sdklib/25.2.0-alpha3/sdklib-25.2.0-alpha3.jar
rename to common/offline-m2/com/android/tools/sdklib/25.2.0-beta1/sdklib-25.2.0-beta1.jar
index d1488be..96f8c50 100644
--- a/common/offline-m2/com/android/tools/sdklib/25.2.0-alpha3/sdklib-25.2.0-alpha3.jar
+++ b/common/offline-m2/com/android/tools/sdklib/25.2.0-beta1/sdklib-25.2.0-beta1.jar
Binary files differ
diff --git a/common/offline-m2/com/android/tools/sdklib/25.2.0-alpha3/sdklib-25.2.0-alpha3.pom b/common/offline-m2/com/android/tools/sdklib/25.2.0-beta1/sdklib-25.2.0-beta1.pom
similarity index 93%
rename from common/offline-m2/com/android/tools/sdklib/25.2.0-alpha3/sdklib-25.2.0-alpha3.pom
rename to common/offline-m2/com/android/tools/sdklib/25.2.0-beta1/sdklib-25.2.0-beta1.pom
index f85e582..d71172e 100644
--- a/common/offline-m2/com/android/tools/sdklib/25.2.0-alpha3/sdklib-25.2.0-alpha3.pom
+++ b/common/offline-m2/com/android/tools/sdklib/25.2.0-beta1/sdklib-25.2.0-beta1.pom
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.tools</groupId>
<artifactId>sdklib</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<name>Android Tools sdklib</name>
<description>A library to parse and download the Android SDK.</description>
<url>http://tools.android.com</url>
@@ -33,27 +33,27 @@
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>com.android.tools</groupId>
- <artifactId>dvlib</artifactId>
- <version>25.2.0-alpha3</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>com.android.tools</groupId>
+ <artifactId>repository</artifactId>
+ <version>25.2.0-beta1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<groupId>com.android.tools.layoutlib</groupId>
<artifactId>layoutlib-api</artifactId>
- <version>25.2.0-alpha3</version>
+ <version>25.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.android.tools</groupId>
- <artifactId>repository</artifactId>
- <version>25.2.0-alpha3</version>
+ <artifactId>dvlib</artifactId>
+ <version>25.2.0-beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
diff --git a/common/offline-m2/com/google/protobuf/protobuf-java/2.5.0/NOTICE b/common/offline-m2/com/google/protobuf/protobuf-java/2.5.0/NOTICE
new file mode 100644
index 0000000..f028c82
--- /dev/null
+++ b/common/offline-m2/com/google/protobuf/protobuf-java/2.5.0/NOTICE
@@ -0,0 +1,42 @@
+This license applies to all parts of Protocol Buffers except the following:
+
+ - Atomicops support for generic gcc, located in
+ src/google/protobuf/stubs/atomicops_internals_generic_gcc.h.
+ This file is copyrighted by Red Hat Inc.
+
+ - Atomicops support for AIX/POWER, located in
+ src/google/protobuf/stubs/atomicops_internals_power.h.
+ This file is copyrighted by Bloomberg Finance LP.
+
+Copyright 2014, Google Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Code generated by the Protocol Buffer compiler is owned by the owner
+of the input file used when generating it. This code is not
+standalone and requires a support library to be linked with it. This
+support library is itself covered by the above license.
diff --git a/common/offline-m2/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar b/common/offline-m2/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar
new file mode 100644
index 0000000..4c4e686
--- /dev/null
+++ b/common/offline-m2/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar
Binary files differ
diff --git a/common/offline-m2/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom b/common/offline-m2/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom
new file mode 100644
index 0000000..d468c5f
--- /dev/null
+++ b/common/offline-m2/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>com.google</groupId>
+ <artifactId>google</artifactId>
+ <version>1</version>
+ </parent>
+ <groupId>com.google.protobuf</groupId>
+ <artifactId>protobuf-java</artifactId>
+ <version>2.5.0</version>
+ <packaging>bundle</packaging>
+ <name>Protocol Buffer Java API</name>
+ <description>
+ Protocol Buffers are a way of encoding structured data in an efficient yet
+ extensible format.
+ </description>
+ <inceptionYear>2008</inceptionYear>
+ <url>http://code.google.com/p/protobuf</url>
+ <licenses>
+ <license>
+ <name>New BSD license</name>
+ <url>http://www.opensource.org/licenses/bsd-license.php</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <scm>
+ <url>http://code.google.com/p/protobuf/source/browse</url>
+ <connection>
+ scm:svn:http://protobuf.googlecode.com/svn/trunk/
+ </connection>
+ </scm>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.4</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymock</artifactId>
+ <version>2.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymockclassextension</artifactId>
+ <version>2.2.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/*Test.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-sources</id>
+ <phase>generate-sources</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="target/generated-sources" />
+ <exec executable="../src/protoc">
+ <arg value="--java_out=target/generated-sources" />
+ <arg value="--proto_path=../src" />
+ <arg value="../src/google/protobuf/descriptor.proto" />
+ </exec>
+ </tasks>
+ <sourceRoot>target/generated-sources</sourceRoot>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>generate-test-sources</id>
+ <phase>generate-test-sources</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="target/generated-test-sources" />
+ <exec executable="../src/protoc">
+ <arg value="--java_out=target/generated-test-sources" />
+ <arg value="--proto_path=../src" />
+ <arg value="--proto_path=src/test/java" />
+ <arg value="../src/google/protobuf/unittest.proto" />
+ <arg value="../src/google/protobuf/unittest_import.proto" />
+ <arg value="../src/google/protobuf/unittest_import_public.proto" />
+ <arg value="../src/google/protobuf/unittest_mset.proto" />
+ <arg
+ value="src/test/java/com/google/protobuf/multiple_files_test.proto" />
+ <arg value="src/test/java/com/google/protobuf/nested_builders_test.proto" />
+ <arg value="src/test/java/com/google/protobuf/nested_extension.proto" />
+ <arg value="src/test/java/com/google/protobuf/nested_extension_lite.proto" />
+ <arg value="src/test/java/com/google/protobuf/non_nested_extension.proto" />
+ <arg value="src/test/java/com/google/protobuf/non_nested_extension_lite.proto" />
+ <arg value="src/test/java/com/google/protobuf/test_bad_identifiers.proto" />
+ <arg
+ value="../src/google/protobuf/unittest_optimize_for.proto" />
+ <arg
+ value="../src/google/protobuf/unittest_custom_options.proto" />
+ <arg value="../src/google/protobuf/unittest_lite.proto" />
+ <arg value="../src/google/protobuf/unittest_import_lite.proto" />
+ <arg value="../src/google/protobuf/unittest_import_public_lite.proto" />
+ <arg value="../src/google/protobuf/unittest_lite_imports_nonlite.proto" />
+ <arg value="../src/google/protobuf/unittest_enormous_descriptor.proto" />
+ <arg value="../src/google/protobuf/unittest_no_generic_services.proto" />
+ </exec>
+ </tasks>
+ <testSourceRoot>target/generated-test-sources</testSourceRoot>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-DocURL>http://code.google.com/p/protobuf</Bundle-DocURL>
+ <Bundle-SymbolicName>com.google.protobuf</Bundle-SymbolicName>
+ <Export-Package>com.google.protobuf;version=2.5.0</Export-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>lite</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/AbstractMessageLite.java</include>
+ <include>**/ByteString.java</include>
+ <include>**/CodedInputStream.java</include>
+ <include>**/CodedOutputStream.java</include>
+ <include>**/ExtensionRegistryLite.java</include>
+ <include>**/FieldSet.java</include>
+ <include>**/GeneratedMessageLite.java</include>
+ <include>**/Internal.java</include>
+ <include>**/InvalidProtocolBufferException.java</include>
+ <include>**/LazyStringArrayList.java</include>
+ <include>**/LazyStringList.java</include>
+ <include>**/MessageLite.java</include>
+ <include>**/MessageLiteOrBuilder.java</include>
+ <include>**/SmallSortedMap.java</include>
+ <include>**/UninitializedMessageException.java</include>
+ <include>**/UnmodifiableLazyStringList.java</include>
+ <include>**/WireFormat.java</include>
+ <include>**/Parser.java</include>
+ <include>**/AbstractParser.java</include>
+ <include>**/BoundedByteString.java</include>
+ <include>**/LiteralByteString.java</include>
+ <include>**/RopeByteString.java</include>
+ <include>**/Utf8.java</include>
+ <include>**/LazyField.java</include>
+ </includes>
+ <testIncludes>
+ <testInclude>**/LiteTest.java</testInclude>
+ <testInclude>**/*Lite.java</testInclude>
+ </testIncludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/LiteTest.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <classifier>lite</classifier>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
diff --git a/darwin-x86_64/protoc/bin/protoc b/darwin-x86_64/protoc/bin/protoc
index bb3013e..81375cb 100755
--- a/darwin-x86_64/protoc/bin/protoc
+++ b/darwin-x86_64/protoc/bin/protoc
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/._descriptor.h b/darwin-x86_64/protoc/include/google/protobuf/._descriptor.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/._descriptor.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/._descriptor.pb.h b/darwin-x86_64/protoc/include/google/protobuf/._descriptor.pb.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/._descriptor.pb.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/._descriptor.proto b/darwin-x86_64/protoc/include/google/protobuf/._descriptor.proto
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/._descriptor.proto
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/._descriptor_database.h b/darwin-x86_64/protoc/include/google/protobuf/._descriptor_database.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/._descriptor_database.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/._dynamic_message.h b/darwin-x86_64/protoc/include/google/protobuf/._dynamic_message.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/._dynamic_message.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/._extension_set.h b/darwin-x86_64/protoc/include/google/protobuf/._extension_set.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/._extension_set.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/._generated_enum_reflection.h b/darwin-x86_64/protoc/include/google/protobuf/._generated_enum_reflection.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/._generated_enum_reflection.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/._generated_message_reflection.h b/darwin-x86_64/protoc/include/google/protobuf/._generated_message_reflection.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/._generated_message_reflection.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/._generated_message_util.h b/darwin-x86_64/protoc/include/google/protobuf/._generated_message_util.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/._generated_message_util.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/._message.h b/darwin-x86_64/protoc/include/google/protobuf/._message.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/._message.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/._message_lite.h b/darwin-x86_64/protoc/include/google/protobuf/._message_lite.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/._message_lite.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/._reflection_ops.h b/darwin-x86_64/protoc/include/google/protobuf/._reflection_ops.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/._reflection_ops.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/._repeated_field.h b/darwin-x86_64/protoc/include/google/protobuf/._repeated_field.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/._repeated_field.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/._service.h b/darwin-x86_64/protoc/include/google/protobuf/._service.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/._service.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/._text_format.h b/darwin-x86_64/protoc/include/google/protobuf/._text_format.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/._text_format.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/._unknown_field_set.h b/darwin-x86_64/protoc/include/google/protobuf/._unknown_field_set.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/._unknown_field_set.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/._wire_format.h b/darwin-x86_64/protoc/include/google/protobuf/._wire_format.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/._wire_format.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/._wire_format_lite.h b/darwin-x86_64/protoc/include/google/protobuf/._wire_format_lite.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/._wire_format_lite.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/._wire_format_lite_inl.h b/darwin-x86_64/protoc/include/google/protobuf/._wire_format_lite_inl.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/._wire_format_lite_inl.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/any.h b/darwin-x86_64/protoc/include/google/protobuf/any.h
new file mode 100644
index 0000000..04e5416
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/any.h
@@ -0,0 +1,107 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_ANY_H__
+#define GOOGLE_PROTOBUF_ANY_H__
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/descriptor.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/arenastring.h>
+
+namespace google {
+namespace protobuf {
+namespace internal {
+
+// Helper class used to implement google::protobuf::Any.
+class LIBPROTOBUF_EXPORT AnyMetadata {
+ typedef ArenaStringPtr UrlType;
+ typedef ArenaStringPtr ValueType;
+ public:
+ // AnyMetadata does not take ownership of "type_url" and "value".
+ AnyMetadata(UrlType* type_url, ValueType* value);
+
+ // Packs a message using the default type URL prefix: "type.googleapis.com".
+ // The resulted type URL will be "type.googleapis.com/<message_full_name>".
+ void PackFrom(const Message& message);
+ // Packs a message using the given type URL prefix. The type URL will be
+ // constructed by concatenating the message type's full name to the prefix
+ // with an optional "/" separator if the prefix doesn't already end up "/".
+ // For example, both PackFrom(message, "type.googleapis.com") and
+ // PackFrom(message, "type.googleapis.com/") yield the same result type
+ // URL: "type.googleapis.com/<message_full_name>".
+ void PackFrom(const Message& message, const string& type_url_prefix);
+
+ // Unpacks the payload into the given message. Returns false if the message's
+ // type doesn't match the type specified in the type URL (i.e., the full
+ // name after the last "/" of the type URL doesn't match the message's actaul
+ // full name) or parsing the payload has failed.
+ bool UnpackTo(Message* message) const;
+
+ // Checks whether the type specified in the type URL matches the given type.
+ // A type is consdiered matching if its full name matches the full name after
+ // the last "/" in the type URL.
+ template<typename T>
+ bool Is() const {
+ return InternalIs(T::default_instance().GetDescriptor());
+ }
+
+ private:
+ bool InternalIs(const Descriptor* message) const;
+
+ UrlType* type_url_;
+ ValueType* value_;
+
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(AnyMetadata);
+};
+
+extern const char kAnyFullTypeName[]; // "google.protobuf.Any".
+extern const char kTypeGoogleApisComPrefix[]; // "type.googleapis.com/".
+extern const char kTypeGoogleProdComPrefix[]; // "type.googleprod.com/".
+
+// Get the proto type name from Any::type_url value. For example, passing
+// "type.googleapis.com/rpc.QueryOrigin" will return "rpc.QueryOrigin" in
+// *full_type_name. Returns false if type_url does not start with
+// "type.googleapis.com" or "type.googleprod.com".
+bool ParseAnyTypeUrl(const string& type_url, string* full_type_name);
+
+// See if message is of type google.protobuf.Any, if so, return the descriptors
+// for "type_url" and "value" fields.
+bool GetAnyFieldDescriptors(const Message& message,
+ const FieldDescriptor** type_url_field,
+ const FieldDescriptor** value_field);
+
+} // namespace internal
+} // namespace protobuf
+
+} // namespace google
+#endif // GOOGLE_PROTOBUF_ANY_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/any.pb.h b/darwin-x86_64/protoc/include/google/protobuf/any.pb.h
new file mode 100644
index 0000000..100a67f
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/any.pb.h
@@ -0,0 +1,254 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/protobuf/any.proto
+
+#ifndef PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED
+#define PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 3000000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/arena.h>
+#include <google/protobuf/arenastring.h>
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/metadata.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/unknown_field_set.h>
+#include <google/protobuf/any.h>
+// @@protoc_insertion_point(includes)
+
+namespace google {
+namespace protobuf {
+
+// Internal implementation detail -- do not call these.
+void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fany_2eproto();
+void protobuf_AssignDesc_google_2fprotobuf_2fany_2eproto();
+void protobuf_ShutdownFile_google_2fprotobuf_2fany_2eproto();
+
+class Any;
+
+// ===================================================================
+
+class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message {
+ public:
+ Any();
+ virtual ~Any();
+
+ Any(const Any& from);
+
+ inline Any& operator=(const Any& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const Any& default_instance();
+
+ // 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;
+ template<typename T> bool Is() const {
+ return _any_metadata_.Is<T>();
+ }
+
+ void Swap(Any* other);
+
+ // implements Message ----------------------------------------------
+
+ inline Any* New() const { return New(NULL); }
+
+ Any* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const Any& from);
+ void MergeFrom(const Any& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(Any* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional 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);
+ 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);
+
+ // optional bytes value = 2;
+ void clear_value();
+ static const int kValueFieldNumber = 2;
+ const ::std::string& value() const;
+ void set_value(const ::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);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.Any)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ bool _is_default_instance_;
+ ::google::protobuf::internal::ArenaStringPtr type_url_;
+ ::google::protobuf::internal::ArenaStringPtr value_;
+ mutable int _cached_size_;
+ ::google::protobuf::internal::AnyMetadata _any_metadata_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fany_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fany_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fany_2eproto();
+
+ void InitAsDefaultInstance();
+ static Any* default_instance_;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+#if !PROTOBUF_INLINE_NOT_IN_HEADERS
+// Any
+
+// optional string type_url = 1;
+inline void Any::clear_type_url() {
+ type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Any::type_url() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url)
+ return type_url_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Any::set_type_url(const ::std::string& value) {
+
+ type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url)
+}
+inline void Any::set_type_url(const char* value) {
+
+ type_url_.SetNoArena(&::google::protobuf::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(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.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());
+}
+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());
+}
+inline void Any::set_allocated_type_url(::std::string* type_url) {
+ if (type_url != NULL) {
+
+ } else {
+
+ }
+ type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_url);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url)
+}
+
+// optional bytes value = 2;
+inline void Any::clear_value() {
+ value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Any::value() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Any.value)
+ return value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Any::set_value(const ::std::string& value) {
+
+ value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.Any.value)
+}
+inline void Any::set_value(const char* value) {
+
+ value_.SetNoArena(&::google::protobuf::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(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.value)
+}
+inline ::std::string* Any::mutable_value() {
+
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Any.value)
+ return value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Any::release_value() {
+ // @@protoc_insertion_point(field_release:google.protobuf.Any.value)
+
+ return value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Any::set_allocated_value(::std::string* value) {
+ if (value != NULL) {
+
+ } else {
+
+ }
+ value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value)
+}
+
+#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace protobuf
+} // namespace google
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED
diff --git a/darwin-x86_64/protoc/include/google/protobuf/any.proto b/darwin-x86_64/protoc/include/google/protobuf/any.proto
new file mode 100644
index 0000000..45db6ed
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/any.proto
@@ -0,0 +1,130 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option go_package = "github.com/golang/protobuf/ptypes/any";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "AnyProto";
+option java_multiple_files = true;
+option java_generate_equals_and_hash = true;
+option objc_class_prefix = "GPB";
+
+// `Any` contains an arbitrary serialized protocol buffer message along with a
+// URL that describes the type of the serialized message.
+//
+// Protobuf library provides support to pack/unpack Any values in the form
+// of utility functions or additional generated methods of the Any type.
+//
+// Example 1: Pack and unpack a message in C++.
+//
+// Foo foo = ...;
+// Any any;
+// any.PackFrom(foo);
+// ...
+// if (any.UnpackTo(&foo)) {
+// ...
+// }
+//
+// Example 2: Pack and unpack a message in Java.
+//
+// Foo foo = ...;
+// Any any = Any.pack(foo);
+// ...
+// if (any.is(Foo.class)) {
+// foo = any.unpack(Foo.class);
+// }
+//
+// The pack methods provided by protobuf library will by default use
+// 'type.googleapis.com/full.type.name' as the type URL and the unpack
+// methods only use the fully qualified type name after the last '/'
+// in the type URL, for example "foo.bar.com/x/y.z" will yield type
+// name "y.z".
+//
+//
+// JSON
+// ====
+// The JSON representation of an `Any` value uses the regular
+// representation of the deserialized, embedded message, with an
+// additional field `@type` which contains the type URL. Example:
+//
+// package google.profile;
+// message Person {
+// string first_name = 1;
+// string last_name = 2;
+// }
+//
+// {
+// "@type": "type.googleapis.com/google.profile.Person",
+// "firstName": <string>,
+// "lastName": <string>
+// }
+//
+// If the embedded message type is well-known and has a custom JSON
+// representation, that representation will be embedded adding a field
+// `value` which holds the custom JSON in addition to the `@type`
+// field. Example (for message [google.protobuf.Duration][]):
+//
+// {
+// "@type": "type.googleapis.com/google.protobuf.Duration",
+// "value": "1.212s"
+// }
+//
+message Any {
+ // A URL/resource name whose content describes the type of the
+ // serialized protocol buffer message.
+ //
+ // For URLs which use the schema `http`, `https`, or no schema, the
+ // following restrictions and interpretations apply:
+ //
+ // * If no schema is provided, `https` is assumed.
+ // * The last segment of the URL's path must represent the fully
+ // qualified name of the type (as in `path/google.protobuf.Duration`).
+ // The name should be in a canonical form (e.g., leading "." is
+ // not accepted).
+ // * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+ // value in binary format, or produce an error.
+ // * Applications are allowed to cache lookup results based on the
+ // URL, or have them precompiled into a binary to avoid any
+ // lookup. Therefore, binary compatibility needs to be preserved
+ // on changes to types. (Use versioned type names to manage
+ // breaking changes.)
+ //
+ // Schemas other than `http`, `https` (or the empty schema) might be
+ // used with implementation specific semantics.
+ //
+ string type_url = 1;
+
+ // Must be a valid serialized protocol buffer of the above specified type.
+ bytes value = 2;
+}
diff --git a/darwin-x86_64/protoc/include/google/protobuf/api.pb.h b/darwin-x86_64/protoc/include/google/protobuf/api.pb.h
new file mode 100644
index 0000000..bb35e47
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/api.pb.h
@@ -0,0 +1,984 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/protobuf/api.proto
+
+#ifndef PROTOBUF_google_2fprotobuf_2fapi_2eproto__INCLUDED
+#define PROTOBUF_google_2fprotobuf_2fapi_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 3000000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/arena.h>
+#include <google/protobuf/arenastring.h>
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/metadata.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/unknown_field_set.h>
+#include <google/protobuf/source_context.pb.h>
+#include <google/protobuf/type.pb.h>
+// @@protoc_insertion_point(includes)
+
+namespace google {
+namespace protobuf {
+
+// Internal implementation detail -- do not call these.
+void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fapi_2eproto();
+void protobuf_AssignDesc_google_2fprotobuf_2fapi_2eproto();
+void protobuf_ShutdownFile_google_2fprotobuf_2fapi_2eproto();
+
+class Api;
+class Method;
+class Mixin;
+
+// ===================================================================
+
+class LIBPROTOBUF_EXPORT Api : public ::google::protobuf::Message {
+ public:
+ Api();
+ virtual ~Api();
+
+ Api(const Api& from);
+
+ inline Api& operator=(const Api& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const Api& default_instance();
+
+ void Swap(Api* other);
+
+ // implements Message ----------------------------------------------
+
+ inline Api* New() const { return New(NULL); }
+
+ Api* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const Api& from);
+ void MergeFrom(const Api& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(Api* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional string name = 1;
+ void clear_name();
+ static const int kNameFieldNumber = 1;
+ const ::std::string& name() const;
+ void set_name(const ::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);
+
+ // repeated .google.protobuf.Method methods = 2;
+ int methods_size() const;
+ void clear_methods();
+ static const int kMethodsFieldNumber = 2;
+ const ::google::protobuf::Method& methods(int index) const;
+ ::google::protobuf::Method* mutable_methods(int index);
+ ::google::protobuf::Method* add_methods();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >*
+ mutable_methods();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >&
+ methods() const;
+
+ // repeated .google.protobuf.Option options = 3;
+ int options_size() const;
+ void clear_options();
+ static const int kOptionsFieldNumber = 3;
+ const ::google::protobuf::Option& options(int index) const;
+ ::google::protobuf::Option* mutable_options(int index);
+ ::google::protobuf::Option* add_options();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
+ mutable_options();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
+ options() const;
+
+ // optional string version = 4;
+ void clear_version();
+ static const int kVersionFieldNumber = 4;
+ const ::std::string& version() const;
+ void set_version(const ::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);
+
+ // optional .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* mutable_source_context();
+ ::google::protobuf::SourceContext* release_source_context();
+ void set_allocated_source_context(::google::protobuf::SourceContext* source_context);
+
+ // repeated .google.protobuf.Mixin mixins = 6;
+ int mixins_size() const;
+ void clear_mixins();
+ static const int kMixinsFieldNumber = 6;
+ const ::google::protobuf::Mixin& mixins(int index) const;
+ ::google::protobuf::Mixin* mutable_mixins(int index);
+ ::google::protobuf::Mixin* add_mixins();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >*
+ mutable_mixins();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >&
+ mixins() const;
+
+ // optional .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);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.Api)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ bool _is_default_instance_;
+ ::google::protobuf::internal::ArenaStringPtr name_;
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method > methods_;
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option > options_;
+ ::google::protobuf::internal::ArenaStringPtr version_;
+ ::google::protobuf::SourceContext* source_context_;
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin > mixins_;
+ int syntax_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fapi_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fapi_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fapi_2eproto();
+
+ void InitAsDefaultInstance();
+ static Api* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class LIBPROTOBUF_EXPORT Method : public ::google::protobuf::Message {
+ public:
+ Method();
+ virtual ~Method();
+
+ Method(const Method& from);
+
+ inline Method& operator=(const Method& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const Method& default_instance();
+
+ void Swap(Method* other);
+
+ // implements Message ----------------------------------------------
+
+ inline Method* New() const { return New(NULL); }
+
+ Method* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const Method& from);
+ void MergeFrom(const Method& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(Method* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional string name = 1;
+ void clear_name();
+ static const int kNameFieldNumber = 1;
+ const ::std::string& name() const;
+ void set_name(const ::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);
+
+ // optional 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);
+ 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);
+
+ // optional bool request_streaming = 3;
+ void clear_request_streaming();
+ static const int kRequestStreamingFieldNumber = 3;
+ bool request_streaming() const;
+ void set_request_streaming(bool value);
+
+ // optional 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);
+ 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);
+
+ // optional bool response_streaming = 5;
+ void clear_response_streaming();
+ static const int kResponseStreamingFieldNumber = 5;
+ bool response_streaming() const;
+ void set_response_streaming(bool value);
+
+ // repeated .google.protobuf.Option options = 6;
+ int options_size() const;
+ void clear_options();
+ static const int kOptionsFieldNumber = 6;
+ const ::google::protobuf::Option& options(int index) const;
+ ::google::protobuf::Option* mutable_options(int index);
+ ::google::protobuf::Option* add_options();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
+ mutable_options();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
+ options() const;
+
+ // optional .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);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.Method)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ bool _is_default_instance_;
+ ::google::protobuf::internal::ArenaStringPtr name_;
+ ::google::protobuf::internal::ArenaStringPtr request_type_url_;
+ ::google::protobuf::internal::ArenaStringPtr response_type_url_;
+ bool request_streaming_;
+ bool response_streaming_;
+ int syntax_;
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option > options_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fapi_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fapi_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fapi_2eproto();
+
+ void InitAsDefaultInstance();
+ static Method* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class LIBPROTOBUF_EXPORT Mixin : public ::google::protobuf::Message {
+ public:
+ Mixin();
+ virtual ~Mixin();
+
+ Mixin(const Mixin& from);
+
+ inline Mixin& operator=(const Mixin& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const Mixin& default_instance();
+
+ void Swap(Mixin* other);
+
+ // implements Message ----------------------------------------------
+
+ inline Mixin* New() const { return New(NULL); }
+
+ Mixin* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const Mixin& from);
+ void MergeFrom(const Mixin& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(Mixin* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional string name = 1;
+ void clear_name();
+ static const int kNameFieldNumber = 1;
+ const ::std::string& name() const;
+ void set_name(const ::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);
+
+ // optional string root = 2;
+ void clear_root();
+ static const int kRootFieldNumber = 2;
+ const ::std::string& root() const;
+ void set_root(const ::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);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.Mixin)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ bool _is_default_instance_;
+ ::google::protobuf::internal::ArenaStringPtr name_;
+ ::google::protobuf::internal::ArenaStringPtr root_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fapi_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fapi_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fapi_2eproto();
+
+ void InitAsDefaultInstance();
+ static Mixin* default_instance_;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+#if !PROTOBUF_INLINE_NOT_IN_HEADERS
+// Api
+
+// optional string name = 1;
+inline void Api::clear_name() {
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Api::name() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Api.name)
+ return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Api::set_name(const ::std::string& value) {
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.Api.name)
+}
+inline void Api::set_name(const char* value) {
+
+ name_.SetNoArena(&::google::protobuf::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(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.Api.name)
+}
+inline ::std::string* Api::mutable_name() {
+
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Api.name)
+ return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Api::release_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.Api.name)
+
+ return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Api::set_allocated_name(::std::string* name) {
+ if (name != NULL) {
+
+ } else {
+
+ }
+ name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Api.name)
+}
+
+// repeated .google.protobuf.Method methods = 2;
+inline int Api::methods_size() const {
+ return methods_.size();
+}
+inline void Api::clear_methods() {
+ methods_.Clear();
+}
+inline const ::google::protobuf::Method& Api::methods(int index) const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Api.methods)
+ return methods_.Get(index);
+}
+inline ::google::protobuf::Method* Api::mutable_methods(int index) {
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Api.methods)
+ return methods_.Mutable(index);
+}
+inline ::google::protobuf::Method* Api::add_methods() {
+ // @@protoc_insertion_point(field_add:google.protobuf.Api.methods)
+ return methods_.Add();
+}
+inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >*
+Api::mutable_methods() {
+ // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.methods)
+ return &methods_;
+}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >&
+Api::methods() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.Api.methods)
+ return methods_;
+}
+
+// repeated .google.protobuf.Option options = 3;
+inline int Api::options_size() const {
+ return options_.size();
+}
+inline void Api::clear_options() {
+ options_.Clear();
+}
+inline const ::google::protobuf::Option& Api::options(int index) const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Api.options)
+ return options_.Get(index);
+}
+inline ::google::protobuf::Option* Api::mutable_options(int index) {
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Api.options)
+ return options_.Mutable(index);
+}
+inline ::google::protobuf::Option* Api::add_options() {
+ // @@protoc_insertion_point(field_add:google.protobuf.Api.options)
+ return options_.Add();
+}
+inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
+Api::mutable_options() {
+ // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.options)
+ return &options_;
+}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
+Api::options() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.Api.options)
+ return options_;
+}
+
+// optional string version = 4;
+inline void Api::clear_version() {
+ version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Api::version() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Api.version)
+ return version_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Api::set_version(const ::std::string& value) {
+
+ version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.Api.version)
+}
+inline void Api::set_version(const char* value) {
+
+ version_.SetNoArena(&::google::protobuf::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(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.Api.version)
+}
+inline ::std::string* Api::mutable_version() {
+
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Api.version)
+ return version_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Api::release_version() {
+ // @@protoc_insertion_point(field_release:google.protobuf.Api.version)
+
+ return version_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Api::set_allocated_version(::std::string* version) {
+ if (version != NULL) {
+
+ } else {
+
+ }
+ version_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), version);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Api.version)
+}
+
+// optional .google.protobuf.SourceContext source_context = 5;
+inline bool Api::has_source_context() const {
+ return !_is_default_instance_ && source_context_ != NULL;
+}
+inline void Api::clear_source_context() {
+ if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_;
+ source_context_ = NULL;
+}
+inline const ::google::protobuf::SourceContext& Api::source_context() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Api.source_context)
+ return source_context_ != NULL ? *source_context_ : *default_instance_->source_context_;
+}
+inline ::google::protobuf::SourceContext* Api::mutable_source_context() {
+
+ if (source_context_ == NULL) {
+ source_context_ = new ::google::protobuf::SourceContext;
+ }
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Api.source_context)
+ return source_context_;
+}
+inline ::google::protobuf::SourceContext* Api::release_source_context() {
+ // @@protoc_insertion_point(field_release:google.protobuf.Api.source_context)
+
+ ::google::protobuf::SourceContext* temp = source_context_;
+ source_context_ = NULL;
+ return temp;
+}
+inline void Api::set_allocated_source_context(::google::protobuf::SourceContext* source_context) {
+ delete source_context_;
+ source_context_ = source_context;
+ if (source_context) {
+
+ } else {
+
+ }
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Api.source_context)
+}
+
+// repeated .google.protobuf.Mixin mixins = 6;
+inline int Api::mixins_size() const {
+ return mixins_.size();
+}
+inline void Api::clear_mixins() {
+ mixins_.Clear();
+}
+inline const ::google::protobuf::Mixin& Api::mixins(int index) const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Api.mixins)
+ return mixins_.Get(index);
+}
+inline ::google::protobuf::Mixin* Api::mutable_mixins(int index) {
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Api.mixins)
+ return mixins_.Mutable(index);
+}
+inline ::google::protobuf::Mixin* Api::add_mixins() {
+ // @@protoc_insertion_point(field_add:google.protobuf.Api.mixins)
+ return mixins_.Add();
+}
+inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >*
+Api::mutable_mixins() {
+ // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.mixins)
+ return &mixins_;
+}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >&
+Api::mixins() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.Api.mixins)
+ return mixins_;
+}
+
+// optional .google.protobuf.Syntax syntax = 7;
+inline void Api::clear_syntax() {
+ syntax_ = 0;
+}
+inline ::google::protobuf::Syntax Api::syntax() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Api.syntax)
+ return static_cast< ::google::protobuf::Syntax >(syntax_);
+}
+inline void Api::set_syntax(::google::protobuf::Syntax value) {
+
+ syntax_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.Api.syntax)
+}
+
+// -------------------------------------------------------------------
+
+// Method
+
+// optional string name = 1;
+inline void Method::clear_name() {
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Method::name() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Method.name)
+ return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Method::set_name(const ::std::string& value) {
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.Method.name)
+}
+inline void Method::set_name(const char* value) {
+
+ name_.SetNoArena(&::google::protobuf::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(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.Method.name)
+}
+inline ::std::string* Method::mutable_name() {
+
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Method.name)
+ return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Method::release_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.Method.name)
+
+ return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Method::set_allocated_name(::std::string* name) {
+ if (name != NULL) {
+
+ } else {
+
+ }
+ name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.name)
+}
+
+// optional string request_type_url = 2;
+inline void Method::clear_request_type_url() {
+ request_type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+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(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Method::set_request_type_url(const ::std::string& value) {
+
+ request_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.Method.request_type_url)
+}
+inline void Method::set_request_type_url(const char* value) {
+
+ request_type_url_.SetNoArena(&::google::protobuf::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(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.Method.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());
+}
+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());
+}
+inline void Method::set_allocated_request_type_url(::std::string* request_type_url) {
+ if (request_type_url != NULL) {
+
+ } else {
+
+ }
+ request_type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), request_type_url);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.request_type_url)
+}
+
+// optional bool request_streaming = 3;
+inline void Method::clear_request_streaming() {
+ request_streaming_ = false;
+}
+inline bool Method::request_streaming() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Method.request_streaming)
+ return request_streaming_;
+}
+inline void Method::set_request_streaming(bool value) {
+
+ request_streaming_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.Method.request_streaming)
+}
+
+// optional string response_type_url = 4;
+inline void Method::clear_response_type_url() {
+ response_type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+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(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Method::set_response_type_url(const ::std::string& value) {
+
+ response_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.Method.response_type_url)
+}
+inline void Method::set_response_type_url(const char* value) {
+
+ response_type_url_.SetNoArena(&::google::protobuf::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(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.Method.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());
+}
+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());
+}
+inline void Method::set_allocated_response_type_url(::std::string* response_type_url) {
+ if (response_type_url != NULL) {
+
+ } else {
+
+ }
+ response_type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), response_type_url);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.response_type_url)
+}
+
+// optional bool response_streaming = 5;
+inline void Method::clear_response_streaming() {
+ response_streaming_ = false;
+}
+inline bool Method::response_streaming() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Method.response_streaming)
+ return response_streaming_;
+}
+inline void Method::set_response_streaming(bool value) {
+
+ response_streaming_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.Method.response_streaming)
+}
+
+// repeated .google.protobuf.Option options = 6;
+inline int Method::options_size() const {
+ return options_.size();
+}
+inline void Method::clear_options() {
+ options_.Clear();
+}
+inline const ::google::protobuf::Option& Method::options(int index) const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Method.options)
+ return options_.Get(index);
+}
+inline ::google::protobuf::Option* Method::mutable_options(int index) {
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Method.options)
+ return options_.Mutable(index);
+}
+inline ::google::protobuf::Option* Method::add_options() {
+ // @@protoc_insertion_point(field_add:google.protobuf.Method.options)
+ return options_.Add();
+}
+inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
+Method::mutable_options() {
+ // @@protoc_insertion_point(field_mutable_list:google.protobuf.Method.options)
+ return &options_;
+}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
+Method::options() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.Method.options)
+ return options_;
+}
+
+// optional .google.protobuf.Syntax syntax = 7;
+inline void Method::clear_syntax() {
+ syntax_ = 0;
+}
+inline ::google::protobuf::Syntax Method::syntax() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Method.syntax)
+ return static_cast< ::google::protobuf::Syntax >(syntax_);
+}
+inline void Method::set_syntax(::google::protobuf::Syntax value) {
+
+ syntax_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.Method.syntax)
+}
+
+// -------------------------------------------------------------------
+
+// Mixin
+
+// optional string name = 1;
+inline void Mixin::clear_name() {
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Mixin::name() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Mixin.name)
+ return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Mixin::set_name(const ::std::string& value) {
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.Mixin.name)
+}
+inline void Mixin::set_name(const char* value) {
+
+ name_.SetNoArena(&::google::protobuf::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(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.Mixin.name)
+}
+inline ::std::string* Mixin::mutable_name() {
+
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Mixin.name)
+ return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Mixin::release_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.Mixin.name)
+
+ return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Mixin::set_allocated_name(::std::string* name) {
+ if (name != NULL) {
+
+ } else {
+
+ }
+ name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Mixin.name)
+}
+
+// optional string root = 2;
+inline void Mixin::clear_root() {
+ root_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Mixin::root() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Mixin.root)
+ return root_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Mixin::set_root(const ::std::string& value) {
+
+ root_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.Mixin.root)
+}
+inline void Mixin::set_root(const char* value) {
+
+ root_.SetNoArena(&::google::protobuf::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(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.Mixin.root)
+}
+inline ::std::string* Mixin::mutable_root() {
+
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Mixin.root)
+ return root_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Mixin::release_root() {
+ // @@protoc_insertion_point(field_release:google.protobuf.Mixin.root)
+
+ return root_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Mixin::set_allocated_root(::std::string* root) {
+ if (root != NULL) {
+
+ } else {
+
+ }
+ root_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), root);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Mixin.root)
+}
+
+#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace protobuf
+} // namespace google
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_google_2fprotobuf_2fapi_2eproto__INCLUDED
diff --git a/darwin-x86_64/protoc/include/google/protobuf/api.proto b/darwin-x86_64/protoc/include/google/protobuf/api.proto
new file mode 100644
index 0000000..dbe87b8
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/api.proto
@@ -0,0 +1,202 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+import "google/protobuf/source_context.proto";
+import "google/protobuf/type.proto";
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "ApiProto";
+option java_multiple_files = true;
+option java_generate_equals_and_hash = true;
+option objc_class_prefix = "GPB";
+
+// Api is a light-weight descriptor for a protocol buffer service.
+message Api {
+
+ // The fully qualified name of this api, including package name
+ // followed by the api's simple name.
+ string name = 1;
+
+ // The methods of this api, in unspecified order.
+ repeated Method methods = 2;
+
+ // Any metadata attached to the API.
+ repeated Option options = 3;
+
+ // A version string for this api. If specified, must have the form
+ // `major-version.minor-version`, as in `1.10`. If the minor version
+ // is omitted, it defaults to zero. If the entire version field is
+ // empty, the major version is derived from the package name, as
+ // outlined below. If the field is not empty, the version in the
+ // package name will be verified to be consistent with what is
+ // provided here.
+ //
+ // The versioning schema uses [semantic
+ // versioning](http://semver.org) where the major version number
+ // indicates a breaking change and the minor version an additive,
+ // non-breaking change. Both version numbers are signals to users
+ // what to expect from different versions, and should be carefully
+ // chosen based on the product plan.
+ //
+ // The major version is also reflected in the package name of the
+ // API, which must end in `v<major-version>`, as in
+ // `google.feature.v1`. For major versions 0 and 1, the suffix can
+ // be omitted. Zero major versions must only be used for
+ // experimental, none-GA apis.
+ //
+ //
+ string version = 4;
+
+ // Source context for the protocol buffer service represented by this
+ // message.
+ SourceContext source_context = 5;
+
+ // Included APIs. See [Mixin][].
+ repeated Mixin mixins = 6;
+
+ // The source syntax of the service.
+ Syntax syntax = 7;
+}
+
+// Method represents a method of an api.
+message Method {
+
+ // The simple name of this method.
+ string name = 1;
+
+ // A URL of the input message type.
+ string request_type_url = 2;
+
+ // If true, the request is streamed.
+ bool request_streaming = 3;
+
+ // The URL of the output message type.
+ string response_type_url = 4;
+
+ // If true, the response is streamed.
+ bool response_streaming = 5;
+
+ // Any metadata attached to the method.
+ repeated Option options = 6;
+
+ // The source syntax of this method.
+ Syntax syntax = 7;
+}
+
+// Declares an API to be included in this API. The including API must
+// redeclare all the methods from the included API, but documentation
+// and options are inherited as follows:
+//
+// - If after comment and whitespace stripping, the documentation
+// string of the redeclared method is empty, it will be inherited
+// from the original method.
+//
+// - Each annotation belonging to the service config (http,
+// visibility) which is not set in the redeclared method will be
+// inherited.
+//
+// - If an http annotation is inherited, the path pattern will be
+// modified as follows. Any version prefix will be replaced by the
+// version of the including API plus the [root][] path if specified.
+//
+// Example of a simple mixin:
+//
+// package google.acl.v1;
+// service AccessControl {
+// // Get the underlying ACL object.
+// rpc GetAcl(GetAclRequest) returns (Acl) {
+// option (google.api.http).get = "/v1/{resource=**}:getAcl";
+// }
+// }
+//
+// package google.storage.v2;
+// service Storage {
+// rpc GetAcl(GetAclRequest) returns (Acl);
+//
+// // Get a data record.
+// rpc GetData(GetDataRequest) returns (Data) {
+// option (google.api.http).get = "/v2/{resource=**}";
+// }
+// }
+//
+// Example of a mixin configuration:
+//
+// apis:
+// - name: google.storage.v2.Storage
+// mixins:
+// - name: google.acl.v1.AccessControl
+//
+// The mixin construct implies that all methods in `AccessControl` are
+// also declared with same name and request/response types in
+// `Storage`. A documentation generator or annotation processor will
+// see the effective `Storage.GetAcl` method after inherting
+// documentation and annotations as follows:
+//
+// service Storage {
+// // Get the underlying ACL object.
+// rpc GetAcl(GetAclRequest) returns (Acl) {
+// option (google.api.http).get = "/v2/{resource=**}:getAcl";
+// }
+// ...
+// }
+//
+// Note how the version in the path pattern changed from `v1` to `v2`.
+//
+// If the `root` field in the mixin is specified, it should be a
+// relative path under which inherited HTTP paths are placed. Example:
+//
+// apis:
+// - name: google.storage.v2.Storage
+// mixins:
+// - name: google.acl.v1.AccessControl
+// root: acls
+//
+// This implies the following inherited HTTP annotation:
+//
+// service Storage {
+// // Get the underlying ACL object.
+// rpc GetAcl(GetAclRequest) returns (Acl) {
+// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
+// }
+// ...
+// }
+message Mixin {
+ // The fully qualified name of the API which is included.
+ string name = 1;
+
+ // If non-empty specifies a path under which inherited HTTP paths
+ // are rooted.
+ string root = 2;
+}
diff --git a/darwin-x86_64/protoc/include/google/protobuf/arena.h b/darwin-x86_64/protoc/include/google/protobuf/arena.h
new file mode 100644
index 0000000..cf07b9f
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/arena.h
@@ -0,0 +1,925 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_ARENA_H__
+#define GOOGLE_PROTOBUF_ARENA_H__
+
+#include <limits>
+#ifdef max
+#undef max // Visual Studio defines this macro
+#endif
+#if __cplusplus >= 201103L
+#include <google/protobuf/stubs/type_traits.h>
+#endif
+#if defined(_MSC_VER) && !_HAS_EXCEPTIONS
+// Work around bugs in MSVC <typeinfo> header when _HAS_EXCEPTIONS=0.
+#include <exception>
+#include <typeinfo>
+namespace std {
+using type_info = ::type_info;
+}
+#else
+#include <typeinfo>
+#endif
+
+#include <google/protobuf/stubs/atomic_sequence_num.h>
+#include <google/protobuf/stubs/atomicops.h>
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/logging.h>
+#include <google/protobuf/stubs/mutex.h>
+#include <google/protobuf/stubs/type_traits.h>
+
+
+namespace google {
+namespace protobuf {
+
+class Arena; // defined below
+class Message; // message.h
+
+namespace internal {
+class ArenaString; // arenastring.h
+class LazyField; // lazy_field.h
+
+template<typename Type>
+class GenericTypeHandler; // repeated_field.h
+
+// Templated cleanup methods.
+template<typename T> void arena_destruct_object(void* object) {
+ reinterpret_cast<T*>(object)->~T();
+}
+template<typename T> void arena_delete_object(void* object) {
+ delete reinterpret_cast<T*>(object);
+}
+inline void arena_free(void* object, size_t /* size */) {
+ free(object);
+}
+
+} // namespace internal
+
+// ArenaOptions provides optional additional parameters to arena construction
+// that control its block-allocation behavior.
+struct ArenaOptions {
+ // This defines the size of the first block requested from the system malloc.
+ // Subsequent block sizes will increase in a geometric series up to a maximum.
+ size_t start_block_size;
+
+ // This defines the maximum block size requested from system malloc (unless an
+ // individual arena allocation request occurs with a size larger than this
+ // maximum). Requested block sizes increase up to this value, then remain
+ // here.
+ size_t max_block_size;
+
+ // An initial block of memory for the arena to use, or NULL for none. If
+ // provided, the block must live at least as long as the arena itself. The
+ // creator of the Arena retains ownership of the block after the Arena is
+ // destroyed.
+ char* initial_block;
+
+ // The size of the initial block, if provided.
+ size_t initial_block_size;
+
+ // A function pointer to an alloc method that returns memory blocks of size
+ // requested. By default, it contains a ptr to the malloc function.
+ //
+ // NOTE: block_alloc and dealloc functions are expected to behave like
+ // malloc and free, including Asan poisoning.
+ void* (*block_alloc)(size_t);
+ // A function pointer to a dealloc method that takes ownership of the blocks
+ // from the arena. By default, it contains a ptr to a wrapper function that
+ // calls free.
+ void (*block_dealloc)(void*, size_t);
+
+ // Hooks for adding external functionality such as user-specific metrics
+ // collection, specific debugging abilities, etc.
+ // Init hook may return a pointer to a cookie to be stored in the arena.
+ // reset and destruction hooks will then be called with the same cookie
+ // pointer. This allows us to save an external object per arena instance and
+ // use it on the other hooks (Note: It is just as legal for init to return
+ // NULL and not use the cookie feature).
+ // on_arena_reset and on_arena_destruction also receive the space used in
+ // the arena just before the reset.
+ void* (*on_arena_init)(Arena* arena);
+ void (*on_arena_reset)(Arena* arena, void* cookie, uint64 space_used);
+ void (*on_arena_destruction)(Arena* arena, void* cookie, uint64 space_used);
+
+ // type_info is promised to be static - its lifetime extends to
+ // match program's lifetime (It is given by typeid operator).
+ // Note: typeid(void) will be passed as allocated_type every time we
+ // intentionally want to avoid monitoring an allocation. (i.e. internal
+ // allocations for managing the arena)
+ void (*on_arena_allocation)(const std::type_info* allocated_type,
+ uint64 alloc_size, void* cookie);
+
+ ArenaOptions()
+ : start_block_size(kDefaultStartBlockSize),
+ max_block_size(kDefaultMaxBlockSize),
+ initial_block(NULL),
+ initial_block_size(0),
+ block_alloc(&malloc),
+ block_dealloc(&internal::arena_free),
+ on_arena_init(NULL),
+ on_arena_reset(NULL),
+ on_arena_destruction(NULL),
+ on_arena_allocation(NULL) {}
+
+ private:
+ // Constants define default starting block size and max block size for
+ // arena allocator behavior -- see descriptions above.
+ static const size_t kDefaultStartBlockSize = 256;
+ static const size_t kDefaultMaxBlockSize = 8192;
+};
+
+// Support for non-RTTI environments. (The metrics hooks API uses type
+// information.)
+#ifndef GOOGLE_PROTOBUF_NO_RTTI
+#define RTTI_TYPE_ID(type) (&typeid(type))
+#else
+#define RTTI_TYPE_ID(type) (NULL)
+#endif
+
+// Arena allocator. Arena allocation replaces ordinary (heap-based) allocation
+// with new/delete, and improves performance by aggregating allocations into
+// larger blocks and freeing allocations all at once. Protocol messages are
+// allocated on an arena by using Arena::CreateMessage<T>(Arena*), below, and
+// are automatically freed when the arena is destroyed.
+//
+// This is a thread-safe implementation: multiple threads may allocate from the
+// arena concurrently. Destruction is not thread-safe and the destructing
+// thread must synchronize with users of the arena first.
+//
+// An arena provides two allocation interfaces: CreateMessage<T>, which works
+// for arena-enabled proto2 message types as well as other types that satisfy
+// the appropriate protocol (described below), and Create<T>, which works for
+// any arbitrary type T. CreateMessage<T> is better when the type T supports it,
+// because this interface (i) passes the arena pointer to the created object so
+// that its sub-objects and internal allocations can use the arena too, and (ii)
+// elides the object's destructor call when possible. Create<T> does not place
+// any special requirements on the type T, and will invoke the object's
+// destructor when the arena is destroyed.
+//
+// The arena message allocation protocol, required by CreateMessage<T>, is as
+// follows:
+//
+// - The type T must have (at least) two constructors: a constructor with no
+// arguments, called when a T is allocated on the heap; and a constructor with
+// a google::protobuf::Arena* argument, called when a T is allocated on an arena. If the
+// second constructor is called with a NULL arena pointer, it must be
+// equivalent to invoking the first (no-argument) constructor.
+//
+// - The type T must have a particular type trait: a nested type
+// |InternalArenaConstructable_|. This is usually a typedef to |void|. If no
+// such type trait exists, then the instantiation CreateMessage<T> will fail
+// to compile.
+//
+// - The type T *may* have the type trait |DestructorSkippable_|. If this type
+// trait is present in the type, then its destructor will not be called if and
+// only if it was passed a non-NULL arena pointer. If this type trait is not
+// present on the type, then its destructor is always called when the
+// containing arena is destroyed.
+//
+// - One- and two-user-argument forms of CreateMessage<T>() also exist that
+// forward these constructor arguments to T's constructor: for example,
+// CreateMessage<T>(Arena*, arg1, arg2) forwards to a constructor T(Arena*,
+// arg1, arg2).
+//
+// This protocol is implemented by all arena-enabled proto2 message classes as
+// well as RepeatedPtrField.
+
+#if __cplusplus >= 201103L
+class LIBPROTOBUF_EXPORT Arena final {
+#else
+class LIBPROTOBUF_EXPORT Arena {
+#endif
+ public:
+ // Arena constructor taking custom options. See ArenaOptions below for
+ // descriptions of the options available.
+ explicit Arena(const ArenaOptions& options) : options_(options) {
+ Init();
+ }
+
+ // Default constructor with sensible default options, tuned for average
+ // use-cases.
+ Arena() {
+ Init();
+ }
+
+ // Destructor deletes all owned heap allocated objects, and destructs objects
+ // that have non-trivial destructors, except for proto2 message objects whose
+ // destructors can be skipped. Also, frees all blocks except the initial block
+ // if it was passed in.
+ ~Arena();
+
+ // API to create proto2 message objects on the arena. If the arena passed in
+ // is NULL, then a heap allocated object is returned. Type T must be a message
+ // defined in a .proto file with cc_enable_arenas set to true, otherwise a
+ // compilation error will occur.
+ //
+ // RepeatedField and RepeatedPtrField may also be instantiated directly on an
+ // arena with this method.
+ //
+ // This function also accepts any type T that satisfies the arena message
+ // allocation protocol, documented above.
+ template <typename T> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ static T* CreateMessage(::google::protobuf::Arena* arena) {
+ if (arena == NULL) {
+ return new T;
+ } else {
+ return arena->CreateMessageInternal<T>(static_cast<T*>(0));
+ }
+ }
+
+ // One-argument form of CreateMessage. This is useful for constructing objects
+ // that implement the arena message construction protocol described above but
+ // take additional constructor arguments.
+ template <typename T, typename Arg> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ static T* CreateMessage(::google::protobuf::Arena* arena, const Arg& arg) {
+ if (arena == NULL) {
+ return new T(NULL, arg);
+ } else {
+ return arena->CreateMessageInternal<T>(static_cast<T*>(0),
+ arg);
+ }
+ }
+
+ // Two-argument form of CreateMessage. This is useful for constructing objects
+ // that implement the arena message construction protocol described above but
+ // take additional constructor arguments.
+ template <typename T, typename Arg1, typename Arg2> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ static T* CreateMessage(::google::protobuf::Arena* arena,
+ const Arg1& arg1,
+ const Arg2& arg2) {
+ if (arena == NULL) {
+ return new T(NULL, arg1, arg2);
+ } else {
+ return arena->CreateMessageInternal<T>(static_cast<T*>(0),
+ arg1, arg2);
+ }
+ }
+
+ // API to create any objects on the arena. Note that only the object will
+ // be created on the arena; the underlying ptrs (in case of a proto2 message)
+ // will be still heap allocated. Proto messages should usually be allocated
+ // with CreateMessage<T>() instead.
+ //
+ // Note that even if T satisfies the arena message construction protocol
+ // (InternalArenaConstructable_ trait and optional DestructorSkippable_
+ // trait), as described above, this function does not follow the protocol;
+ // instead, it treats T as a black-box type, just as if it did not have these
+ // traits. Specifically, T's constructor arguments will always be only those
+ // passed to Create<T>() -- no additional arena pointer is implicitly added.
+ // Furthermore, the destructor will always be called at arena destruction time
+ // (unless the destructor is trivial). Hence, from T's point of view, it is as
+ // if the object were allocated on the heap (except that the underlying memory
+ // is obtained from the arena).
+ template <typename T> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ static T* Create(::google::protobuf::Arena* arena) {
+ if (arena == NULL) {
+ return new T();
+ } else {
+ return arena->CreateInternal<T>(google::protobuf::internal::has_trivial_destructor<T>::value);
+ }
+ }
+
+ // Version of the above with one constructor argument for the created object.
+ template <typename T, typename Arg> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ static T* Create(::google::protobuf::Arena* arena, const Arg& arg) {
+ if (arena == NULL) {
+ return new T(arg);
+ } else {
+ return arena->CreateInternal<T>(google::protobuf::internal::has_trivial_destructor<T>::value,
+ arg);
+ }
+ }
+
+ // Version of the above with two constructor arguments for the created object.
+ template <typename T, typename Arg1, typename Arg2> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ static T* Create(::google::protobuf::Arena* arena, const Arg1& arg1, const Arg2& arg2) {
+ if (arena == NULL) {
+ return new T(arg1, arg2);
+ } else {
+ return arena->CreateInternal<T>(google::protobuf::internal::has_trivial_destructor<T>::value,
+ arg1, arg2);
+ }
+ }
+
+ // Version of the above with three constructor arguments for the created
+ // object.
+ template <typename T, typename Arg1, typename Arg2, typename Arg3>
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE static T* Create(::google::protobuf::Arena* arena,
+ const Arg1& arg1, const Arg2& arg2,
+ const Arg3& arg3) {
+ if (arena == NULL) {
+ return new T(arg1, arg2, arg3);
+ } else {
+ return arena->CreateInternal<T>(google::protobuf::internal::has_trivial_destructor<T>::value,
+ arg1, arg2, arg3);
+ }
+ }
+
+ // Version of the above with four constructor arguments for the created
+ // object.
+ template <typename T, typename Arg1, typename Arg2, typename Arg3,
+ typename Arg4>
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE static T* Create(::google::protobuf::Arena* arena,
+ const Arg1& arg1, const Arg2& arg2,
+ const Arg3& arg3, const Arg4& arg4) {
+ if (arena == NULL) {
+ return new T(arg1, arg2, arg3, arg4);
+ } else {
+ return arena->CreateInternal<T>(google::protobuf::internal::has_trivial_destructor<T>::value,
+ arg1, arg2, arg3, arg4);
+ }
+ }
+
+ // Version of the above with five constructor arguments for the created
+ // object.
+ template <typename T, typename Arg1, typename Arg2, typename Arg3,
+ typename Arg4, typename Arg5>
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE static T* Create(::google::protobuf::Arena* arena,
+ const Arg1& arg1, const Arg2& arg2,
+ const Arg3& arg3, const Arg4& arg4,
+ const Arg5& arg5) {
+ if (arena == NULL) {
+ return new T(arg1, arg2, arg3, arg4, arg5);
+ } else {
+ return arena->CreateInternal<T>(google::protobuf::internal::has_trivial_destructor<T>::value,
+ arg1, arg2, arg3, arg4, arg5);
+ }
+ }
+
+ // Version of the above with six constructor arguments for the created
+ // object.
+ template <typename T, typename Arg1, typename Arg2, typename Arg3,
+ typename Arg4, typename Arg5, typename Arg6>
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE static T* Create(::google::protobuf::Arena* arena,
+ const Arg1& arg1, const Arg2& arg2,
+ const Arg3& arg3, const Arg4& arg4,
+ const Arg5& arg5, const Arg6& arg6) {
+ if (arena == NULL) {
+ return new T(arg1, arg2, arg3, arg4, arg5, arg6);
+ } else {
+ return arena->CreateInternal<T>(google::protobuf::internal::has_trivial_destructor<T>::value,
+ arg1, arg2, arg3, arg4, arg5, arg6);
+ }
+ }
+
+ // Version of the above with seven constructor arguments for the created
+ // object.
+ template <typename T, typename Arg1, typename Arg2, typename Arg3,
+ typename Arg4, typename Arg5, typename Arg6, typename Arg7>
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE static T* Create(::google::protobuf::Arena* arena,
+ const Arg1& arg1, const Arg2& arg2,
+ const Arg3& arg3, const Arg4& arg4,
+ const Arg5& arg5, const Arg6& arg6,
+ const Arg7& arg7) {
+ if (arena == NULL) {
+ return new T(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+ } else {
+ return arena->CreateInternal<T>(google::protobuf::internal::has_trivial_destructor<T>::value,
+ arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+ }
+ }
+
+ // Version of the above with eight constructor arguments for the created
+ // object.
+ template <typename T, typename Arg1, typename Arg2, typename Arg3,
+ typename Arg4, typename Arg5, typename Arg6, typename Arg7,
+ typename Arg8>
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE static T* Create(::google::protobuf::Arena* arena,
+ const Arg1& arg1, const Arg2& arg2,
+ const Arg3& arg3, const Arg4& arg4,
+ const Arg5& arg5, const Arg6& arg6,
+ const Arg7& arg7, const Arg8& arg8) {
+ if (arena == NULL) {
+ return new T(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
+ } else {
+ return arena->CreateInternal<T>(
+ google::protobuf::internal::has_trivial_destructor<T>::value,
+ arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
+ }
+ }
+
+ // Create an array of object type T on the arena *without* invoking the
+ // constructor of T. If `arena` is null, then the return value should be freed
+ // with `delete[] x;` (or `::operator delete[](x);`).
+ // To ensure safe uses, this function checks at compile time
+ // (when compiled as C++11) that T is trivially default-constructible and
+ // trivially destructible.
+ template <typename T> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ static T* CreateArray(::google::protobuf::Arena* arena, size_t num_elements) {
+ GOOGLE_CHECK_LE(num_elements,
+ std::numeric_limits<size_t>::max() / sizeof(T))
+ << "Requested size is too large to fit into size_t.";
+ if (arena == NULL) {
+ return static_cast<T*>(::operator new[](num_elements * sizeof(T)));
+ } else {
+ return arena->CreateInternalRawArray<T>(num_elements);
+ }
+ }
+
+ // Returns the total space used by the arena, which is the sums of the sizes
+ // of the underlying blocks. The total space used may not include the new
+ // blocks that are allocated by this arena from other threads concurrently
+ // with the call to this method.
+ GOOGLE_ATTRIBUTE_NOINLINE uint64 SpaceAllocated() const;
+ // As above, but does not include any free space in underlying blocks.
+ GOOGLE_ATTRIBUTE_NOINLINE uint64 SpaceUsed() const;
+
+ // Combines SpaceAllocated and SpaceUsed. Returns a pair of
+ // <space_allocated, space_used>.
+ GOOGLE_ATTRIBUTE_NOINLINE pair<uint64, uint64> SpaceAllocatedAndUsed() const;
+
+ // Frees all storage allocated by this arena after calling destructors
+ // registered with OwnDestructor() and freeing objects registered with Own().
+ // Any objects allocated on this arena are unusable after this call. It also
+ // returns the total space used by the arena which is the sums of the sizes
+ // of the allocated blocks. This method is not thread-safe.
+ GOOGLE_ATTRIBUTE_NOINLINE uint64 Reset();
+
+ // Adds |object| to a list of heap-allocated objects to be freed with |delete|
+ // when the arena is destroyed or reset.
+ template <typename T> GOOGLE_ATTRIBUTE_NOINLINE
+ void Own(T* object) {
+ OwnInternal(object, google::protobuf::internal::is_convertible<T*, ::google::protobuf::Message*>());
+ }
+
+ // Adds |object| to a list of objects whose destructors will be manually
+ // called when the arena is destroyed or reset. This differs from Own() in
+ // that it does not free the underlying memory with |delete|; hence, it is
+ // normally only used for objects that are placement-newed into
+ // arena-allocated memory.
+ template <typename T> GOOGLE_ATTRIBUTE_NOINLINE
+ void OwnDestructor(T* object) {
+ if (object != NULL) {
+ AddListNode(object, &internal::arena_destruct_object<T>);
+ }
+ }
+
+ // Adds a custom member function on an object to the list of destructors that
+ // will be manually called when the arena is destroyed or reset. This differs
+ // from OwnDestructor() in that any member function may be specified, not only
+ // the class destructor.
+ GOOGLE_ATTRIBUTE_NOINLINE void OwnCustomDestructor(void* object,
+ void (*destruct)(void*)) {
+ AddListNode(object, destruct);
+ }
+
+ // Retrieves the arena associated with |value| if |value| is an arena-capable
+ // message, or NULL otherwise. This differs from value->GetArena() in that the
+ // latter is a virtual call, while this method is a templated call that
+ // resolves at compile-time.
+ template<typename T> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ static ::google::protobuf::Arena* GetArena(const T* value) {
+ return GetArenaInternal(value, static_cast<T*>(0));
+ }
+
+ private:
+ struct InternalIsArenaConstructableHelper {
+ template<typename U>
+ static char ArenaConstructable(
+ const typename U::InternalArenaConstructable_*);
+ template<typename U>
+ static double ArenaConstructable(...);
+ };
+
+ public:
+ // Helper typetrait that indicates support for arenas in a type T at compile
+ // time. This is public only to allow construction of higher-level templated
+ // utilities. is_arena_constructable<T>::value is true if the message type T
+ // has arena support enabled, and false otherwise.
+ //
+ // This is inside Arena because only Arena has the friend relationships
+ // necessary to see the underlying generated code traits.
+ template <typename T>
+ struct is_arena_constructable
+ : public google::protobuf::internal::integral_constant<
+ bool, sizeof(InternalIsArenaConstructableHelper::ArenaConstructable<
+ const T>(static_cast<const T*>(0))) == sizeof(char)> {
+ };
+
+ private:
+ // Blocks are variable length malloc-ed objects. The following structure
+ // describes the common header for all blocks.
+ struct Block {
+ void* owner; // &ThreadCache of thread that owns this block, or
+ // &this->owner if not yet owned by a thread.
+ Block* next; // Next block in arena (may have different owner)
+ // ((char*) &block) + pos is next available byte. It is always
+ // aligned at a multiple of 8 bytes.
+ size_t pos;
+ size_t size; // total size of the block.
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE size_t avail() const { return size - pos; }
+ // data follows
+ };
+
+ template<typename Type> friend class ::google::protobuf::internal::GenericTypeHandler;
+ friend class MockArena; // For unit-testing.
+ friend class internal::ArenaString; // For AllocateAligned.
+ friend class internal::LazyField; // For CreateMaybeMessage.
+
+ struct ThreadCache {
+ // The ThreadCache is considered valid as long as this matches the
+ // lifecycle_id of the arena being used.
+ int64 last_lifecycle_id_seen;
+ Block* last_block_used_;
+ };
+
+ static const size_t kHeaderSize = sizeof(Block);
+ static google::protobuf::internal::SequenceNumber lifecycle_id_generator_;
+#if defined(GOOGLE_PROTOBUF_NO_THREADLOCAL)
+ // Android ndk does not support GOOGLE_THREAD_LOCAL keyword so we use a custom thread
+ // local storage class we implemented.
+ // iOS also does not support the GOOGLE_THREAD_LOCAL keyword.
+ static ThreadCache& thread_cache();
+#elif defined(PROTOBUF_USE_DLLS)
+ // Thread local variables cannot be exposed through DLL interface but we can
+ // wrap them in static functions.
+ static ThreadCache& thread_cache();
+#else
+ static GOOGLE_THREAD_LOCAL ThreadCache thread_cache_;
+ static ThreadCache& thread_cache() { return thread_cache_; }
+#endif
+
+ // SFINAE for skipping addition to delete list for a message type when created
+ // with CreateMessage. This is mainly to skip proto2/proto1 message objects
+ // with cc_enable_arenas=true from being part of the delete list. Also, note,
+ // compiler will optimize out the branch in CreateInternal<T>.
+ template<typename T>
+ static inline bool SkipDeleteList(typename T::DestructorSkippable_*) {
+ return true;
+ }
+
+ // For message objects that don't have the DestructorSkippable_ trait, we
+ // always add to the delete list.
+ template<typename T>
+ static inline bool SkipDeleteList(...) {
+ return google::protobuf::internal::has_trivial_destructor<T>::value;
+ }
+
+ private:
+ struct InternalIsDestructorSkippableHelper {
+ template<typename U>
+ static char DestructorSkippable(
+ const typename U::DestructorSkippable_*);
+ template<typename U>
+ static double DestructorSkippable(...);
+ };
+
+ public:
+ // Helper typetrait that indicates whether the desctructor of type T should be
+ // called when arena is destroyed at compile time. This is only to allow
+ // construction of higher-level templated utilities.
+ // is_destructor_skippable<T>::value is true if the destructor of the message
+ // type T should not be called when arena is destroyed or false otherwise.
+ // This is inside Arena because only Arena has the friend relationships
+ // necessary to see the underlying generated code traits.
+ template<typename T>
+ struct is_destructor_skippable
+ : public google::protobuf::internal::integral_constant<
+ bool,
+ sizeof(InternalIsDestructorSkippableHelper::DestructorSkippable<
+ const T>(static_cast<const T*>(0))) == sizeof(char) ||
+ google::protobuf::internal::has_trivial_destructor<T>::value> {};
+
+ // CreateMessage<T> requires that T supports arenas, but this private method
+ // works whether or not T supports arenas. These are not exposed to user code
+ // as it can cause confusing API usages, and end up having double free in
+ // user code. These are used only internally from LazyField and Repeated
+ // fields, since they are designed to work in all mode combinations.
+ template<typename Msg> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ static Msg* CreateMaybeMessage(
+ Arena* arena, typename Msg::InternalArenaConstructable_*) {
+ return CreateMessage<Msg>(arena);
+ }
+
+ template<typename T> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ static T* CreateMaybeMessage(Arena* arena, ...) {
+ return Create<T>(arena);
+ }
+
+ // Just allocate the required size for the given type assuming the
+ // type has a trivial constructor.
+ template<typename T> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ T* CreateInternalRawArray(size_t num_elements) {
+ GOOGLE_CHECK_LE(num_elements,
+ std::numeric_limits<size_t>::max() / sizeof(T))
+ << "Requested size is too large to fit into size_t.";
+ return static_cast<T*>(
+ AllocateAligned(RTTI_TYPE_ID(T), sizeof(T) * num_elements));
+ }
+
+ template <typename T> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ T* CreateInternal(bool skip_explicit_ownership) {
+ T* t = new (AllocateAligned(RTTI_TYPE_ID(T), sizeof(T))) T();
+ if (!skip_explicit_ownership) {
+ AddListNode(t, &internal::arena_destruct_object<T>);
+ }
+ return t;
+ }
+
+ template <typename T, typename Arg> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ T* CreateInternal(bool skip_explicit_ownership, const Arg& arg) {
+ T* t = new (AllocateAligned(RTTI_TYPE_ID(T), sizeof(T))) T(arg);
+ if (!skip_explicit_ownership) {
+ AddListNode(t, &internal::arena_destruct_object<T>);
+ }
+ return t;
+ }
+
+ template <typename T, typename Arg1, typename Arg2> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ T* CreateInternal(
+ bool skip_explicit_ownership, const Arg1& arg1, const Arg2& arg2) {
+ T* t = new (AllocateAligned(RTTI_TYPE_ID(T), sizeof(T))) T(arg1, arg2);
+ if (!skip_explicit_ownership) {
+ AddListNode(t, &internal::arena_destruct_object<T>);
+ }
+ return t;
+ }
+
+ template <typename T, typename Arg1, typename Arg2, typename Arg3>
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE T* CreateInternal(bool skip_explicit_ownership,
+ const Arg1& arg1,
+ const Arg2& arg2,
+ const Arg3& arg3) {
+ T* t = new (AllocateAligned(RTTI_TYPE_ID(T), sizeof(T)))
+ T(arg1, arg2, arg3);
+ if (!skip_explicit_ownership) {
+ AddListNode(t, &internal::arena_destruct_object<T>);
+ }
+ return t;
+ }
+
+ template <typename T, typename Arg1, typename Arg2, typename Arg3,
+ typename Arg4>
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE T* CreateInternal(bool skip_explicit_ownership,
+ const Arg1& arg1,
+ const Arg2& arg2,
+ const Arg3& arg3,
+ const Arg4& arg4) {
+ T* t = new (AllocateAligned(RTTI_TYPE_ID(T), sizeof(T)))
+ T(arg1, arg2, arg3, arg4);
+ if (!skip_explicit_ownership) {
+ AddListNode(t, &internal::arena_destruct_object<T>);
+ }
+ return t;
+ }
+
+ template <typename T, typename Arg1, typename Arg2, typename Arg3,
+ typename Arg4, typename Arg5>
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE T* CreateInternal(bool skip_explicit_ownership,
+ const Arg1& arg1,
+ const Arg2& arg2,
+ const Arg3& arg3,
+ const Arg4& arg4,
+ const Arg5& arg5) {
+ T* t = new (AllocateAligned(RTTI_TYPE_ID(T), sizeof(T)))
+ T(arg1, arg2, arg3, arg4, arg5);
+ if (!skip_explicit_ownership) {
+ AddListNode(t, &internal::arena_destruct_object<T>);
+ }
+ return t;
+ }
+
+ template <typename T, typename Arg1, typename Arg2, typename Arg3,
+ typename Arg4, typename Arg5, typename Arg6>
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE T* CreateInternal(bool skip_explicit_ownership,
+ const Arg1& arg1,
+ const Arg2& arg2,
+ const Arg3& arg3,
+ const Arg4& arg4,
+ const Arg5& arg5,
+ const Arg6& arg6) {
+ T* t = new (AllocateAligned(RTTI_TYPE_ID(T), sizeof(T)))
+ T(arg1, arg2, arg3, arg4, arg5, arg6);
+ if (!skip_explicit_ownership) {
+ AddListNode(t, &internal::arena_destruct_object<T>);
+ }
+ return t;
+ }
+
+ template <typename T, typename Arg1, typename Arg2, typename Arg3,
+ typename Arg4, typename Arg5, typename Arg6, typename Arg7>
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE T* CreateInternal(bool skip_explicit_ownership,
+ const Arg1& arg1,
+ const Arg2& arg2,
+ const Arg3& arg3,
+ const Arg4& arg4,
+ const Arg5& arg5,
+ const Arg6& arg6,
+ const Arg7& arg7) {
+ T* t = new (AllocateAligned(RTTI_TYPE_ID(T), sizeof(T)))
+ T(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+ if (!skip_explicit_ownership) {
+ AddListNode(t, &internal::arena_destruct_object<T>);
+ }
+ return t;
+ }
+
+ template <typename T, typename Arg1, typename Arg2, typename Arg3,
+ typename Arg4, typename Arg5, typename Arg6, typename Arg7,
+ typename Arg8>
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE T* CreateInternal(bool skip_explicit_ownership,
+ const Arg1& arg1,
+ const Arg2& arg2,
+ const Arg3& arg3,
+ const Arg4& arg4,
+ const Arg5& arg5,
+ const Arg6& arg6,
+ const Arg7& arg7,
+ const Arg8& arg8) {
+ T* t = new (AllocateAligned(RTTI_TYPE_ID(T), sizeof(T)))
+ T(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
+ if (!skip_explicit_ownership) {
+ AddListNode(t, &internal::arena_destruct_object<T>);
+ }
+ return t;
+ }
+
+ template <typename T> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ T* CreateMessageInternal(typename T::InternalArenaConstructable_*) {
+ return CreateInternal<T, Arena*>(SkipDeleteList<T>(static_cast<T*>(0)),
+ this);
+ }
+
+ template <typename T, typename Arg> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ T* CreateMessageInternal(typename T::InternalArenaConstructable_*,
+ const Arg& arg) {
+ return CreateInternal<T, Arena*>(SkipDeleteList<T>(static_cast<T*>(0)),
+ this, arg);
+ }
+
+ template <typename T, typename Arg1, typename Arg2> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ T* CreateMessageInternal(typename T::InternalArenaConstructable_*,
+ const Arg1& arg1, const Arg2& arg2) {
+ return CreateInternal<T, Arena*>(SkipDeleteList<T>(static_cast<T*>(0)),
+ this, arg1, arg2);
+ }
+
+ // CreateInArenaStorage is used to implement map field. Without it,
+ // google::protobuf::Map need to call generated message's protected arena constructor,
+ // which needs to declare google::protobuf::Map as friend of generated message.
+ template <typename T>
+ static void CreateInArenaStorage(T* ptr, Arena* arena) {
+ CreateInArenaStorageInternal(ptr, arena,
+ typename is_arena_constructable<T>::type());
+ RegisterDestructorInternal(ptr, arena,
+ typename is_destructor_skippable<T>::type());
+ }
+
+ template <typename T>
+ static void CreateInArenaStorageInternal(
+ T* ptr, Arena* arena, google::protobuf::internal::true_type) {
+ new (ptr) T(arena);
+ }
+ template <typename T>
+ static void CreateInArenaStorageInternal(
+ T* ptr, Arena* arena, google::protobuf::internal::false_type) {
+ new (ptr) T;
+ }
+
+ template <typename T>
+ static void RegisterDestructorInternal(
+ T* ptr, Arena* arena, google::protobuf::internal::true_type) {}
+ template <typename T>
+ static void RegisterDestructorInternal(
+ T* ptr, Arena* arena, google::protobuf::internal::false_type) {
+ arena->OwnDestructor(ptr);
+ }
+
+ // These implement Own(), which registers an object for deletion (destructor
+ // call and operator delete()). The second parameter has type 'true_type' if T
+ // is a subtype of ::google::protobuf::Message and 'false_type' otherwise. Collapsing
+ // all template instantiations to one for generic Message reduces code size,
+ // using the virtual destructor instead.
+ template<typename T> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ void OwnInternal(T* object, google::protobuf::internal::true_type) {
+ if (object != NULL) {
+ AddListNode(object, &internal::arena_delete_object< ::google::protobuf::Message >);
+ }
+ }
+ template<typename T> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ void OwnInternal(T* object, google::protobuf::internal::false_type) {
+ if (object != NULL) {
+ AddListNode(object, &internal::arena_delete_object<T>);
+ }
+ }
+
+ // Implementation for GetArena(). Only message objects with
+ // InternalArenaConstructable_ tags can be associated with an arena, and such
+ // objects must implement a GetArenaNoVirtual() method.
+ template<typename T> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ static ::google::protobuf::Arena* GetArenaInternal(
+ const T* value, typename T::InternalArenaConstructable_*) {
+ return value->GetArenaNoVirtual();
+ }
+
+ template<typename T> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ static ::google::protobuf::Arena* GetArenaInternal(const T* value, ...) {
+ return NULL;
+ }
+
+ // Allocate and also optionally call on_arena_allocation callback with the
+ // allocated type info when the hooks are in place in ArenaOptions and
+ // the cookie is not null.
+ void* AllocateAligned(const std::type_info* allocated, size_t n);
+
+ // Allocate an internal allocation, avoiding optional typed monitoring.
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE void* AllocateAligned(size_t n) {
+ return AllocateAligned(NULL, n);
+ }
+
+ void Init();
+
+ // Free all blocks and return the total space used which is the sums of sizes
+ // of the all the allocated blocks.
+ uint64 FreeBlocks();
+
+ // Add object pointer and cleanup function pointer to the list.
+ // TODO(rohananil, cfallin): We could pass in a sub-arena into this method
+ // to avoid polluting blocks of this arena with list nodes. This would help in
+ // mixed mode (where many protobufs have cc_enable_arenas=false), and is an
+ // alternative to a chunked linked-list, but with extra overhead of *next.
+ void AddListNode(void* elem, void (*cleanup)(void*));
+ // Delete or Destruct all objects owned by the arena.
+ void CleanupList();
+ uint64 ResetInternal();
+
+ inline void SetThreadCacheBlock(Block* block) {
+ thread_cache().last_block_used_ = block;
+ thread_cache().last_lifecycle_id_seen = lifecycle_id_;
+ }
+
+ int64 lifecycle_id_; // Unique for each arena. Changes on Reset().
+
+ google::protobuf::internal::AtomicWord blocks_; // Head of linked list of all allocated blocks
+ google::protobuf::internal::AtomicWord hint_; // Fast thread-local block access
+
+ // Node contains the ptr of the object to be cleaned up and the associated
+ // cleanup function ptr.
+ struct Node {
+ void* elem; // Pointer to the object to be cleaned up.
+ void (*cleanup)(void*); // Function pointer to the destructor or deleter.
+ Node* next; // Next node in the list.
+ };
+
+ google::protobuf::internal::AtomicWord cleanup_list_; // Head of a linked list of nodes containing object
+ // ptrs and cleanup methods.
+
+ bool owns_first_block_; // Indicates that arena owns the first block
+ Mutex blocks_lock_;
+
+ void AddBlock(Block* b);
+ // Access must be synchronized, either by blocks_lock_ or by being called from
+ // Init()/Reset().
+ void AddBlockInternal(Block* b);
+ void* SlowAlloc(size_t n);
+ Block* FindBlock(void* me);
+ Block* NewBlock(void* me, Block* my_last_block, size_t n,
+ size_t start_block_size, size_t max_block_size);
+ static void* AllocFromBlock(Block* b, size_t n);
+ template <typename Key, typename T>
+ friend class Map;
+
+ // The arena may save a cookie it receives from the external on_init hook
+ // and then use it when calling the on_reset and on_destruction hooks.
+ void* hooks_cookie_;
+
+ ArenaOptions options_;
+
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Arena);
+};
+
+// Defined above for supporting environments without RTTI.
+#undef RTTI_TYPE_ID
+
+} // namespace protobuf
+
+} // namespace google
+#endif // GOOGLE_PROTOBUF_ARENA_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/arenastring.h b/darwin-x86_64/protoc/include/google/protobuf/arenastring.h
new file mode 100644
index 0000000..590ffce
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/arenastring.h
@@ -0,0 +1,314 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_ARENASTRING_H__
+#define GOOGLE_PROTOBUF_ARENASTRING_H__
+
+#include <string>
+
+#include <google/protobuf/stubs/logging.h>
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/fastmem.h>
+#include <google/protobuf/arena.h>
+#include <google/protobuf/generated_message_util.h>
+
+
+
+// This is the implementation of arena string fields written for the open-source
+// release. The ArenaStringPtr struct below is an internal implementation class
+// and *should not be used* by user code. It is used to collect string
+// operations together into one place and abstract away the underlying
+// string-field pointer representation, so that (for example) an alternate
+// implementation that knew more about ::std::string's internals could integrate more
+// closely with the arena allocator.
+
+namespace google {
+namespace protobuf {
+namespace internal {
+
+struct LIBPROTOBUF_EXPORT ArenaStringPtr {
+ inline void Set(const ::std::string* default_value,
+ const ::std::string& value, ::google::protobuf::Arena* arena) {
+ if (ptr_ == default_value) {
+ CreateInstance(arena, &value);
+ } else {
+ *ptr_ = value;
+ }
+ }
+
+ // Basic accessors.
+ inline const ::std::string& Get(const ::std::string* /* default_value */) const {
+ return *ptr_;
+ }
+
+ inline ::std::string* Mutable(const ::std::string* default_value,
+ ::google::protobuf::Arena* arena) {
+ if (ptr_ == default_value) {
+ CreateInstance(arena, default_value);
+ }
+ return ptr_;
+ }
+
+ // Release returns a ::std::string* instance that is heap-allocated and is not
+ // Own()'d by any arena. If the field was not set, it returns NULL. The caller
+ // retains ownership. Clears this field back to NULL state. Used to implement
+ // release_<field>() methods on generated classes.
+ inline ::std::string* Release(const ::std::string* default_value,
+ ::google::protobuf::Arena* arena) {
+ if (ptr_ == default_value) {
+ return NULL;
+ }
+ ::std::string* released = NULL;
+ if (arena != NULL) {
+ // ptr_ is owned by the arena -- we need to return a copy.
+ released = new ::std::string(*ptr_);
+ } else {
+ released = ptr_;
+ }
+ ptr_ = const_cast< ::std::string* >(default_value);
+ return released;
+ }
+
+ // UnsafeArenaRelease returns a ::std::string*, but it may be arena-owned (i.e.
+ // have its destructor already registered) if arena != NULL. If the field was
+ // not set, this returns NULL. This method clears this field back to NULL
+ // state. Used to implement unsafe_arena_release_<field>() methods on
+ // generated classes.
+ inline ::std::string* UnsafeArenaRelease(const ::std::string* default_value,
+ ::google::protobuf::Arena* /* arena */) {
+ if (ptr_ == default_value) {
+ return NULL;
+ }
+ ::std::string* released = ptr_;
+ ptr_ = const_cast< ::std::string* >(default_value);
+ return released;
+ }
+
+ // Takes a string that is heap-allocated, and takes ownership. The string's
+ // destructor is registered with the arena. Used to implement
+ // set_allocated_<field> in generated classes.
+ inline void SetAllocated(const ::std::string* default_value,
+ ::std::string* value, ::google::protobuf::Arena* arena) {
+ if (arena == NULL && ptr_ != default_value) {
+ Destroy(default_value, arena);
+ }
+ if (value != NULL) {
+ ptr_ = value;
+ if (arena != NULL) {
+ arena->Own(value);
+ }
+ } else {
+ ptr_ = const_cast< ::std::string* >(default_value);
+ }
+ }
+
+ // Takes a string that has lifetime equal to the arena's lifetime. The arena
+ // must be non-null. It is safe only to pass this method a value returned by
+ // UnsafeArenaRelease() on another field of a message in the same arena. Used
+ // to implement unsafe_arena_set_allocated_<field> in generated classes.
+ inline void UnsafeArenaSetAllocated(const ::std::string* default_value,
+ ::std::string* value,
+ ::google::protobuf::Arena* /* arena */) {
+ if (value != NULL) {
+ ptr_ = value;
+ } else {
+ ptr_ = const_cast< ::std::string* >(default_value);
+ }
+ }
+
+ // Swaps internal pointers. Arena-safety semantics: this is guarded by the
+ // logic in Swap()/UnsafeArenaSwap() at the message level, so this method is
+ // 'unsafe' if called directly.
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE void Swap(ArenaStringPtr* other) {
+ std::swap(ptr_, other->ptr_);
+ }
+
+ // Frees storage (if not on an arena) and sets field to default value.
+ inline void Destroy(const ::std::string* default_value,
+ ::google::protobuf::Arena* arena) {
+ if (arena == NULL && ptr_ != default_value) {
+ delete ptr_;
+ }
+ ptr_ = const_cast< ::std::string* >(default_value);
+ }
+
+ // Clears content, but keeps allocated string if arena != NULL, to avoid the
+ // overhead of heap operations. After this returns, the content (as seen by
+ // 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 */) {
+ if (ptr_ == default_value) {
+ // Already set to default (which is empty) -- do nothing.
+ } else {
+ ptr_->clear();
+ }
+ }
+
+ // Clears content, but keeps allocated string if arena != NULL, to avoid the
+ // 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 */) {
+ if (ptr_ == default_value) {
+ // Already set to default -- do nothing.
+ } else {
+ // Have another allocated string -- rather than throwing this away and
+ // resetting ptr_ to the canonical default string instance, we just reuse
+ // this instance.
+ *ptr_ = *default_value;
+ }
+ }
+
+ // Called from generated code / reflection runtime only. Resets value to point
+ // to a default string pointer, with the semantics that this ArenaStringPtr
+ // does not own the pointed-to memory. Disregards initial value of ptr_ (so
+ // this is the *ONLY* safe method to call after construction or when
+ // reinitializing after becoming the active field in a oneof union).
+ inline void UnsafeSetDefault(const ::std::string* default_value) {
+ // Casting away 'const' is safe here: accessors ensure that ptr_ is only
+ // returned as a const if it is equal to default_value.
+ ptr_ = const_cast< ::std::string* >(default_value);
+ }
+
+ // The 'NoArena' variants of methods below assume arena == NULL and are
+ // optimized to provide very little overhead relative to a raw string pointer
+ // (while still being in-memory compatible with other code that assumes
+ // ArenaStringPtr). Note the invariant that a class instance that has only
+ // ever been mutated by NoArena methods must *only* be in the String state
+ // (i.e., tag bits are not used), *NEVER* ArenaString. This allows all
+ // tagged-pointer manipulations to be avoided.
+ inline void SetNoArena(const ::std::string* default_value,
+ const ::std::string& value) {
+ if (ptr_ == default_value) {
+ CreateInstanceNoArena(&value);
+ } else {
+ *ptr_ = value;
+ }
+ }
+
+ void AssignWithDefault(const ::std::string* default_value, ArenaStringPtr value);
+
+ inline const ::std::string& GetNoArena(const ::std::string* /* default_value */) const {
+ return *ptr_;
+ }
+
+ inline ::std::string* MutableNoArena(const ::std::string* default_value) {
+ if (ptr_ == default_value) {
+ CreateInstanceNoArena(default_value);
+ }
+ return ptr_;
+ }
+
+ inline ::std::string* ReleaseNoArena(const ::std::string* default_value) {
+ if (ptr_ == default_value) {
+ return NULL;
+ } else {
+ ::std::string* released = ptr_;
+ ptr_ = const_cast< ::std::string* >(default_value);
+ return released;
+ }
+ }
+
+ inline void SetAllocatedNoArena(const ::std::string* default_value,
+ ::std::string* value) {
+ if (ptr_ != default_value) {
+ delete ptr_;
+ }
+ if (value != NULL) {
+ ptr_ = value;
+ } else {
+ ptr_ = const_cast< ::std::string* >(default_value);
+ }
+ }
+
+ inline void DestroyNoArena(const ::std::string* default_value) {
+ if (ptr_ != default_value) {
+ delete ptr_;
+ }
+ ptr_ = NULL;
+ }
+
+ inline void ClearToEmptyNoArena(const ::std::string* default_value) {
+ if (ptr_ == default_value) {
+ // Nothing: already equal to default (which is the empty string).
+ } else {
+ ptr_->clear();
+ }
+ }
+
+ inline void ClearToDefaultNoArena(const ::std::string* default_value) {
+ if (ptr_ == default_value) {
+ // Nothing: already set to default.
+ } else {
+ // Reuse existing allocated instance.
+ *ptr_ = *default_value;
+ }
+ }
+
+ // Internal accessor used only at parse time to provide direct access to the
+ // raw pointer from the shared parse routine (in the non-arenas case). The
+ // parse routine does the string allocation in order to save code size in the
+ // generated parsing code.
+ inline ::std::string** UnsafeRawStringPointer() {
+ return &ptr_;
+ }
+
+ private:
+ ::std::string* ptr_;
+
+ GOOGLE_ATTRIBUTE_NOINLINE void CreateInstance(::google::protobuf::Arena* arena,
+ const ::std::string* initial_value) {
+ // Assumes ptr_ is not NULL.
+ if (initial_value != NULL) {
+ ptr_ = new ::std::string(*initial_value);
+ } else {
+ ptr_ = new ::std::string();
+ }
+ if (arena != NULL) {
+ arena->Own(ptr_);
+ }
+ }
+ GOOGLE_ATTRIBUTE_NOINLINE void CreateInstanceNoArena(const ::std::string* initial_value) {
+ if (initial_value != NULL) {
+ ptr_ = new ::std::string(*initial_value);
+ } else {
+ ptr_ = new ::std::string();
+ }
+ }
+};
+
+} // namespace internal
+} // namespace protobuf
+
+
+
+} // namespace google
+#endif // GOOGLE_PROTOBUF_ARENASTRING_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/._code_generator.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/._code_generator.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/compiler/._code_generator.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/._command_line_interface.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/._command_line_interface.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/compiler/._command_line_interface.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/._importer.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/._importer.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/compiler/._importer.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/._parser.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/._parser.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/compiler/._parser.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/._plugin.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/._plugin.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/compiler/._plugin.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/._plugin.pb.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/._plugin.pb.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/compiler/._plugin.pb.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/._plugin.proto b/darwin-x86_64/protoc/include/google/protobuf/compiler/._plugin.proto
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/compiler/._plugin.proto
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/code_generator.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/code_generator.h
index 321a8cc..b989f15 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/compiler/code_generator.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/compiler/code_generator.h
@@ -79,6 +79,37 @@
GeneratorContext* generator_context,
string* error) const = 0;
+ // Generates code for all given proto files, generating one or more files in
+ // the given output directory.
+ //
+ // This method should be called instead of |Generate()| when
+ // |HasGenerateAll()| returns |true|. It is used to emulate legacy semantics
+ // when more than one `.proto` file is specified on one compiler invocation.
+ //
+ // WARNING: Please do not use unless legacy semantics force the code generator
+ // to produce a single output file for all input files, or otherwise require
+ // an examination of all input files first. The canonical code generator
+ // design produces one output file per input .proto file, and we do not wish
+ // to encourage alternate designs.
+ //
+ // A parameter is given as passed on the command line, as in |Generate()|
+ // above.
+ //
+ // Returns true if successful. Otherwise, sets *error to a description of
+ // the problem (e.g. "invalid parameter") and returns false.
+ virtual bool GenerateAll(const vector<const FileDescriptor*>& files,
+ const string& parameter,
+ GeneratorContext* generator_context,
+ string* error) const {
+ *error = "Unimplemented GenerateAll() method.";
+ return false;
+ }
+
+ // Returns true if the code generator expects to receive all FileDescriptors
+ // at once (via |GenerateAll()|), rather than one at a time (via
+ // |Generate()|). This is required to implement legacy semantics.
+ virtual bool HasGenerateAll() const { return false; }
+
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CodeGenerator);
};
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/command_line_interface.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/command_line_interface.h
index 47f2891..d137766 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/compiler/command_line_interface.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/compiler/command_line_interface.h
@@ -39,6 +39,7 @@
#define GOOGLE_PROTOBUF_COMPILER_COMMAND_LINE_INTERFACE_H__
#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/hash.h>
#include <string>
#include <vector>
#include <map>
@@ -190,6 +191,7 @@
class ErrorPrinter;
class GeneratorContextImpl;
class MemoryOutputStream;
+ typedef hash_map<string, GeneratorContextImpl*> GeneratorContextMap;
// Clear state from previous Run().
void Clear();
@@ -210,11 +212,12 @@
// Parse all command-line arguments.
ParseArgumentStatus ParseArguments(int argc, const char* const argv[]);
+
// 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,
// false otherwise.
//
- // Exmaples:
+ // Examples:
// "-Isrc/protos" ->
// name = "-I", value = "src/protos"
// "--cpp_out=src/foo.pb2.cc" ->
@@ -247,6 +250,12 @@
// Implements the --descriptor_set_out option.
bool WriteDescriptorSet(const vector<const FileDescriptor*> parsed_files);
+ // Implements the --dependency_out option
+ bool GenerateDependencyManifestFile(
+ const vector<const FileDescriptor*>& parsed_files,
+ const GeneratorContextMap& output_directories,
+ DiskSourceTree* source_tree);
+
// Get all transitive dependencies of the given file (including the file
// itself), adding them to the given list of FileDescriptorProtos. The
// protos will be ordered such that every file is listed before any file that
@@ -254,8 +263,11 @@
// in order. Any files in *already_seen will not be added, and each file
// added will be inserted into *already_seen. If include_source_code_info is
// true then include the source code information in the FileDescriptorProtos.
+ // If include_json_name is true, populate the json_name field of
+ // FieldDescriptorProto for all fields.
static void GetTransitiveDependencies(
const FileDescriptor* file,
+ bool include_json_name,
bool include_source_code_info,
set<const FileDescriptor*>* already_seen,
RepeatedPtrField<FileDescriptorProto>* output);
@@ -353,6 +365,10 @@
// FileDescriptorSet should be written. Otherwise, empty.
string descriptor_set_name_;
+ // If --dependency_out was given, this is the path to the file where the
+ // dependency file will be written. Otherwise, empty.
+ string dependency_out_name_;
+
// True if --include_imports was given, meaning that we should
// write all transitive dependencies to the DescriptorSet. Otherwise, only
// the .proto files listed on the command-line are added.
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/cpp/._cpp_generator.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/cpp/._cpp_generator.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/compiler/cpp/._cpp_generator.h
+++ /dev/null
Binary files differ
diff --git a/linux-x86_64/protoc/include/google/protobuf/io/strtod.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/csharp/csharp_generator.h
similarity index 74%
copy from linux-x86_64/protoc/include/google/protobuf/io/strtod.h
copy to darwin-x86_64/protoc/include/google/protobuf/compiler/csharp/csharp_generator.h
index c2efc8d..9b54e91 100644
--- a/linux-x86_64/protoc/include/google/protobuf/io/strtod.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/compiler/csharp/csharp_generator.h
@@ -28,23 +28,31 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// A locale-independent version of strtod(), used to parse floating
-// point default values in .proto files, where the decimal separator
-// is always a dot.
+#ifndef GOOGLE_PROTOBUF_COMPILER_CSHARP_GENERATOR_H__
+#define GOOGLE_PROTOBUF_COMPILER_CSHARP_GENERATOR_H__
-#ifndef GOOGLE_PROTOBUF_IO_STRTOD_H__
-#define GOOGLE_PROTOBUF_IO_STRTOD_H__
+#include <string>
+
+#include <google/protobuf/compiler/code_generator.h>
namespace google {
namespace protobuf {
-namespace io {
+namespace compiler {
+namespace csharp {
-// A locale-independent version of the standard strtod(), which always
-// uses a dot as the decimal separator.
-double NoLocaleStrtod(const char* str, char** endptr);
+class LIBPROTOC_EXPORT Generator
+ : public google::protobuf::compiler::CodeGenerator {
+ virtual bool Generate(
+ const FileDescriptor* file,
+ const string& parameter,
+ GeneratorContext* generator_context,
+ string* error) const;
+};
-} // namespace io
+} // namespace csharp
+} // namespace compiler
} // namespace protobuf
-
} // namespace google
-#endif // GOOGLE_PROTOBUF_IO_STRTOD_H__
+
+#endif // GOOGLE_PROTOBUF_COMPILER_CSHARP_GENERATOR_H__
+
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/csharp/csharp_names.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/csharp/csharp_names.h
new file mode 100644
index 0000000..3080518
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/compiler/csharp/csharp_names.h
@@ -0,0 +1,103 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Author: kenton@google.com (Kenton Varda)
+// Based on original Protocol Buffers design by
+// Sanjay Ghemawat, Jeff Dean, and others.
+//
+// Provides a mechanism for mapping a descriptor to the
+// fully-qualified name of the corresponding C# class.
+
+#ifndef GOOGLE_PROTOBUF_COMPILER_CSHARP_NAMES_H__
+#define GOOGLE_PROTOBUF_COMPILER_CSHARP_NAMES_H__
+
+#include <string>
+
+namespace google {
+namespace protobuf {
+
+class Descriptor;
+class EnumDescriptor;
+class FileDescriptor;
+class ServiceDescriptor;
+
+namespace compiler {
+namespace csharp {
+
+// Requires:
+// descriptor != NULL
+//
+// Returns:
+// The namespace to use for given file descriptor.
+string GetFileNamespace(const FileDescriptor* descriptor);
+
+// Requires:
+// descriptor != NULL
+//
+// Returns:
+// The fully-qualified C# class name.
+string GetClassName(const Descriptor* descriptor);
+
+// Requires:
+// descriptor != NULL
+//
+// Returns:
+// The fully-qualified name of the C# class that provides
+// access to the file descriptor. Proto compiler generates
+// such class for each .proto file processed.
+string GetReflectionClassName(const FileDescriptor* descriptor);
+
+// Generates output file name for given file descriptor. If generate_directories
+// is true, the output file will be put under directory corresponding to file's
+// namespace. base_namespace can be used to strip some of the top level
+// directories. E.g. for file with namespace "Bar.Foo" and base_namespace="Bar",
+// the resulting file will be put under directory "Foo" (and not "Bar/Foo").
+//
+// Requires:
+// descriptor != NULL
+// error != NULL
+//
+// Returns:
+// The file name to use as output file for given file descriptor. In case
+// of failure, this function will return empty string and error parameter
+// will contain the error message.
+string GetOutputFile(
+ const google::protobuf::FileDescriptor* descriptor,
+ const string file_extension,
+ const bool generate_directories,
+ const string base_namespace,
+ string* error);
+
+} // namespace csharp
+} // namespace compiler
+} // namespace protobuf
+} // namespace google
+
+#endif // GOOGLE_PROTOBUF_COMPILER_CSHARP_NAMES_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/importer.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/importer.h
index f010fd0..cc8fcc3 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/compiler/importer.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/compiler/importer.h
@@ -121,6 +121,12 @@
ErrorLocation location,
const string& message);
+ virtual void AddWarning(const string& filename,
+ const string& element_name,
+ const Message* descriptor,
+ ErrorLocation location,
+ const string& message);
+
private:
SourceTreeDescriptorDatabase* owner_;
};
@@ -188,6 +194,9 @@
virtual void AddError(const string& filename, int line, int column,
const string& message) = 0;
+ virtual void AddWarning(const string& filename, int line, int column,
+ const string& message) {}
+
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MultiFileErrorCollector);
};
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/java/._java_generator.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/java/._java_generator.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/compiler/java/._java_generator.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/java/java_names.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/java/java_names.h
new file mode 100644
index 0000000..0d61433
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/compiler/java/java_names.h
@@ -0,0 +1,87 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Author: kenton@google.com (Kenton Varda)
+// Based on original Protocol Buffers design by
+// Sanjay Ghemawat, Jeff Dean, and others.
+//
+// Provides a mechanism for mapping a descriptor to the
+// fully-qualified name of the corresponding Java class.
+
+#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_NAMES_H__
+#define GOOGLE_PROTOBUF_COMPILER_JAVA_NAMES_H__
+
+#include <string>
+
+namespace google {
+namespace protobuf {
+
+class Descriptor;
+class EnumDescriptor;
+class FileDescriptor;
+class ServiceDescriptor;
+
+namespace compiler {
+namespace java {
+
+// Requires:
+// descriptor != NULL
+//
+// Returns:
+// The fully-qualified Java class name.
+string ClassName(const Descriptor* descriptor);
+
+// Requires:
+// descriptor != NULL
+//
+// Returns:
+// The fully-qualified Java class name.
+string ClassName(const EnumDescriptor* descriptor);
+
+// Requires:
+// descriptor != NULL
+//
+// Returns:
+// The fully-qualified Java class name.
+string ClassName(const FileDescriptor* descriptor);
+
+// Requires:
+// descriptor != NULL
+//
+// Returns:
+// The fully-qualified Java class name.
+string ClassName(const ServiceDescriptor* descriptor);
+
+} // namespace java
+} // namespace compiler
+} // namespace protobuf
+} // namespace google
+
+#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_NAMES_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/javanano/javanano_generator.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/javanano/javanano_generator.h
new file mode 100644
index 0000000..6f9f7f2
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/compiler/javanano/javanano_generator.h
@@ -0,0 +1,72 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// http://code.google.com/p/protobuf/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Author: kenton@google.com (Kenton Varda)
+// Based on original Protocol Buffers design by
+// Sanjay Ghemawat, Jeff Dean, and others.
+//
+// Generates Java nano code for a given .proto file.
+
+#ifndef GOOGLE_PROTOBUF_COMPILER_JAVANANO_NANO_GENERATOR_H__
+#define GOOGLE_PROTOBUF_COMPILER_JAVANANO_NANO_GENERATOR_H__
+
+#include <string>
+#include <google/protobuf/compiler/code_generator.h>
+
+namespace google {
+namespace protobuf {
+namespace compiler {
+namespace javanano {
+
+// CodeGenerator implementation which generates Java nano code. If you create your
+// own protocol compiler binary and you want it to support Java output for the
+// nano runtime, you can do so by registering an instance of this CodeGenerator with
+// the CommandLineInterface in your main() function.
+class LIBPROTOC_EXPORT JavaNanoGenerator : public CodeGenerator {
+ public:
+ JavaNanoGenerator();
+ ~JavaNanoGenerator();
+
+ // implements CodeGenerator ----------------------------------------
+ bool Generate(const FileDescriptor* file,
+ const string& parameter,
+ GeneratorContext* output_directory,
+ string* error) const;
+
+ private:
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(JavaNanoGenerator);
+};
+
+} // namespace javanano
+} // namespace compiler
+} // namespace protobuf
+
+} // namespace google
+#endif // GOOGLE_PROTOBUF_COMPILER_JAVANANO_NANO_GENERATOR_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/js/js_generator.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/js/js_generator.h
new file mode 100644
index 0000000..6fd7ca5
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/compiler/js/js_generator.h
@@ -0,0 +1,281 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_COMPILER_JS_GENERATOR_H__
+#define GOOGLE_PROTOBUF_COMPILER_JS_GENERATOR_H__
+
+#include <string>
+#include <set>
+
+#include <google/protobuf/compiler/code_generator.h>
+
+namespace google {
+namespace protobuf {
+
+class Descriptor;
+class EnumDescriptor;
+class FieldDescriptor;
+class OneofDescriptor;
+class FileDescriptor;
+
+namespace io { class Printer; }
+
+namespace compiler {
+namespace js {
+
+struct GeneratorOptions {
+ // Add a `goog.requires()` call for each enum type used. If not set, a forward
+ // declaration with `goog.forwardDeclare` is produced instead.
+ bool add_require_for_enums;
+ // Set this as a test-only module via `goog.setTestOnly();`.
+ bool testonly;
+ // Output path.
+ string output_dir;
+ // Namespace prefix.
+ string namespace_prefix;
+ // Create a library with name <name>_lib.js rather than a separate .js file
+ // per type?
+ string library;
+ // Error if there are two types that would generate the same output file?
+ bool error_on_name_conflict;
+ // Enable binary-format support?
+ bool binary;
+ // What style of imports should be used.
+ enum ImportStyle {
+ IMPORT_CLOSURE, // goog.require()
+ IMPORT_COMMONJS, // require()
+ IMPORT_BROWSER, // no import statements
+ IMPORT_ES6, // import { member } from ''
+ } import_style;
+
+ GeneratorOptions()
+ : add_require_for_enums(false),
+ testonly(false),
+ output_dir("."),
+ namespace_prefix(""),
+ library(""),
+ error_on_name_conflict(false),
+ binary(false),
+ import_style(IMPORT_CLOSURE) {}
+
+ bool ParseFromOptions(
+ const vector< pair< string, string > >& options,
+ string* error);
+};
+
+class LIBPROTOC_EXPORT Generator : public CodeGenerator {
+ public:
+ Generator() {}
+ virtual ~Generator() {}
+
+ virtual bool Generate(const FileDescriptor* file,
+ const string& parameter,
+ GeneratorContext* context,
+ string* error) const {
+ *error = "Unimplemented Generate() method. Call GenerateAll() instead.";
+ return false;
+ }
+
+ virtual bool HasGenerateAll() const { return true; }
+
+ virtual bool GenerateAll(const vector<const FileDescriptor*>& files,
+ const string& parameter,
+ GeneratorContext* context,
+ 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,
+ const vector<const FileDescriptor*>& file,
+ std::set<string>* provided) const;
+ void FindProvidesForFile(const GeneratorOptions& options,
+ io::Printer* printer,
+ const FileDescriptor* file,
+ std::set<string>* provided) const;
+ void FindProvidesForMessage(const GeneratorOptions& options,
+ io::Printer* printer,
+ const Descriptor* desc,
+ std::set<string>* provided) const;
+ void FindProvidesForEnum(const GeneratorOptions& options,
+ io::Printer* printer,
+ const EnumDescriptor* enumdesc,
+ std::set<string>* provided) const;
+ // For extension fields at file scope.
+ void FindProvidesForFields(const GeneratorOptions& options,
+ io::Printer* printer,
+ const vector<const FieldDescriptor*>& fields,
+ std::set<string>* provided) const;
+ // Print the goog.provides() found by the methods above.
+ void GenerateProvides(const GeneratorOptions& options,
+ io::Printer* printer,
+ std::set<string>* provided) const;
+
+ // Generate goog.setTestOnly() if indicated.
+ void GenerateTestOnly(const GeneratorOptions& options,
+ io::Printer* printer) const;
+
+ // Generate goog.requires() calls.
+ void GenerateRequiresForLibrary(const GeneratorOptions& options,
+ io::Printer* printer,
+ const vector<const FileDescriptor*>& files,
+ std::set<string>* provided) const;
+ void GenerateRequiresForMessage(const GeneratorOptions& options,
+ io::Printer* printer,
+ const Descriptor* desc,
+ std::set<string>* provided) const;
+ // For extension fields at file scope.
+ void GenerateRequiresForExtensions(
+ const GeneratorOptions& options, io::Printer* printer,
+ const vector<const FieldDescriptor*>& fields,
+ std::set<string>* provided) const;
+ void GenerateRequiresImpl(const GeneratorOptions& options,
+ io::Printer* printer,
+ std::set<string>* required,
+ std::set<string>* forwards,
+ std::set<string>* provided,
+ bool require_jspb,
+ bool require_extension) const;
+ void FindRequiresForMessage(const GeneratorOptions& options,
+ const Descriptor* desc,
+ std::set<string>* required,
+ std::set<string>* forwards,
+ bool* have_message) const;
+ void FindRequiresForField(const GeneratorOptions& options,
+ const FieldDescriptor* field,
+ std::set<string>* required,
+ std::set<string>* forwards) const;
+ void FindRequiresForExtension(const GeneratorOptions& options,
+ const FieldDescriptor* field,
+ std::set<string>* required,
+ std::set<string>* forwards) const;
+
+ void GenerateFile(const GeneratorOptions& options,
+ io::Printer* printer,
+ const FileDescriptor* file) const;
+
+ // Generate definitions for all message classes and enums in all files,
+ // processing the files in dependence order.
+ void GenerateFilesInDepOrder(const GeneratorOptions& options,
+ io::Printer* printer,
+ const vector<const FileDescriptor*>& file) const;
+ // Helper for above.
+ void GenerateFileAndDeps(const GeneratorOptions& options,
+ io::Printer* printer,
+ const FileDescriptor* root,
+ std::set<const FileDescriptor*>* all_files,
+ std::set<const FileDescriptor*>* generated) const;
+
+ // Generate definitions for all message classes and enums.
+ void GenerateClassesAndEnums(const GeneratorOptions& options,
+ io::Printer* printer,
+ const FileDescriptor* file) const;
+
+ // Generate definition for one class.
+ void GenerateClass(const GeneratorOptions& options,
+ io::Printer* printer,
+ const Descriptor* desc) const;
+ void GenerateClassConstructor(const GeneratorOptions& options,
+ io::Printer* printer,
+ const Descriptor* desc) const;
+ void GenerateClassFieldInfo(const GeneratorOptions& options,
+ io::Printer* printer,
+ const Descriptor* desc) const;
+ void GenerateClassXid(const GeneratorOptions& options,
+ io::Printer* printer,
+ const Descriptor* desc) const;
+ void GenerateOneofCaseDefinition(const GeneratorOptions& options,
+ io::Printer* printer,
+ const OneofDescriptor* oneof) const;
+ void GenerateClassToObject(const GeneratorOptions& options,
+ io::Printer* printer,
+ const Descriptor* desc) const;
+ void GenerateClassFieldToObject(const GeneratorOptions& options,
+ io::Printer* printer,
+ const FieldDescriptor* field) const;
+ void GenerateClassFromObject(const GeneratorOptions& options,
+ io::Printer* printer,
+ const Descriptor* desc) const;
+ void GenerateClassFieldFromObject(const GeneratorOptions& options,
+ io::Printer* printer,
+ const FieldDescriptor* field) const;
+ void GenerateClassClone(const GeneratorOptions& options,
+ io::Printer* printer,
+ const Descriptor* desc) const;
+ void GenerateClassRegistration(const GeneratorOptions& options,
+ io::Printer* printer,
+ const Descriptor* desc) const;
+ void GenerateClassFields(const GeneratorOptions& options,
+ io::Printer* printer,
+ const Descriptor* desc) const;
+ void GenerateClassField(const GeneratorOptions& options,
+ io::Printer* printer,
+ const FieldDescriptor* desc) const;
+ void GenerateClassExtensionFieldInfo(const GeneratorOptions& options,
+ io::Printer* printer,
+ const Descriptor* desc) const;
+ void GenerateClassDeserialize(const GeneratorOptions& options,
+ io::Printer* printer,
+ const Descriptor* desc) const;
+ void GenerateClassDeserializeBinary(const GeneratorOptions& options,
+ io::Printer* printer,
+ const Descriptor* desc) const;
+ void GenerateClassDeserializeBinaryField(const GeneratorOptions& options,
+ io::Printer* printer,
+ const FieldDescriptor* field) const;
+ void GenerateClassSerializeBinary(const GeneratorOptions& options,
+ io::Printer* printer,
+ const Descriptor* desc) const;
+ void GenerateClassSerializeBinaryField(const GeneratorOptions& options,
+ io::Printer* printer,
+ const FieldDescriptor* field) const;
+
+ // Generate definition for one enum.
+ void GenerateEnum(const GeneratorOptions& options,
+ io::Printer* printer,
+ const EnumDescriptor* enumdesc) const;
+
+ // Generate an extension definition.
+ void GenerateExtension(const GeneratorOptions& options,
+ io::Printer* printer,
+ const FieldDescriptor* field) const;
+
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Generator);
+};
+
+} // namespace js
+} // namespace compiler
+} // namespace protobuf
+
+} // namespace google
+#endif // GOOGLE_PROTOBUF_COMPILER_JS_GENERATOR_H__
diff --git a/linux-x86_64/protoc/include/google/protobuf/io/strtod.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/objectivec/objectivec_generator.h
similarity index 67%
copy from linux-x86_64/protoc/include/google/protobuf/io/strtod.h
copy to darwin-x86_64/protoc/include/google/protobuf/compiler/objectivec/objectivec_generator.h
index c2efc8d..09266b0 100644
--- a/linux-x86_64/protoc/include/google/protobuf/io/strtod.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/compiler/objectivec/objectivec_generator.h
@@ -28,23 +28,34 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// A locale-independent version of strtod(), used to parse floating
-// point default values in .proto files, where the decimal separator
-// is always a dot.
+// Generates ObjectiveC code for a given .proto file.
-#ifndef GOOGLE_PROTOBUF_IO_STRTOD_H__
-#define GOOGLE_PROTOBUF_IO_STRTOD_H__
+#ifndef GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_GENERATOR_H__
+#define GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_GENERATOR_H__
+
+#include <string>
+#include <google/protobuf/compiler/code_generator.h>
namespace google {
namespace protobuf {
-namespace io {
+namespace compiler {
+namespace objectivec {
-// A locale-independent version of the standard strtod(), which always
-// uses a dot as the decimal separator.
-double NoLocaleStrtod(const char* str, char** endptr);
+class LIBPROTOC_EXPORT ObjectiveCGenerator : public CodeGenerator {
+ public:
+ ObjectiveCGenerator();
+ ~ObjectiveCGenerator();
-} // namespace io
+ // implements CodeGenerator ----------------------------------------
+ bool Generate(const FileDescriptor* file, const string& parameter,
+ OutputDirectory* output_directory, string* error) const;
+
+ private:
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ObjectiveCGenerator);
+};
+
+} // namespace objectivec
+} // namespace compiler
} // namespace protobuf
-
} // namespace google
-#endif // GOOGLE_PROTOBUF_IO_STRTOD_H__
+#endif // GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_GENERATOR_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/objectivec/objectivec_helpers.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/objectivec/objectivec_helpers.h
new file mode 100644
index 0000000..be20bee
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/compiler/objectivec/objectivec_helpers.h
@@ -0,0 +1,230 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_HELPERS_H__
+#define GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_HELPERS_H__
+
+#include <string>
+#include <vector>
+
+#include <google/protobuf/descriptor.h>
+#include <google/protobuf/descriptor.pb.h>
+
+namespace google {
+namespace protobuf {
+namespace compiler {
+namespace objectivec {
+
+// Generator options (see objectivec_generator.cc for a description of each):
+struct Options {
+ Options();
+ string expected_prefixes_path;
+ string generate_for_named_framework;
+ string named_framework_to_proto_path_mappings_path;
+};
+
+// Escape C++ trigraphs by escaping question marks to "\?".
+string EscapeTrigraphs(const string& to_escape);
+
+// Strips ".proto" or ".protodevel" from the end of a filename.
+string StripProto(const string& filename);
+
+// Remove white space from either end of a StringPiece.
+void StringPieceTrimWhitespace(StringPiece* input);
+
+// Returns true if the name requires a ns_returns_not_retained attribute applied
+// to it.
+bool IsRetainedName(const string& name);
+
+// Returns true if the name starts with "init" and will need to have special
+// handling under ARC.
+bool IsInitName(const string& name);
+
+// Gets the path of the file we're going to generate (sans the .pb.h
+// extension). The path will be dependent on the objectivec package
+// declared in the proto package.
+string FilePath(const FileDescriptor* file);
+
+// Just like FilePath(), but without the directory part.
+string FilePathBasename(const FileDescriptor* file);
+
+// Gets the name of the root class we'll generate in the file. This class
+// is not meant for external consumption, but instead contains helpers that
+// the rest of the classes need
+string FileClassName(const FileDescriptor* file);
+
+// These return the fully-qualified class name corresponding to the given
+// descriptor.
+string ClassName(const Descriptor* descriptor);
+string EnumName(const EnumDescriptor* descriptor);
+
+// Returns the fully-qualified name of the enum value corresponding to the
+// the descriptor.
+string EnumValueName(const EnumValueDescriptor* descriptor);
+
+// Returns the name of the enum value corresponding to the descriptor.
+string EnumValueShortName(const EnumValueDescriptor* descriptor);
+
+// Reverse what an enum does.
+string UnCamelCaseEnumShortName(const string& name);
+
+// Returns the name to use for the extension (used as the method off the file's
+// Root class).
+string ExtensionMethodName(const FieldDescriptor* descriptor);
+
+// Returns the transformed field name.
+string FieldName(const FieldDescriptor* field);
+string FieldNameCapitalized(const FieldDescriptor* field);
+
+// Returns the transformed oneof name.
+string OneofEnumName(const OneofDescriptor* descriptor);
+string OneofName(const OneofDescriptor* descriptor);
+string OneofNameCapitalized(const OneofDescriptor* descriptor);
+
+inline bool HasFieldPresence(const FileDescriptor* file) {
+ return file->syntax() != FileDescriptor::SYNTAX_PROTO3;
+}
+
+inline bool HasPreservingUnknownEnumSemantics(const FileDescriptor* file) {
+ return file->syntax() == FileDescriptor::SYNTAX_PROTO3;
+}
+
+inline bool IsMapEntryMessage(const Descriptor* descriptor) {
+ return descriptor->options().map_entry();
+}
+
+// Reverse of the above.
+string UnCamelCaseFieldName(const string& name, const FieldDescriptor* field);
+
+enum ObjectiveCType {
+ OBJECTIVECTYPE_INT32,
+ OBJECTIVECTYPE_UINT32,
+ OBJECTIVECTYPE_INT64,
+ OBJECTIVECTYPE_UINT64,
+ OBJECTIVECTYPE_FLOAT,
+ OBJECTIVECTYPE_DOUBLE,
+ OBJECTIVECTYPE_BOOLEAN,
+ OBJECTIVECTYPE_STRING,
+ OBJECTIVECTYPE_DATA,
+ OBJECTIVECTYPE_ENUM,
+ OBJECTIVECTYPE_MESSAGE
+};
+
+template<class TDescriptor>
+string GetOptionalDeprecatedAttribute(const TDescriptor* descriptor, bool preSpace = true, bool postNewline = false) {
+ if (descriptor->options().deprecated()) {
+ string result = "DEPRECATED_ATTRIBUTE";
+ if (preSpace) {
+ result.insert(0, " ");
+ }
+ if (postNewline) {
+ result.append("\n");
+ }
+ return result;
+ } else {
+ return "";
+ }
+}
+
+string GetCapitalizedType(const FieldDescriptor* field);
+
+ObjectiveCType GetObjectiveCType(FieldDescriptor::Type field_type);
+
+inline ObjectiveCType GetObjectiveCType(const FieldDescriptor* field) {
+ return GetObjectiveCType(field->type());
+}
+
+bool IsPrimitiveType(const FieldDescriptor* field);
+bool IsReferenceType(const FieldDescriptor* field);
+
+string GPBGenericValueFieldName(const FieldDescriptor* field);
+string DefaultValue(const FieldDescriptor* field);
+bool HasNonZeroDefaultValue(const FieldDescriptor* field);
+
+string BuildFlagsString(const vector<string>& strings);
+
+// Builds a HeaderDoc style comment out of the comments in the .proto file.
+string BuildCommentsString(const SourceLocation& location);
+
+// The name the commonly used by the library when built as a framework.
+// This lines up to the name used in the CocoaPod.
+extern const char* const ProtobufLibraryFrameworkName;
+// Returns the CPP symbol name to use as the gate for framework style imports
+// for the given framework name to use.
+string ProtobufFrameworkImportSymbol(const string& framework_name);
+
+// Checks if the file is one of the proto's bundled with the library.
+bool IsProtobufLibraryBundledProtoFile(const FileDescriptor* file);
+
+// Checks the prefix for a given file and outputs any warnings needed, if
+// there are flat out errors, then out_error is filled in and the result is
+// false.
+bool ValidateObjCClassPrefix(const FileDescriptor* file,
+ const Options& generation_options,
+ string* out_error);
+
+// Generate decode data needed for ObjC's GPBDecodeTextFormatName() to transform
+// the input into the expected output.
+class LIBPROTOC_EXPORT TextFormatDecodeData {
+ public:
+ TextFormatDecodeData();
+ ~TextFormatDecodeData();
+
+ void AddString(int32 key, const string& input_for_decode,
+ const string& desired_output);
+ size_t num_entries() const { return entries_.size(); }
+ string Data() const;
+
+ static string DecodeDataForString(const string& input_for_decode,
+ const string& desired_output);
+
+ private:
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TextFormatDecodeData);
+
+ typedef std::pair<int32, string> DataEntry;
+ vector<DataEntry> entries_;
+};
+
+// Helper for parsing simple files.
+class LIBPROTOC_EXPORT LineConsumer {
+ public:
+ LineConsumer();
+ virtual ~LineConsumer();
+ virtual bool ConsumeLine(const StringPiece& line, string* out_error) = 0;
+};
+
+bool ParseSimpleFile(
+ const string& path, LineConsumer* line_consumer, string* out_error);
+
+} // namespace objectivec
+} // namespace compiler
+} // namespace protobuf
+} // namespace google
+#endif // GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_HELPERS_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/parser.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/parser.h
index d0a2359..2c561c2 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/compiler/parser.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/compiler/parser.h
@@ -185,10 +185,13 @@
// have been passed around by const reference, for no particularly good
// reason. We should probably go through and change them all to mutable
// pointer to make this more intuitive.
- bool TryConsumeEndOfDeclaration(const char* text,
- const LocationRecorder* location);
- bool ConsumeEndOfDeclaration(const char* text,
- const LocationRecorder* location);
+ bool TryConsumeEndOfDeclaration(
+ const char* text, const LocationRecorder* location);
+ bool TryConsumeEndOfDeclarationFinishScope(
+ const char* text, const LocationRecorder* location);
+
+ bool ConsumeEndOfDeclaration(
+ const char* text, const LocationRecorder* location);
// -----------------------------------------------------------------
// Error logging helpers
@@ -253,9 +256,13 @@
//
// TODO(kenton): See comment on TryConsumeEndOfDeclaration(), above, for
// why this is const.
- void AttachComments(string* leading, string* trailing) const;
+ void AttachComments(string* leading, string* trailing,
+ vector<string>* detached_comments) const;
private:
+ // Indexes of parent and current location in the parent
+ // SourceCodeInfo.location repeated field. For top-level elements,
+ // parent_index_ is -1.
Parser* parser_;
SourceCodeInfo::Location* location_;
@@ -268,7 +275,7 @@
// Parses the "syntax = \"proto2\";" line at the top of the file. Returns
// false if it failed to parse or if the syntax identifier was not
// recognized.
- bool ParseSyntaxIdentifier();
+ bool ParseSyntaxIdentifier(const LocationRecorder& parent);
// These methods parse various individual bits of code. They return
// false if they completely fail to parse the construct. In this case,
@@ -302,9 +309,6 @@
RepeatedField<int32>* weak_dependency,
const LocationRecorder& root_location,
const FileDescriptorProto* containing_file);
- bool ParseOption(Message* options,
- const LocationRecorder& options_location,
- const FileDescriptorProto* containing_file);
// These methods parse the contents of a message, enum, or service type and
// add them to the given object. They consume the entire block including
@@ -319,7 +323,7 @@
const LocationRecorder& service_location,
const FileDescriptorProto* containing_file);
- // Parse one statement within a message, enum, or service block, inclunding
+ // Parse one statement within a message, enum, or service block, including
// final semicolon.
bool ParseMessageStatement(DescriptorProto* message,
const LocationRecorder& message_location,
@@ -360,6 +364,14 @@
const LocationRecorder& extensions_location,
const FileDescriptorProto* containing_file);
+ // Parse a "reserved" declaration.
+ bool ParseReserved(DescriptorProto* message,
+ const LocationRecorder& message_location);
+ bool ParseReservedNames(DescriptorProto* message,
+ const LocationRecorder& parent_location);
+ bool ParseReservedNumbers(DescriptorProto* message,
+ const LocationRecorder& parent_location);
+
// Parse an "extend" declaration. (See also comments for
// ParseMessageField().)
bool ParseExtend(RepeatedPtrField<FieldDescriptorProto>* extensions,
@@ -397,13 +409,13 @@
// Parse options of a single method or stream.
- bool ParseOptions(const LocationRecorder& parent_location,
- const FileDescriptorProto* containing_file,
- const int optionsFieldNumber,
- Message* mutable_options);
+ bool ParseMethodOptions(const LocationRecorder& parent_location,
+ const FileDescriptorProto* containing_file,
+ const int optionsFieldNumber,
+ Message* mutable_options);
// Parse "required", "optional", or "repeated" and fill in "label"
- // with the value.
+ // with the value. Returns true if such a label is consumed.
bool ParseLabel(FieldDescriptorProto::Label* label,
const FileDescriptorProto* containing_file);
@@ -427,6 +439,10 @@
const LocationRecorder& field_location,
const FileDescriptorProto* containing_file);
+ bool ParseJsonName(FieldDescriptorProto* field,
+ const LocationRecorder& field_location,
+ const FileDescriptorProto* containing_file);
+
enum OptionStyle {
OPTION_ASSIGNMENT, // just "name = value"
OPTION_STATEMENT // "option name = value;"
@@ -460,6 +476,30 @@
// the ending brace.
bool ParseUninterpretedBlock(string* value);
+ struct MapField {
+ // Whether the field is a map field.
+ bool is_map_field;
+ // The types of the key and value if they are primitive types.
+ FieldDescriptorProto::Type key_type;
+ FieldDescriptorProto::Type value_type;
+ // Or the type names string if the types are customized types.
+ string key_type_name;
+ string value_type_name;
+
+ MapField() : is_map_field(false) {}
+ };
+ // Desugar the map syntax to generate a nested map entry message.
+ void GenerateMapEntry(const MapField& map_field, FieldDescriptorProto* field,
+ RepeatedPtrField<DescriptorProto>* messages);
+
+ // Whether fields without label default to optional fields.
+ bool DefaultToOptionalFields() const {
+ return syntax_identifier_ == "proto3";
+ }
+
+
+ bool ValidateEnum(const EnumDescriptorProto* proto);
+
// =================================================================
io::Tokenizer* input_;
@@ -475,6 +515,13 @@
// yet; use ConsumeEndOfDeclaration() to get the complete comments.
string upcoming_doc_comments_;
+ // Detached comments are not connected to any syntax entities. Elements in
+ // this vector are paragraphs of comments separated by empty lines. The
+ // detached comments will be put into the leading_detached_comments field for
+ // the next element (See SourceCodeInfo.Location in descriptor.proto), when
+ // ConsumeEndOfDeclaration() is called.
+ vector<string> upcoming_detached_comments_;
+
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Parser);
};
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/plugin.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/plugin.h
index 679f9bd..d2793a9 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/compiler/plugin.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/compiler/plugin.h
@@ -40,6 +40,13 @@
// }
// You must link your plugin against libprotobuf and libprotoc.
//
+// The core part of PluginMain is to invoke the given CodeGenerator on a
+// CodeGeneratorRequest to generate a CodeGeneratorResponse. This part is
+// abstracted out and made into function GenerateCode so that it can be reused,
+// for example, to implement a variant of PluginMain that does some
+// preprocessing on the input CodeGeneratorRequest before feeding the request
+// to the given code generator.
+//
// To get protoc to use the plugin, do one of the following:
// * Place the plugin binary somewhere in the PATH and give it the name
// "protoc-gen-NAME" (replacing "NAME" with the name of your plugin). If you
@@ -55,16 +62,27 @@
#ifndef GOOGLE_PROTOBUF_COMPILER_PLUGIN_H__
#define GOOGLE_PROTOBUF_COMPILER_PLUGIN_H__
+#include <string>
+
#include <google/protobuf/stubs/common.h>
namespace google {
namespace protobuf {
namespace compiler {
class CodeGenerator; // code_generator.h
+class CodeGeneratorRequest;
+class CodeGeneratorResponse;
// Implements main() for a protoc plugin exposing the given code generator.
LIBPROTOC_EXPORT int PluginMain(int argc, char* argv[], const CodeGenerator* generator);
+// Generates code using the given code generator. Returns true if the code
+// 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,
+ string* error_msg);
+
} // namespace compiler
} // namespace protobuf
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/plugin.pb.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/plugin.pb.h
index 65634da..510202f 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/compiler/plugin.pb.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/compiler/plugin.pb.h
@@ -8,23 +8,26 @@
#include <google/protobuf/stubs/common.h>
-#if GOOGLE_PROTOBUF_VERSION < 2006000
+#if GOOGLE_PROTOBUF_VERSION < 3000000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 2006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
+#include <google/protobuf/arena.h>
+#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/metadata.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/unknown_field_set.h>
-#include "google/protobuf/descriptor.pb.h"
+#include <google/protobuf/descriptor.pb.h>
// @@protoc_insertion_point(includes)
namespace google {
@@ -55,11 +58,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -69,7 +72,9 @@
// implements Message ----------------------------------------------
- CodeGeneratorRequest* New() const;
+ inline CodeGeneratorRequest* New() const { return New(NULL); }
+
+ CodeGeneratorRequest* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const CodeGeneratorRequest& from);
@@ -88,7 +93,16 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(CodeGeneratorRequest* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -96,56 +110,55 @@
// accessors -------------------------------------------------------
// repeated string file_to_generate = 1;
- inline int file_to_generate_size() const;
- inline void clear_file_to_generate();
+ int file_to_generate_size() const;
+ void clear_file_to_generate();
static const int kFileToGenerateFieldNumber = 1;
- inline const ::std::string& file_to_generate(int index) const;
- inline ::std::string* mutable_file_to_generate(int index);
- inline void set_file_to_generate(int index, const ::std::string& value);
- inline void set_file_to_generate(int index, const char* value);
- inline void set_file_to_generate(int index, const char* value, size_t size);
- inline ::std::string* add_file_to_generate();
- inline void add_file_to_generate(const ::std::string& value);
- inline void add_file_to_generate(const char* value);
- inline void add_file_to_generate(const char* value, size_t size);
- inline const ::google::protobuf::RepeatedPtrField< ::std::string>& file_to_generate() const;
- inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_file_to_generate();
+ 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, 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);
+ 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();
// optional string parameter = 2;
- inline bool has_parameter() const;
- inline void clear_parameter();
+ bool has_parameter() const;
+ void clear_parameter();
static const int kParameterFieldNumber = 2;
- inline const ::std::string& parameter() const;
- inline void set_parameter(const ::std::string& value);
- inline void set_parameter(const char* value);
- inline void set_parameter(const char* value, size_t size);
- inline ::std::string* mutable_parameter();
- inline ::std::string* release_parameter();
- inline void set_allocated_parameter(::std::string* parameter);
+ const ::std::string& parameter() const;
+ void set_parameter(const ::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);
// repeated .google.protobuf.FileDescriptorProto proto_file = 15;
- inline int proto_file_size() const;
- inline void clear_proto_file();
+ int proto_file_size() const;
+ void clear_proto_file();
static const int kProtoFileFieldNumber = 15;
- inline const ::google::protobuf::FileDescriptorProto& proto_file(int index) const;
- inline ::google::protobuf::FileDescriptorProto* mutable_proto_file(int index);
- inline ::google::protobuf::FileDescriptorProto* add_proto_file();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >&
- proto_file() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >*
+ const ::google::protobuf::FileDescriptorProto& proto_file(int index) const;
+ ::google::protobuf::FileDescriptorProto* mutable_proto_file(int index);
+ ::google::protobuf::FileDescriptorProto* add_proto_file();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >*
mutable_proto_file();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >&
+ proto_file() const;
// @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorRequest)
private:
inline void set_has_parameter();
inline void clear_has_parameter();
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
::google::protobuf::RepeatedPtrField< ::std::string> file_to_generate_;
- ::std::string* parameter_;
+ ::google::protobuf::internal::ArenaStringPtr parameter_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto > proto_file_;
friend void LIBPROTOC_EXPORT protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
@@ -169,11 +182,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -183,7 +196,9 @@
// implements Message ----------------------------------------------
- CodeGeneratorResponse_File* New() const;
+ inline CodeGeneratorResponse_File* New() const { return New(NULL); }
+
+ CodeGeneratorResponse_File* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const CodeGeneratorResponse_File& from);
@@ -202,7 +217,16 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(CodeGeneratorResponse_File* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -210,40 +234,40 @@
// accessors -------------------------------------------------------
// optional string name = 1;
- inline bool has_name() const;
- inline void clear_name();
+ bool has_name() const;
+ void clear_name();
static const int kNameFieldNumber = 1;
- inline const ::std::string& name() const;
- inline void set_name(const ::std::string& value);
- inline void set_name(const char* value);
- inline void set_name(const char* value, size_t size);
- inline ::std::string* mutable_name();
- inline ::std::string* release_name();
- inline void set_allocated_name(::std::string* name);
+ const ::std::string& name() const;
+ void set_name(const ::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);
// optional string insertion_point = 2;
- inline bool has_insertion_point() const;
- inline void clear_insertion_point();
+ bool has_insertion_point() const;
+ void clear_insertion_point();
static const int kInsertionPointFieldNumber = 2;
- inline const ::std::string& insertion_point() const;
- inline void set_insertion_point(const ::std::string& value);
- inline void set_insertion_point(const char* value);
- inline void set_insertion_point(const char* value, size_t size);
- inline ::std::string* mutable_insertion_point();
- inline ::std::string* release_insertion_point();
- inline void set_allocated_insertion_point(::std::string* insertion_point);
+ const ::std::string& insertion_point() const;
+ void set_insertion_point(const ::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);
// optional string content = 15;
- inline bool has_content() const;
- inline void clear_content();
+ bool has_content() const;
+ void clear_content();
static const int kContentFieldNumber = 15;
- inline const ::std::string& content() const;
- inline void set_content(const ::std::string& value);
- inline void set_content(const char* value);
- inline void set_content(const char* value, size_t size);
- inline ::std::string* mutable_content();
- inline ::std::string* release_content();
- inline void set_allocated_content(::std::string* content);
+ const ::std::string& content() const;
+ void set_content(const ::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);
// @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorResponse.File)
private:
@@ -254,13 +278,12 @@
inline void set_has_content();
inline void clear_has_content();
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
- ::std::string* name_;
- ::std::string* insertion_point_;
- ::std::string* content_;
+ ::google::protobuf::internal::ArenaStringPtr name_;
+ ::google::protobuf::internal::ArenaStringPtr insertion_point_;
+ ::google::protobuf::internal::ArenaStringPtr content_;
friend void LIBPROTOC_EXPORT protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
@@ -283,11 +306,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -297,7 +320,9 @@
// implements Message ----------------------------------------------
- CodeGeneratorResponse* New() const;
+ inline CodeGeneratorResponse* New() const { return New(NULL); }
+
+ CodeGeneratorResponse* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const CodeGeneratorResponse& from);
@@ -316,7 +341,16 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(CodeGeneratorResponse* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -326,39 +360,38 @@
// accessors -------------------------------------------------------
// optional string error = 1;
- inline bool has_error() const;
- inline void clear_error();
+ bool has_error() const;
+ void clear_error();
static const int kErrorFieldNumber = 1;
- inline const ::std::string& error() const;
- inline void set_error(const ::std::string& value);
- inline void set_error(const char* value);
- inline void set_error(const char* value, size_t size);
- inline ::std::string* mutable_error();
- inline ::std::string* release_error();
- inline void set_allocated_error(::std::string* error);
+ const ::std::string& error() const;
+ void set_error(const ::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);
// repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
- inline int file_size() const;
- inline void clear_file();
+ int file_size() const;
+ void clear_file();
static const int kFileFieldNumber = 15;
- inline const ::google::protobuf::compiler::CodeGeneratorResponse_File& file(int index) const;
- inline ::google::protobuf::compiler::CodeGeneratorResponse_File* mutable_file(int index);
- inline ::google::protobuf::compiler::CodeGeneratorResponse_File* add_file();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File >&
- file() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File >*
+ const ::google::protobuf::compiler::CodeGeneratorResponse_File& file(int index) const;
+ ::google::protobuf::compiler::CodeGeneratorResponse_File* mutable_file(int index);
+ ::google::protobuf::compiler::CodeGeneratorResponse_File* add_file();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File >*
mutable_file();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File >&
+ file() const;
// @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorResponse)
private:
inline void set_has_error();
inline void clear_has_error();
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
- ::std::string* error_;
+ ::google::protobuf::internal::ArenaStringPtr error_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File > file_;
friend void LIBPROTOC_EXPORT protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
@@ -372,6 +405,7 @@
// ===================================================================
+#if !PROTOBUF_INLINE_NOT_IN_HEADERS
// CodeGeneratorRequest
// repeated string file_to_generate = 1;
@@ -403,6 +437,7 @@
// @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorRequest.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) {
@@ -439,68 +474,46 @@
_has_bits_[0] &= ~0x00000002u;
}
inline void CodeGeneratorRequest::clear_parameter() {
- if (parameter_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- parameter_->clear();
- }
+ parameter_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_parameter();
}
inline const ::std::string& CodeGeneratorRequest::parameter() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.parameter)
- return *parameter_;
+ return parameter_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void CodeGeneratorRequest::set_parameter(const ::std::string& value) {
set_has_parameter();
- if (parameter_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- parameter_ = new ::std::string;
- }
- parameter_->assign(value);
+ parameter_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorRequest.parameter)
}
inline void CodeGeneratorRequest::set_parameter(const char* value) {
set_has_parameter();
- if (parameter_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- parameter_ = new ::std::string;
- }
- parameter_->assign(value);
+ parameter_.SetNoArena(&::google::protobuf::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) {
set_has_parameter();
- if (parameter_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- parameter_ = new ::std::string;
- }
- parameter_->assign(reinterpret_cast<const char*>(value), size);
+ parameter_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorRequest.parameter)
}
inline ::std::string* CodeGeneratorRequest::mutable_parameter() {
set_has_parameter();
- if (parameter_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- parameter_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.parameter)
- return parameter_;
+ return parameter_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* CodeGeneratorRequest::release_parameter() {
+ // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorRequest.parameter)
clear_has_parameter();
- if (parameter_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = parameter_;
- parameter_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return parameter_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void CodeGeneratorRequest::set_allocated_parameter(::std::string* parameter) {
- if (parameter_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete parameter_;
- }
- if (parameter) {
+ if (parameter != NULL) {
set_has_parameter();
- parameter_ = parameter;
} else {
clear_has_parameter();
- parameter_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ parameter_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), parameter);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorRequest.parameter)
}
@@ -523,16 +536,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorRequest.proto_file)
return proto_file_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >&
-CodeGeneratorRequest::proto_file() const {
- // @@protoc_insertion_point(field_list:google.protobuf.compiler.CodeGeneratorRequest.proto_file)
- return proto_file_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >*
CodeGeneratorRequest::mutable_proto_file() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorRequest.proto_file)
return &proto_file_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >&
+CodeGeneratorRequest::proto_file() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.compiler.CodeGeneratorRequest.proto_file)
+ return proto_file_;
+}
// -------------------------------------------------------------------
@@ -549,68 +562,46 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void CodeGeneratorResponse_File::clear_name() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_->clear();
- }
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name();
}
inline const ::std::string& CodeGeneratorResponse_File::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.name)
- return *name_;
+ return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void CodeGeneratorResponse_File::set_name(const ::std::string& value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.name)
}
inline void CodeGeneratorResponse_File::set_name(const char* value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
+ name_.SetNoArena(&::google::protobuf::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) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(reinterpret_cast<const char*>(value), size);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.File.name)
}
inline ::std::string* CodeGeneratorResponse_File::mutable_name() {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.name)
- return name_;
+ return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* CodeGeneratorResponse_File::release_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.name)
clear_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = name_;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void CodeGeneratorResponse_File::set_allocated_name(::std::string* name) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete name_;
- }
- if (name) {
+ if (name != NULL) {
set_has_name();
- name_ = name;
} else {
clear_has_name();
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.name)
}
@@ -625,68 +616,46 @@
_has_bits_[0] &= ~0x00000002u;
}
inline void CodeGeneratorResponse_File::clear_insertion_point() {
- if (insertion_point_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- insertion_point_->clear();
- }
+ insertion_point_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_insertion_point();
}
inline const ::std::string& CodeGeneratorResponse_File::insertion_point() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
- return *insertion_point_;
+ return insertion_point_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void CodeGeneratorResponse_File::set_insertion_point(const ::std::string& value) {
set_has_insertion_point();
- if (insertion_point_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- insertion_point_ = new ::std::string;
- }
- insertion_point_->assign(value);
+ insertion_point_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
}
inline void CodeGeneratorResponse_File::set_insertion_point(const char* value) {
set_has_insertion_point();
- if (insertion_point_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- insertion_point_ = new ::std::string;
- }
- insertion_point_->assign(value);
+ insertion_point_.SetNoArena(&::google::protobuf::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) {
set_has_insertion_point();
- if (insertion_point_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- insertion_point_ = new ::std::string;
- }
- insertion_point_->assign(reinterpret_cast<const char*>(value), size);
+ insertion_point_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
}
inline ::std::string* CodeGeneratorResponse_File::mutable_insertion_point() {
set_has_insertion_point();
- if (insertion_point_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- insertion_point_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
- return insertion_point_;
+ return insertion_point_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* CodeGeneratorResponse_File::release_insertion_point() {
+ // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
clear_has_insertion_point();
- if (insertion_point_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = insertion_point_;
- insertion_point_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return insertion_point_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void CodeGeneratorResponse_File::set_allocated_insertion_point(::std::string* insertion_point) {
- if (insertion_point_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete insertion_point_;
- }
- if (insertion_point) {
+ if (insertion_point != NULL) {
set_has_insertion_point();
- insertion_point_ = insertion_point;
} else {
clear_has_insertion_point();
- insertion_point_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ insertion_point_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), insertion_point);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
}
@@ -701,68 +670,46 @@
_has_bits_[0] &= ~0x00000004u;
}
inline void CodeGeneratorResponse_File::clear_content() {
- if (content_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- content_->clear();
- }
+ content_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_content();
}
inline const ::std::string& CodeGeneratorResponse_File::content() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.content)
- return *content_;
+ return content_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void CodeGeneratorResponse_File::set_content(const ::std::string& value) {
set_has_content();
- if (content_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- content_ = new ::std::string;
- }
- content_->assign(value);
+ content_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.content)
}
inline void CodeGeneratorResponse_File::set_content(const char* value) {
set_has_content();
- if (content_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- content_ = new ::std::string;
- }
- content_->assign(value);
+ content_.SetNoArena(&::google::protobuf::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) {
set_has_content();
- if (content_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- content_ = new ::std::string;
- }
- content_->assign(reinterpret_cast<const char*>(value), size);
+ content_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.File.content)
}
inline ::std::string* CodeGeneratorResponse_File::mutable_content() {
set_has_content();
- if (content_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- content_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.content)
- return content_;
+ return content_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* CodeGeneratorResponse_File::release_content() {
+ // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.content)
clear_has_content();
- if (content_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = content_;
- content_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return content_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void CodeGeneratorResponse_File::set_allocated_content(::std::string* content) {
- if (content_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete content_;
- }
- if (content) {
+ if (content != NULL) {
set_has_content();
- content_ = content;
} else {
clear_has_content();
- content_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ content_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), content);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.content)
}
@@ -781,68 +728,46 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void CodeGeneratorResponse::clear_error() {
- if (error_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- error_->clear();
- }
+ error_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_error();
}
inline const ::std::string& CodeGeneratorResponse::error() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.error)
- return *error_;
+ return error_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void CodeGeneratorResponse::set_error(const ::std::string& value) {
set_has_error();
- if (error_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- error_ = new ::std::string;
- }
- error_->assign(value);
+ error_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.error)
}
inline void CodeGeneratorResponse::set_error(const char* value) {
set_has_error();
- if (error_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- error_ = new ::std::string;
- }
- error_->assign(value);
+ error_.SetNoArena(&::google::protobuf::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) {
set_has_error();
- if (error_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- error_ = new ::std::string;
- }
- error_->assign(reinterpret_cast<const char*>(value), size);
+ error_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.error)
}
inline ::std::string* CodeGeneratorResponse::mutable_error() {
set_has_error();
- if (error_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- error_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.error)
- return error_;
+ return error_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* CodeGeneratorResponse::release_error() {
+ // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.error)
clear_has_error();
- if (error_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = error_;
- error_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return error_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void CodeGeneratorResponse::set_allocated_error(::std::string* error) {
- if (error_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete error_;
- }
- if (error) {
+ if (error != NULL) {
set_has_error();
- error_ = error;
} else {
clear_has_error();
- error_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ error_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), error);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.error)
}
@@ -865,16 +790,21 @@
// @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorResponse.file)
return file_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File >&
-CodeGeneratorResponse::file() const {
- // @@protoc_insertion_point(field_list:google.protobuf.compiler.CodeGeneratorResponse.file)
- return file_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File >*
CodeGeneratorResponse::mutable_file() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorResponse.file)
return &file_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File >&
+CodeGeneratorResponse::file() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.compiler.CodeGeneratorResponse.file)
+ return file_;
+}
+
+#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope)
@@ -883,15 +813,6 @@
} // namespace protobuf
} // namespace google
-#ifndef SWIG
-namespace google {
-namespace protobuf {
-
-
-} // namespace google
-} // namespace protobuf
-#endif // SWIG
-
// @@protoc_insertion_point(global_scope)
#endif // PROTOBUF_google_2fprotobuf_2fcompiler_2fplugin_2eproto__INCLUDED
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/plugin.proto b/darwin-x86_64/protoc/include/google/protobuf/compiler/plugin.proto
index b65379d..acaee1f 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/compiler/plugin.proto
+++ b/darwin-x86_64/protoc/include/google/protobuf/compiler/plugin.proto
@@ -44,10 +44,13 @@
// plugin should be named "protoc-gen-$NAME", and will then be used when the
// flag "--${NAME}_out" is passed to protoc.
+syntax = "proto2";
package google.protobuf.compiler;
option java_package = "com.google.protobuf.compiler";
option java_outer_classname = "PluginProtos";
+option go_package = "plugin_go";
+
import "google/protobuf/descriptor.proto";
// An encoded CodeGeneratorRequest is written to the plugin's stdin.
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/python/._python_generator.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/python/._python_generator.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/compiler/python/._python_generator.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/compiler/python/python_generator.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/python/python_generator.h
index f86e9ea..aa0f5fc 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/compiler/python/python_generator.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/compiler/python/python_generator.h
@@ -38,6 +38,7 @@
#include <string>
#include <google/protobuf/compiler/code_generator.h>
+#include <google/protobuf/stubs/mutex.h>
#include <google/protobuf/stubs/common.h>
namespace google {
@@ -127,6 +128,8 @@
void PrintServiceDescriptor(const ServiceDescriptor& descriptor) const;
void PrintServiceClass(const ServiceDescriptor& descriptor) const;
void PrintServiceStub(const ServiceDescriptor& descriptor) const;
+ void PrintDescriptorKeyAndModuleName(
+ const ServiceDescriptor& descriptor) const ;
void PrintEnumValueDescriptor(const EnumValueDescriptor& descriptor) const;
string OptionsValue(const string& class_name,
@@ -148,6 +151,9 @@
void FixOptionsForEnum(const EnumDescriptor& descriptor) const;
void FixOptionsForMessage(const Descriptor& descriptor) const;
+ void CopyPublicDependenciesAliases(
+ const string& copy_from, const FileDescriptor* file) const;
+
// Very coarse-grained lock to ensure that Generate() is reentrant.
// Guards file_, printer_ and file_descriptor_serialized_.
mutable Mutex mutex_;
diff --git a/linux-x86_64/protoc/include/google/protobuf/io/strtod.h b/darwin-x86_64/protoc/include/google/protobuf/compiler/ruby/ruby_generator.h
similarity index 74%
copy from linux-x86_64/protoc/include/google/protobuf/io/strtod.h
copy to darwin-x86_64/protoc/include/google/protobuf/compiler/ruby/ruby_generator.h
index c2efc8d..75555c3 100644
--- a/linux-x86_64/protoc/include/google/protobuf/io/strtod.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/compiler/ruby/ruby_generator.h
@@ -28,23 +28,31 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// A locale-independent version of strtod(), used to parse floating
-// point default values in .proto files, where the decimal separator
-// is always a dot.
+#ifndef GOOGLE_PROTOBUF_COMPILER_RUBY_GENERATOR_H__
+#define GOOGLE_PROTOBUF_COMPILER_RUBY_GENERATOR_H__
-#ifndef GOOGLE_PROTOBUF_IO_STRTOD_H__
-#define GOOGLE_PROTOBUF_IO_STRTOD_H__
+#include <string>
+
+#include <google/protobuf/compiler/code_generator.h>
namespace google {
namespace protobuf {
-namespace io {
+namespace compiler {
+namespace ruby {
-// A locale-independent version of the standard strtod(), which always
-// uses a dot as the decimal separator.
-double NoLocaleStrtod(const char* str, char** endptr);
+class LIBPROTOC_EXPORT Generator
+ : public google::protobuf::compiler::CodeGenerator {
+ virtual bool Generate(
+ const FileDescriptor* file,
+ const string& parameter,
+ GeneratorContext* generator_context,
+ string* error) const;
+};
-} // namespace io
+} // namespace ruby
+} // namespace compiler
} // namespace protobuf
-
} // namespace google
-#endif // GOOGLE_PROTOBUF_IO_STRTOD_H__
+
+#endif // GOOGLE_PROTOBUF_COMPILER_RUBY_GENERATOR_H__
+
diff --git a/darwin-x86_64/protoc/include/google/protobuf/descriptor.h b/darwin-x86_64/protoc/include/google/protobuf/descriptor.h
index 67afc77..3ecc0a9 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/descriptor.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/descriptor.h
@@ -54,11 +54,20 @@
#ifndef GOOGLE_PROTOBUF_DESCRIPTOR_H__
#define GOOGLE_PROTOBUF_DESCRIPTOR_H__
+#include <memory>
+#ifndef _SHARED_PTR_H
+#include <google/protobuf/stubs/shared_ptr.h>
+#endif
#include <set>
#include <string>
#include <vector>
#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/scoped_ptr.h>
+// TYPE_BOOL is defined in the MacOS's ConditionalMacros.h.
+#ifdef TYPE_BOOL
+#undef TYPE_BOOL
+#endif // TYPE_BOOL
namespace google {
namespace protobuf {
@@ -104,6 +113,25 @@
// Defined in unknown_field_set.h.
class UnknownField;
+// Defined in generated_message_reflection.h.
+namespace internal {
+class GeneratedMessageReflection;
+} // namespace internal
+
+// Defined in command_line_interface.cc
+namespace compiler {
+class CommandLineInterface;
+} // namespace compiler
+
+namespace descriptor_unittest {
+class DescriptorTest;
+} // namespace descriptor_unittest
+
+// Defined in printer.h
+namespace io {
+class Printer;
+} // namespace io
+
// NB, all indices are zero-based.
struct SourceLocation {
int start_line;
@@ -112,10 +140,28 @@
int end_column;
// Doc comments found at the source location.
- // TODO(kenton): Maybe this struct should have been named SourceInfo or
- // something instead. Oh well.
+ // See the comments in SourceCodeInfo.Location (descriptor.proto) for details.
string leading_comments;
string trailing_comments;
+ vector<string> leading_detached_comments;
+};
+
+// Options when generating machine-parsable output from a descriptor with
+// DebugString().
+struct DebugStringOptions {
+ // include original user comments as recorded in SourceLocation entries. N.B.
+ // that this must be |false| by default: several other pieces of code (for
+ // example, the C++ code generation for fields in the proto compiler) rely on
+ // DebugString() output being unobstructed by user comments.
+ bool include_comments;
+ // If true, elide the braced body in the debug string.
+ bool elide_group_body;
+ bool elide_oneof_body;
+
+ DebugStringOptions()
+ : include_comments(false),
+ elide_group_body(false),
+ elide_oneof_body(false) {}
};
// Describes a type of protocol message, or a particular group within a
@@ -162,6 +208,10 @@
// will be suitable for re-parsing.
string DebugString() const;
+ // Similar to DebugString(), but additionally takes options (e.g.,
+ // include original user comments in output).
+ string DebugStringWithOptions(const DebugStringOptions& options) const;
+
// Returns true if this is a placeholder for an unknown type. This will
// only be the case if this descriptor comes from a DescriptorPool
// with AllowUnknownDependencies() set.
@@ -271,6 +321,36 @@
// this message type's scope.
const FieldDescriptor* FindExtensionByCamelcaseName(const string& name) const;
+ // Reserved fields -------------------------------------------------
+
+ // A range of reserved field numbers.
+ struct ReservedRange {
+ int start; // inclusive
+ int end; // exclusive
+ };
+
+ // The number of reserved ranges in this message type.
+ int reserved_range_count() const;
+ // Gets an reserved range by index, where 0 <= index <
+ // reserved_range_count(). These are returned in the order they were defined
+ // in the .proto file.
+ const ReservedRange* reserved_range(int index) const;
+
+ // Returns true if the number is in one of the reserved ranges.
+ bool IsReservedNumber(int number) const;
+
+ // Returns NULL if no reserved range contains the given number.
+ const ReservedRange* FindReservedRangeContainingNumber(int number) const;
+
+ // The number of reserved field names in this message type.
+ int reserved_name_count() const;
+
+ // Gets a reserved name by index, where 0 <= index < reserved_name_count().
+ const string& reserved_name(int index) const;
+
+ // Returns true if the field name is reserved.
+ bool IsReservedName(const string& name) const;
+
// Source Location ---------------------------------------------------
// Updates |*out_location| to the source location of the complete
@@ -281,13 +361,26 @@
private:
typedef MessageOptions OptionsType;
+ // Allows tests to test CopyTo(proto, true).
+ friend class ::google::protobuf::descriptor_unittest::DescriptorTest;
+
+ // Allows access to GetLocationPath for annotations.
+ friend class ::google::protobuf::io::Printer;
+
+ // Fill the json_name field of FieldDescriptorProto.
+ void CopyJsonNameTo(DescriptorProto* proto) const;
+
// Internal version of DebugString; controls the level of indenting for
- // correct depth
- void DebugString(int depth, string *contents) const;
+ // 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, string *contents,
+ const DebugStringOptions& options,
+ bool include_opening_clause) const;
// Walks up the descriptor tree to generate the source location path
// to this descriptor from the file root.
- void GetLocationPath(vector<int>* output) const;
+ void GetLocationPath(std::vector<int>* output) const;
const string* name_;
const string* full_name_;
@@ -312,6 +405,10 @@
ExtensionRange* extension_ranges_;
int extension_count_;
FieldDescriptor* extensions_;
+ int reserved_range_count_;
+ ReservedRange* reserved_ranges_;
+ int reserved_name_count_;
+ const string** reserved_names_;
// IMPORTANT: If you add a new field, make sure to search for all instances
// of Allocate<Descriptor>() and AllocateArray<Descriptor>() in descriptor.cc
// and update them to initialize the field.
@@ -414,6 +511,7 @@
const string& name() const; // Name of this field within the message.
const string& full_name() const; // Fully-qualified name of the field.
+ const 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.
@@ -450,6 +548,8 @@
// IsTypePackable(type())
bool is_packed() const; // shorthand for is_packable() &&
// options().packed()
+ bool is_map() const; // shorthand for type() == TYPE_MESSAGE &&
+ // message_type()->options().map_entry()
// Index of this field within the message's field array, or the file or
// extension scope's extensions array.
@@ -513,12 +613,6 @@
// returns null.
const EnumDescriptor* enum_type() const;
- // EXPERIMENTAL; DO NOT USE.
- // If this field is a map field, experimental_map_key() is the field
- // that is the key for this map.
- // experimental_map_key()->containing_type() is the same as message_type().
- const FieldDescriptor* experimental_map_key() const;
-
// Get the FieldOptions for this field. This includes things listed in
// square brackets after the field definition. E.g., the field:
// optional string text = 1 [ctype=CORD];
@@ -533,6 +627,9 @@
// See Descriptor::DebugString().
string DebugString() const;
+ // See Descriptor::DebugStringWithOptions().
+ string DebugStringWithOptions(const DebugStringOptions& options) const;
+
// Helper method to get the CppType for a particular Type.
static CppType TypeToCppType(Type type);
@@ -555,24 +652,39 @@
private:
typedef FieldOptions OptionsType;
+ // Allows access to GetLocationPath for annotations.
+ friend class ::google::protobuf::io::Printer;
+
+ // Fill the json_name field of FieldDescriptorProto.
+ void CopyJsonNameTo(FieldDescriptorProto* proto) const;
+
// See Descriptor::DebugString().
enum PrintLabelFlag { PRINT_LABEL, OMIT_LABEL };
void DebugString(int depth, PrintLabelFlag print_label_flag,
- string* contents) const;
+ 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
// types of CPPTYPE_STRING whill be surrounded by quotes and CEscaped.
string DefaultValueAsString(bool quote_string_type) const;
+ // Helper function that returns the field type name for DebugString.
+ string FieldTypeNameDebugString() const;
+
// Walks up the descriptor tree to generate the source location path
// to this descriptor from the file root.
- void GetLocationPath(vector<int>* output) const;
+ void GetLocationPath(std::vector<int>* output) const;
const string* name_;
const string* full_name_;
const string* lowercase_name_;
const string* camelcase_name_;
+ // Whether the user has specified the json_name field option in the .proto
+ // file.
+ bool has_json_name_;
+ // If has_json_name_ is true, it's the value specified by the user.
+ // Otherwise, it has the same value as lowercase_name_.
+ const string* json_name_;
const FileDescriptor* file_;
int number_;
Type type_;
@@ -584,7 +696,6 @@
const Descriptor* extension_scope_;
const Descriptor* message_type_;
const EnumDescriptor* enum_type_;
- const FieldDescriptor* experimental_map_key_;
const FieldOptions* options_;
// IMPORTANT: If you add a new field, make sure to search for all instances
// of Allocate<FieldDescriptor>() and AllocateArray<FieldDescriptor>() in
@@ -645,6 +756,9 @@
// See Descriptor::DebugString().
string DebugString() const;
+ // See Descriptor::DebugStringWithOptions().
+ string DebugStringWithOptions(const DebugStringOptions& options) const;
+
// Source Location ---------------------------------------------------
// Updates |*out_location| to the source location of the complete
@@ -653,12 +767,16 @@
bool GetSourceLocation(SourceLocation* out_location) const;
private:
+ // Allows access to GetLocationPath for annotations.
+ friend class ::google::protobuf::io::Printer;
+
// See Descriptor::DebugString().
- void DebugString(int depth, string* contents) const;
+ void DebugString(int depth, string* contents,
+ const DebugStringOptions& options) const;
// Walks up the descriptor tree to generate the source location path
// to this descriptor from the file root.
- void GetLocationPath(vector<int>* output) const;
+ void GetLocationPath(std::vector<int>* output) const;
const string* name_;
const string* full_name_;
@@ -723,6 +841,10 @@
// See Descriptor::DebugString().
string DebugString() const;
+ // See Descriptor::DebugStringWithOptions().
+ string DebugStringWithOptions(const DebugStringOptions& options) const;
+
+
// Returns true if this is a placeholder for an unknown enum. This will
// only be the case if this descriptor comes from a DescriptorPool
// with AllowUnknownDependencies() set.
@@ -738,12 +860,28 @@
private:
typedef EnumOptions OptionsType;
+ // Allows access to GetLocationPath for annotations.
+ friend class ::google::protobuf::io::Printer;
+
+ // Looks up a value by number. If the value does not exist, dynamically
+ // creates a new EnumValueDescriptor for that value, assuming that it was
+ // unknown. If a new descriptor is created, this is done in a thread-safe way,
+ // and future calls will return the same value descriptor pointer.
+ //
+ // This is private but is used by GeneratedMessageReflection (which is
+ // friended below) to return a valid EnumValueDescriptor from GetEnum() when
+ // this feature is enabled.
+ const EnumValueDescriptor*
+ FindValueByNumberCreatingIfUnknown(int number) const;
+
+
// See Descriptor::DebugString().
- void DebugString(int depth, string *contents) const;
+ void DebugString(int depth, string *contents,
+ const DebugStringOptions& options) const;
// Walks up the descriptor tree to generate the source location path
// to this descriptor from the file root.
- void GetLocationPath(vector<int>* output) const;
+ void GetLocationPath(std::vector<int>* output) const;
const string* name_;
const string* full_name_;
@@ -769,6 +907,7 @@
friend class FieldDescriptor;
friend class EnumValueDescriptor;
friend class FileDescriptor;
+ friend class internal::GeneratedMessageReflection;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumDescriptor);
};
@@ -806,6 +945,10 @@
// See Descriptor::DebugString().
string DebugString() const;
+ // See Descriptor::DebugStringWithOptions().
+ string DebugStringWithOptions(const DebugStringOptions& options) const;
+
+
// Source Location ---------------------------------------------------
// Updates |*out_location| to the source location of the complete
@@ -816,12 +959,16 @@
private:
typedef EnumValueOptions OptionsType;
+ // Allows access to GetLocationPath for annotations.
+ friend class ::google::protobuf::io::Printer;
+
// See Descriptor::DebugString().
- void DebugString(int depth, string *contents) const;
+ void DebugString(int depth, string *contents,
+ const DebugStringOptions& options) const;
// Walks up the descriptor tree to generate the source location path
// to this descriptor from the file root.
- void GetLocationPath(vector<int>* output) const;
+ void GetLocationPath(std::vector<int>* output) const;
const string* name_;
const string* full_name_;
@@ -836,6 +983,7 @@
EnumValueDescriptor() {}
friend class DescriptorBuilder;
friend class EnumDescriptor;
+ friend class FileDescriptorTables;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumValueDescriptor);
};
@@ -876,6 +1024,10 @@
// See Descriptor::DebugString().
string DebugString() const;
+ // See Descriptor::DebugStringWithOptions().
+ string DebugStringWithOptions(const DebugStringOptions& options) const;
+
+
// Source Location ---------------------------------------------------
// Updates |*out_location| to the source location of the complete
@@ -886,12 +1038,15 @@
private:
typedef ServiceOptions OptionsType;
+ // Allows access to GetLocationPath for annotations.
+ friend class ::google::protobuf::io::Printer;
+
// See Descriptor::DebugString().
- void DebugString(string *contents) const;
+ void DebugString(string *contents, const DebugStringOptions& options) const;
// Walks up the descriptor tree to generate the source location path
// to this descriptor from the file root.
- void GetLocationPath(vector<int>* output) const;
+ void GetLocationPath(std::vector<int>* output) const;
const string* name_;
const string* full_name_;
@@ -932,6 +1087,11 @@
// Gets the type of protocol message which this message produces as output.
const Descriptor* output_type() const;
+ // Gets whether the client streams multiple requests.
+ bool client_streaming() const;
+ // Gets whether the server streams multiple responses.
+ bool server_streaming() const;
+
// Get options for this method. These are specified in the .proto file by
// placing lines like "option foo = 1234;" in curly-braces after a method
// declaration. Allowed options are defined by MethodOptions in
@@ -945,6 +1105,10 @@
// See Descriptor::DebugString().
string DebugString() const;
+ // See Descriptor::DebugStringWithOptions().
+ string DebugStringWithOptions(const DebugStringOptions& options) const;
+
+
// Source Location ---------------------------------------------------
// Updates |*out_location| to the source location of the complete
@@ -955,12 +1119,16 @@
private:
typedef MethodOptions OptionsType;
+ // Allows access to GetLocationPath for annotations.
+ friend class ::google::protobuf::io::Printer;
+
// See Descriptor::DebugString().
- void DebugString(int depth, string *contents) const;
+ void DebugString(int depth, string *contents,
+ const DebugStringOptions& options) const;
// Walks up the descriptor tree to generate the source location path
// to this descriptor from the file root.
- void GetLocationPath(vector<int>* output) const;
+ void GetLocationPath(std::vector<int>* output) const;
const string* name_;
const string* full_name_;
@@ -968,6 +1136,8 @@
const Descriptor* input_type_;
const Descriptor* output_type_;
const MethodOptions* options_;
+ bool client_streaming_;
+ bool server_streaming_;
// IMPORTANT: If you add a new field, make sure to search for all instances
// of Allocate<MethodDescriptor>() and AllocateArray<MethodDescriptor>() in
// descriptor.cc and update them to initialize the field.
@@ -1052,6 +1222,15 @@
// message.
const FileOptions& options() const;
+ // Syntax of this file.
+ enum Syntax {
+ SYNTAX_UNKNOWN = 0,
+ SYNTAX_PROTO2 = 2,
+ SYNTAX_PROTO3 = 3,
+ };
+ Syntax syntax() const;
+ static const char* SyntaxName(Syntax syntax);
+
// Find a top-level message type by name. Returns NULL if not found.
const Descriptor* FindMessageTypeByName(const string& name) const;
// Find a top-level enum type by name. Returns NULL if not found.
@@ -1078,26 +1257,34 @@
// Write the source code information of this FileDescriptor into the given
// FileDescriptorProto. See CopyTo() above.
void CopySourceCodeInfoTo(FileDescriptorProto* proto) const;
+ // Fill the json_name field of FieldDescriptorProto for all fields. Can only
+ // be called after CopyTo().
+ void CopyJsonNameTo(FileDescriptorProto* proto) const;
// See Descriptor::DebugString().
string DebugString() const;
+ // See Descriptor::DebugStringWithOptions().
+ string DebugStringWithOptions(const DebugStringOptions& options) const;
+
// Returns true if this is a placeholder for an unknown file. This will
// only be the case if this descriptor comes from a DescriptorPool
// with AllowUnknownDependencies() set.
bool is_placeholder() const;
- private:
- // Source Location ---------------------------------------------------
+ // Updates |*out_location| to the source location of the complete extent of
+ // this file declaration (namely, the empty path).
+ bool GetSourceLocation(SourceLocation* out_location) const;
// Updates |*out_location| to the source location of the complete
// extent of the declaration or declaration-part denoted by |path|.
// Returns false and leaves |*out_location| unchanged iff location
// information was not available. (See SourceCodeInfo for
// description of path encoding.)
- bool GetSourceLocation(const vector<int>& path,
+ bool GetSourceLocation(const std::vector<int>& path,
SourceLocation* out_location) const;
+ private:
typedef FileOptions OptionsType;
const string* name_;
@@ -1116,6 +1303,7 @@
int service_count_;
ServiceDescriptor* services_;
int extension_count_;
+ Syntax syntax_;
bool is_placeholder_;
FieldDescriptor* extensions_;
const FileOptions* options_;
@@ -1203,6 +1391,7 @@
// this pool. Do not add your own descriptors to this pool.
static const DescriptorPool* generated_pool();
+
// Find a FileDescriptor in the pool by file name. Returns NULL if not
// found.
const FileDescriptor* FindFileByName(const string& name) const;
@@ -1239,7 +1428,7 @@
// found: extensions defined in the fallback database might not be found
// depending on the database implementation.
void FindAllExtensions(const Descriptor* extendee,
- vector<const FieldDescriptor*>* out) const;
+ std::vector<const FieldDescriptor*>* out) const;
// Building descriptors --------------------------------------------
@@ -1268,7 +1457,7 @@
};
// Reports an error in the FileDescriptorProto. Use this function if the
- // problem occured should interrupt building the FileDescriptorProto.
+ // problem occurred should interrupt building the FileDescriptorProto.
virtual void AddError(
const string& filename, // File name in which the error occurred.
const string& element_name, // Full name of the erroneous element.
@@ -1278,13 +1467,13 @@
) = 0;
// Reports a warning in the FileDescriptorProto. Use this function if the
- // problem occured should NOT interrupt building the FileDescriptorProto.
+ // problem occurred should NOT interrupt building the FileDescriptorProto.
virtual void AddWarning(
- const string& filename, // File name in which the error occurred.
- const 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 string& message // Human-readable error message.
+ const string& /*filename*/, // File name in which the error occurred.
+ const 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 string& /*message*/ // Human-readable error message.
) {}
private:
@@ -1394,6 +1583,7 @@
friend class ServiceDescriptor;
friend class FileDescriptor;
friend class DescriptorBuilder;
+ friend class FileDescriptorTables;
// Return true if the given name is a sub-symbol of any non-package
// descriptor that already exists in the descriptor pool. (The full
@@ -1427,7 +1617,7 @@
// This class contains a lot of hash maps with complicated types that
// we'd like to keep out of the header.
class Tables;
- scoped_ptr<Tables> tables_;
+ google::protobuf::scoped_ptr<Tables> tables_;
bool enforce_dependencies_;
bool allow_unknown_;
@@ -1475,11 +1665,18 @@
const Descriptor::ExtensionRange*)
PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, extension,
const FieldDescriptor*)
-PROTOBUF_DEFINE_OPTIONS_ACCESSOR(Descriptor, MessageOptions);
+
+PROTOBUF_DEFINE_ACCESSOR(Descriptor, reserved_range_count, int)
+PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, reserved_range,
+ const Descriptor::ReservedRange*)
+PROTOBUF_DEFINE_ACCESSOR(Descriptor, reserved_name_count, int)
+
+PROTOBUF_DEFINE_OPTIONS_ACCESSOR(Descriptor, MessageOptions)
PROTOBUF_DEFINE_ACCESSOR(Descriptor, is_placeholder, bool)
PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, name)
PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, full_name)
+PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, json_name)
PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, lowercase_name)
PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, camelcase_name)
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, file, const FileDescriptor*)
@@ -1494,8 +1691,6 @@
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, extension_scope, const Descriptor*)
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, message_type, const Descriptor*)
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, enum_type, const EnumDescriptor*)
-PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, experimental_map_key,
- const FieldDescriptor*)
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(FieldDescriptor, FieldOptions)
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, has_default_value, bool)
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_int32 , int32 )
@@ -1521,7 +1716,7 @@
PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, value_count, int)
PROTOBUF_DEFINE_ARRAY_ACCESSOR(EnumDescriptor, value,
const EnumValueDescriptor*)
-PROTOBUF_DEFINE_OPTIONS_ACCESSOR(EnumDescriptor, EnumOptions);
+PROTOBUF_DEFINE_OPTIONS_ACCESSOR(EnumDescriptor, EnumOptions)
PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, is_placeholder, bool)
PROTOBUF_DEFINE_STRING_ACCESSOR(EnumValueDescriptor, name)
@@ -1536,14 +1731,17 @@
PROTOBUF_DEFINE_ACCESSOR(ServiceDescriptor, method_count, int)
PROTOBUF_DEFINE_ARRAY_ACCESSOR(ServiceDescriptor, method,
const MethodDescriptor*)
-PROTOBUF_DEFINE_OPTIONS_ACCESSOR(ServiceDescriptor, ServiceOptions);
+PROTOBUF_DEFINE_OPTIONS_ACCESSOR(ServiceDescriptor, ServiceOptions)
PROTOBUF_DEFINE_STRING_ACCESSOR(MethodDescriptor, name)
PROTOBUF_DEFINE_STRING_ACCESSOR(MethodDescriptor, full_name)
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, service, const ServiceDescriptor*)
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, input_type, const Descriptor*)
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, output_type, const Descriptor*)
-PROTOBUF_DEFINE_OPTIONS_ACCESSOR(MethodDescriptor, MethodOptions);
+PROTOBUF_DEFINE_OPTIONS_ACCESSOR(MethodDescriptor, MethodOptions)
+PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, client_streaming, bool)
+PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, server_streaming, bool)
+
PROTOBUF_DEFINE_STRING_ACCESSOR(FileDescriptor, name)
PROTOBUF_DEFINE_STRING_ACCESSOR(FileDescriptor, package)
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, pool, const DescriptorPool*)
@@ -1554,7 +1752,7 @@
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, enum_type_count, int)
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, service_count, int)
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, extension_count, int)
-PROTOBUF_DEFINE_OPTIONS_ACCESSOR(FileDescriptor, FileOptions);
+PROTOBUF_DEFINE_OPTIONS_ACCESSOR(FileDescriptor, FileOptions)
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, is_placeholder, bool)
PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, message_type, const Descriptor*)
@@ -1574,6 +1772,25 @@
return FindExtensionRangeContainingNumber(number) != NULL;
}
+inline bool Descriptor::IsReservedNumber(int number) const {
+ return FindReservedRangeContainingNumber(number) != NULL;
+}
+
+inline bool Descriptor::IsReservedName(const string& name) const {
+ for (int i = 0; i < reserved_name_count(); i++) {
+ if (name == reserved_name(i)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+// Can't use PROTOBUF_DEFINE_ARRAY_ACCESSOR because reserved_names_ is actually
+// an array of pointers rather than the usual array of objects.
+inline const string& Descriptor::reserved_name(int index) const {
+ return *reserved_names_[index];
+}
+
inline bool FieldDescriptor::is_required() const {
return label() == LABEL_REQUIRED;
}
@@ -1679,6 +1896,10 @@
return dependencies_[weak_dependencies_[index]];
}
+inline FileDescriptor::Syntax FileDescriptor::syntax() const {
+ return syntax_;
+}
+
// Can't use PROTOBUF_DEFINE_ARRAY_ACCESSOR because fields_ is actually an array
// of pointers rather than the usual array of objects.
inline const FieldDescriptor* OneofDescriptor::field(int index) const {
diff --git a/darwin-x86_64/protoc/include/google/protobuf/descriptor.pb.h b/darwin-x86_64/protoc/include/google/protobuf/descriptor.pb.h
index 4552181..92a0a3a 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/descriptor.pb.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/descriptor.pb.h
@@ -8,18 +8,21 @@
#include <google/protobuf/stubs/common.h>
-#if GOOGLE_PROTOBUF_VERSION < 2006000
+#if GOOGLE_PROTOBUF_VERSION < 3000000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 2006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
+#include <google/protobuf/arena.h>
+#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/metadata.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h>
#include <google/protobuf/extension_set.h>
@@ -35,27 +38,30 @@
void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
-class FileDescriptorSet;
-class FileDescriptorProto;
class DescriptorProto;
class DescriptorProto_ExtensionRange;
-class FieldDescriptorProto;
-class OneofDescriptorProto;
+class DescriptorProto_ReservedRange;
class EnumDescriptorProto;
-class EnumValueDescriptorProto;
-class ServiceDescriptorProto;
-class MethodDescriptorProto;
-class FileOptions;
-class MessageOptions;
-class FieldOptions;
class EnumOptions;
+class EnumValueDescriptorProto;
class EnumValueOptions;
-class ServiceOptions;
+class FieldDescriptorProto;
+class FieldOptions;
+class FileDescriptorProto;
+class FileDescriptorSet;
+class FileOptions;
+class GeneratedCodeInfo;
+class GeneratedCodeInfo_Annotation;
+class MessageOptions;
+class MethodDescriptorProto;
class MethodOptions;
-class UninterpretedOption;
-class UninterpretedOption_NamePart;
+class OneofDescriptorProto;
+class ServiceDescriptorProto;
+class ServiceOptions;
class SourceCodeInfo;
class SourceCodeInfo_Location;
+class UninterpretedOption;
+class UninterpretedOption_NamePart;
enum FieldDescriptorProto_Type {
FieldDescriptorProto_Type_TYPE_DOUBLE = 1,
@@ -152,6 +158,26 @@
return ::google::protobuf::internal::ParseNamedEnum<FieldOptions_CType>(
FieldOptions_CType_descriptor(), name, value);
}
+enum FieldOptions_JSType {
+ FieldOptions_JSType_JS_NORMAL = 0,
+ FieldOptions_JSType_JS_STRING = 1,
+ FieldOptions_JSType_JS_NUMBER = 2
+};
+LIBPROTOBUF_EXPORT bool FieldOptions_JSType_IsValid(int value);
+const FieldOptions_JSType FieldOptions_JSType_JSType_MIN = FieldOptions_JSType_JS_NORMAL;
+const FieldOptions_JSType FieldOptions_JSType_JSType_MAX = FieldOptions_JSType_JS_NUMBER;
+const int FieldOptions_JSType_JSType_ARRAYSIZE = FieldOptions_JSType_JSType_MAX + 1;
+
+LIBPROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FieldOptions_JSType_descriptor();
+inline const ::std::string& FieldOptions_JSType_Name(FieldOptions_JSType value) {
+ return ::google::protobuf::internal::NameOfEnum(
+ FieldOptions_JSType_descriptor(), value);
+}
+inline bool FieldOptions_JSType_Parse(
+ const ::std::string& name, FieldOptions_JSType* value) {
+ return ::google::protobuf::internal::ParseNamedEnum<FieldOptions_JSType>(
+ FieldOptions_JSType_descriptor(), name, value);
+}
// ===================================================================
class LIBPROTOBUF_EXPORT FileDescriptorSet : public ::google::protobuf::Message {
@@ -167,11 +193,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -181,7 +207,9 @@
// implements Message ----------------------------------------------
- FileDescriptorSet* New() const;
+ inline FileDescriptorSet* New() const { return New(NULL); }
+
+ FileDescriptorSet* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const FileDescriptorSet& from);
@@ -200,7 +228,16 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(FileDescriptorSet* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -208,22 +245,21 @@
// accessors -------------------------------------------------------
// repeated .google.protobuf.FileDescriptorProto file = 1;
- inline int file_size() const;
- inline void clear_file();
+ int file_size() const;
+ void clear_file();
static const int kFileFieldNumber = 1;
- inline const ::google::protobuf::FileDescriptorProto& file(int index) const;
- inline ::google::protobuf::FileDescriptorProto* mutable_file(int index);
- inline ::google::protobuf::FileDescriptorProto* add_file();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >&
- file() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >*
+ const ::google::protobuf::FileDescriptorProto& file(int index) const;
+ ::google::protobuf::FileDescriptorProto* mutable_file(int index);
+ ::google::protobuf::FileDescriptorProto* add_file();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >*
mutable_file();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >&
+ file() const;
// @@protoc_insertion_point(class_scope:google.protobuf.FileDescriptorSet)
private:
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto > file_;
@@ -249,11 +285,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -263,7 +299,9 @@
// implements Message ----------------------------------------------
- FileDescriptorProto* New() const;
+ inline FileDescriptorProto* New() const { return New(NULL); }
+
+ FileDescriptorProto* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const FileDescriptorProto& from);
@@ -282,7 +320,16 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(FileDescriptorProto* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -290,134 +337,146 @@
// accessors -------------------------------------------------------
// optional string name = 1;
- inline bool has_name() const;
- inline void clear_name();
+ bool has_name() const;
+ void clear_name();
static const int kNameFieldNumber = 1;
- inline const ::std::string& name() const;
- inline void set_name(const ::std::string& value);
- inline void set_name(const char* value);
- inline void set_name(const char* value, size_t size);
- inline ::std::string* mutable_name();
- inline ::std::string* release_name();
- inline void set_allocated_name(::std::string* name);
+ const ::std::string& name() const;
+ void set_name(const ::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);
// optional string package = 2;
- inline bool has_package() const;
- inline void clear_package();
+ bool has_package() const;
+ void clear_package();
static const int kPackageFieldNumber = 2;
- inline const ::std::string& package() const;
- inline void set_package(const ::std::string& value);
- inline void set_package(const char* value);
- inline void set_package(const char* value, size_t size);
- inline ::std::string* mutable_package();
- inline ::std::string* release_package();
- inline void set_allocated_package(::std::string* package);
+ const ::std::string& package() const;
+ void set_package(const ::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);
// repeated string dependency = 3;
- inline int dependency_size() const;
- inline void clear_dependency();
+ int dependency_size() const;
+ void clear_dependency();
static const int kDependencyFieldNumber = 3;
- inline const ::std::string& dependency(int index) const;
- inline ::std::string* mutable_dependency(int index);
- inline void set_dependency(int index, const ::std::string& value);
- inline void set_dependency(int index, const char* value);
- inline void set_dependency(int index, const char* value, size_t size);
- inline ::std::string* add_dependency();
- inline void add_dependency(const ::std::string& value);
- inline void add_dependency(const char* value);
- inline void add_dependency(const char* value, size_t size);
- inline const ::google::protobuf::RepeatedPtrField< ::std::string>& dependency() const;
- inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_dependency();
+ 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, 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);
+ 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();
// repeated int32 public_dependency = 10;
- inline int public_dependency_size() const;
- inline void clear_public_dependency();
+ int public_dependency_size() const;
+ void clear_public_dependency();
static const int kPublicDependencyFieldNumber = 10;
- inline ::google::protobuf::int32 public_dependency(int index) const;
- inline void set_public_dependency(int index, ::google::protobuf::int32 value);
- inline void add_public_dependency(::google::protobuf::int32 value);
- inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
+ ::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 >&
public_dependency() const;
- inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
+ ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
mutable_public_dependency();
// repeated int32 weak_dependency = 11;
- inline int weak_dependency_size() const;
- inline void clear_weak_dependency();
+ int weak_dependency_size() const;
+ void clear_weak_dependency();
static const int kWeakDependencyFieldNumber = 11;
- inline ::google::protobuf::int32 weak_dependency(int index) const;
- inline void set_weak_dependency(int index, ::google::protobuf::int32 value);
- inline void add_weak_dependency(::google::protobuf::int32 value);
- inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
+ ::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 >&
weak_dependency() const;
- inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
+ ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
mutable_weak_dependency();
// repeated .google.protobuf.DescriptorProto message_type = 4;
- inline int message_type_size() const;
- inline void clear_message_type();
+ int message_type_size() const;
+ void clear_message_type();
static const int kMessageTypeFieldNumber = 4;
- inline const ::google::protobuf::DescriptorProto& message_type(int index) const;
- inline ::google::protobuf::DescriptorProto* mutable_message_type(int index);
- inline ::google::protobuf::DescriptorProto* add_message_type();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >&
- message_type() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >*
+ const ::google::protobuf::DescriptorProto& message_type(int index) const;
+ ::google::protobuf::DescriptorProto* mutable_message_type(int index);
+ ::google::protobuf::DescriptorProto* add_message_type();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >*
mutable_message_type();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >&
+ message_type() const;
// repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
- inline int enum_type_size() const;
- inline void clear_enum_type();
+ int enum_type_size() const;
+ void clear_enum_type();
static const int kEnumTypeFieldNumber = 5;
- inline const ::google::protobuf::EnumDescriptorProto& enum_type(int index) const;
- inline ::google::protobuf::EnumDescriptorProto* mutable_enum_type(int index);
- inline ::google::protobuf::EnumDescriptorProto* add_enum_type();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >&
- enum_type() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >*
+ const ::google::protobuf::EnumDescriptorProto& enum_type(int index) const;
+ ::google::protobuf::EnumDescriptorProto* mutable_enum_type(int index);
+ ::google::protobuf::EnumDescriptorProto* add_enum_type();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >*
mutable_enum_type();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >&
+ enum_type() const;
// repeated .google.protobuf.ServiceDescriptorProto service = 6;
- inline int service_size() const;
- inline void clear_service();
+ int service_size() const;
+ void clear_service();
static const int kServiceFieldNumber = 6;
- inline const ::google::protobuf::ServiceDescriptorProto& service(int index) const;
- inline ::google::protobuf::ServiceDescriptorProto* mutable_service(int index);
- inline ::google::protobuf::ServiceDescriptorProto* add_service();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >&
- service() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >*
+ const ::google::protobuf::ServiceDescriptorProto& service(int index) const;
+ ::google::protobuf::ServiceDescriptorProto* mutable_service(int index);
+ ::google::protobuf::ServiceDescriptorProto* add_service();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >*
mutable_service();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >&
+ service() const;
// repeated .google.protobuf.FieldDescriptorProto extension = 7;
- inline int extension_size() const;
- inline void clear_extension();
+ int extension_size() const;
+ void clear_extension();
static const int kExtensionFieldNumber = 7;
- inline const ::google::protobuf::FieldDescriptorProto& extension(int index) const;
- inline ::google::protobuf::FieldDescriptorProto* mutable_extension(int index);
- inline ::google::protobuf::FieldDescriptorProto* add_extension();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
- extension() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
+ const ::google::protobuf::FieldDescriptorProto& extension(int index) const;
+ ::google::protobuf::FieldDescriptorProto* mutable_extension(int index);
+ ::google::protobuf::FieldDescriptorProto* add_extension();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
mutable_extension();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
+ extension() const;
// optional .google.protobuf.FileOptions options = 8;
- inline bool has_options() const;
- inline void clear_options();
+ bool has_options() const;
+ void clear_options();
static const int kOptionsFieldNumber = 8;
- inline const ::google::protobuf::FileOptions& options() const;
- inline ::google::protobuf::FileOptions* mutable_options();
- inline ::google::protobuf::FileOptions* release_options();
- inline void set_allocated_options(::google::protobuf::FileOptions* options);
+ const ::google::protobuf::FileOptions& options() const;
+ ::google::protobuf::FileOptions* mutable_options();
+ ::google::protobuf::FileOptions* release_options();
+ void set_allocated_options(::google::protobuf::FileOptions* options);
// optional .google.protobuf.SourceCodeInfo source_code_info = 9;
- inline bool has_source_code_info() const;
- inline void clear_source_code_info();
+ bool has_source_code_info() const;
+ void clear_source_code_info();
static const int kSourceCodeInfoFieldNumber = 9;
- inline const ::google::protobuf::SourceCodeInfo& source_code_info() const;
- inline ::google::protobuf::SourceCodeInfo* mutable_source_code_info();
- inline ::google::protobuf::SourceCodeInfo* release_source_code_info();
- inline void set_allocated_source_code_info(::google::protobuf::SourceCodeInfo* source_code_info);
+ const ::google::protobuf::SourceCodeInfo& source_code_info() const;
+ ::google::protobuf::SourceCodeInfo* mutable_source_code_info();
+ ::google::protobuf::SourceCodeInfo* release_source_code_info();
+ void set_allocated_source_code_info(::google::protobuf::SourceCodeInfo* source_code_info);
+
+ // 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);
+ 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);
// @@protoc_insertion_point(class_scope:google.protobuf.FileDescriptorProto)
private:
@@ -429,13 +488,14 @@
inline void clear_has_options();
inline void set_has_source_code_info();
inline void clear_has_source_code_info();
+ inline void set_has_syntax();
+ inline void clear_has_syntax();
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
- ::std::string* name_;
- ::std::string* package_;
+ ::google::protobuf::internal::ArenaStringPtr name_;
+ ::google::protobuf::internal::ArenaStringPtr package_;
::google::protobuf::RepeatedPtrField< ::std::string> dependency_;
::google::protobuf::RepeatedField< ::google::protobuf::int32 > public_dependency_;
::google::protobuf::RepeatedField< ::google::protobuf::int32 > weak_dependency_;
@@ -445,6 +505,7 @@
::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto > extension_;
::google::protobuf::FileOptions* options_;
::google::protobuf::SourceCodeInfo* source_code_info_;
+ ::google::protobuf::internal::ArenaStringPtr syntax_;
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -467,11 +528,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -481,7 +542,9 @@
// implements Message ----------------------------------------------
- DescriptorProto_ExtensionRange* New() const;
+ inline DescriptorProto_ExtensionRange* New() const { return New(NULL); }
+
+ DescriptorProto_ExtensionRange* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const DescriptorProto_ExtensionRange& from);
@@ -500,7 +563,16 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(DescriptorProto_ExtensionRange* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -508,18 +580,18 @@
// accessors -------------------------------------------------------
// optional int32 start = 1;
- inline bool has_start() const;
- inline void clear_start();
+ bool has_start() const;
+ void clear_start();
static const int kStartFieldNumber = 1;
- inline ::google::protobuf::int32 start() const;
- inline void set_start(::google::protobuf::int32 value);
+ ::google::protobuf::int32 start() const;
+ void set_start(::google::protobuf::int32 value);
// optional int32 end = 2;
- inline bool has_end() const;
- inline void clear_end();
+ bool has_end() const;
+ void clear_end();
static const int kEndFieldNumber = 2;
- inline ::google::protobuf::int32 end() const;
- inline void set_end(::google::protobuf::int32 value);
+ ::google::protobuf::int32 end() const;
+ void set_end(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:google.protobuf.DescriptorProto.ExtensionRange)
private:
@@ -528,8 +600,7 @@
inline void set_has_end();
inline void clear_has_end();
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
::google::protobuf::int32 start_;
@@ -543,6 +614,105 @@
};
// -------------------------------------------------------------------
+class LIBPROTOBUF_EXPORT DescriptorProto_ReservedRange : public ::google::protobuf::Message {
+ public:
+ DescriptorProto_ReservedRange();
+ virtual ~DescriptorProto_ReservedRange();
+
+ DescriptorProto_ReservedRange(const DescriptorProto_ReservedRange& from);
+
+ inline DescriptorProto_ReservedRange& operator=(const DescriptorProto_ReservedRange& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+ return _internal_metadata_.unknown_fields();
+ }
+
+ inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+ return _internal_metadata_.mutable_unknown_fields();
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const DescriptorProto_ReservedRange& default_instance();
+
+ void Swap(DescriptorProto_ReservedRange* other);
+
+ // implements Message ----------------------------------------------
+
+ inline DescriptorProto_ReservedRange* New() const { return New(NULL); }
+
+ DescriptorProto_ReservedRange* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const DescriptorProto_ReservedRange& from);
+ void MergeFrom(const DescriptorProto_ReservedRange& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(DescriptorProto_ReservedRange* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // 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);
+
+ // 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);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.DescriptorProto.ReservedRange)
+ private:
+ inline void set_has_start();
+ inline void clear_has_start();
+ inline void set_has_end();
+ inline void clear_has_end();
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ ::google::protobuf::uint32 _has_bits_[1];
+ mutable int _cached_size_;
+ ::google::protobuf::int32 start_;
+ ::google::protobuf::int32 end_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
+
+ void InitAsDefaultInstance();
+ static DescriptorProto_ReservedRange* default_instance_;
+};
+// -------------------------------------------------------------------
+
class LIBPROTOBUF_EXPORT DescriptorProto : public ::google::protobuf::Message {
public:
DescriptorProto();
@@ -556,11 +726,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -570,7 +740,9 @@
// implements Message ----------------------------------------------
- DescriptorProto* New() const;
+ inline DescriptorProto* New() const { return New(NULL); }
+
+ DescriptorProto* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const DescriptorProto& from);
@@ -589,107 +761,145 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(DescriptorProto* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
typedef DescriptorProto_ExtensionRange ExtensionRange;
+ typedef DescriptorProto_ReservedRange ReservedRange;
// accessors -------------------------------------------------------
// optional string name = 1;
- inline bool has_name() const;
- inline void clear_name();
+ bool has_name() const;
+ void clear_name();
static const int kNameFieldNumber = 1;
- inline const ::std::string& name() const;
- inline void set_name(const ::std::string& value);
- inline void set_name(const char* value);
- inline void set_name(const char* value, size_t size);
- inline ::std::string* mutable_name();
- inline ::std::string* release_name();
- inline void set_allocated_name(::std::string* name);
+ const ::std::string& name() const;
+ void set_name(const ::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);
// repeated .google.protobuf.FieldDescriptorProto field = 2;
- inline int field_size() const;
- inline void clear_field();
+ int field_size() const;
+ void clear_field();
static const int kFieldFieldNumber = 2;
- inline const ::google::protobuf::FieldDescriptorProto& field(int index) const;
- inline ::google::protobuf::FieldDescriptorProto* mutable_field(int index);
- inline ::google::protobuf::FieldDescriptorProto* add_field();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
- field() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
+ const ::google::protobuf::FieldDescriptorProto& field(int index) const;
+ ::google::protobuf::FieldDescriptorProto* mutable_field(int index);
+ ::google::protobuf::FieldDescriptorProto* add_field();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
mutable_field();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
+ field() const;
// repeated .google.protobuf.FieldDescriptorProto extension = 6;
- inline int extension_size() const;
- inline void clear_extension();
+ int extension_size() const;
+ void clear_extension();
static const int kExtensionFieldNumber = 6;
- inline const ::google::protobuf::FieldDescriptorProto& extension(int index) const;
- inline ::google::protobuf::FieldDescriptorProto* mutable_extension(int index);
- inline ::google::protobuf::FieldDescriptorProto* add_extension();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
- extension() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
+ const ::google::protobuf::FieldDescriptorProto& extension(int index) const;
+ ::google::protobuf::FieldDescriptorProto* mutable_extension(int index);
+ ::google::protobuf::FieldDescriptorProto* add_extension();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
mutable_extension();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
+ extension() const;
// repeated .google.protobuf.DescriptorProto nested_type = 3;
- inline int nested_type_size() const;
- inline void clear_nested_type();
+ int nested_type_size() const;
+ void clear_nested_type();
static const int kNestedTypeFieldNumber = 3;
- inline const ::google::protobuf::DescriptorProto& nested_type(int index) const;
- inline ::google::protobuf::DescriptorProto* mutable_nested_type(int index);
- inline ::google::protobuf::DescriptorProto* add_nested_type();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >&
- nested_type() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >*
+ const ::google::protobuf::DescriptorProto& nested_type(int index) const;
+ ::google::protobuf::DescriptorProto* mutable_nested_type(int index);
+ ::google::protobuf::DescriptorProto* add_nested_type();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >*
mutable_nested_type();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >&
+ nested_type() const;
// repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
- inline int enum_type_size() const;
- inline void clear_enum_type();
+ int enum_type_size() const;
+ void clear_enum_type();
static const int kEnumTypeFieldNumber = 4;
- inline const ::google::protobuf::EnumDescriptorProto& enum_type(int index) const;
- inline ::google::protobuf::EnumDescriptorProto* mutable_enum_type(int index);
- inline ::google::protobuf::EnumDescriptorProto* add_enum_type();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >&
- enum_type() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >*
+ const ::google::protobuf::EnumDescriptorProto& enum_type(int index) const;
+ ::google::protobuf::EnumDescriptorProto* mutable_enum_type(int index);
+ ::google::protobuf::EnumDescriptorProto* add_enum_type();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >*
mutable_enum_type();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >&
+ enum_type() const;
// repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
- inline int extension_range_size() const;
- inline void clear_extension_range();
+ int extension_range_size() const;
+ void clear_extension_range();
static const int kExtensionRangeFieldNumber = 5;
- inline const ::google::protobuf::DescriptorProto_ExtensionRange& extension_range(int index) const;
- inline ::google::protobuf::DescriptorProto_ExtensionRange* mutable_extension_range(int index);
- inline ::google::protobuf::DescriptorProto_ExtensionRange* add_extension_range();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >&
- extension_range() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >*
+ const ::google::protobuf::DescriptorProto_ExtensionRange& extension_range(int index) const;
+ ::google::protobuf::DescriptorProto_ExtensionRange* mutable_extension_range(int index);
+ ::google::protobuf::DescriptorProto_ExtensionRange* add_extension_range();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >*
mutable_extension_range();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >&
+ extension_range() const;
// repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
- inline int oneof_decl_size() const;
- inline void clear_oneof_decl();
+ int oneof_decl_size() const;
+ void clear_oneof_decl();
static const int kOneofDeclFieldNumber = 8;
- inline const ::google::protobuf::OneofDescriptorProto& oneof_decl(int index) const;
- inline ::google::protobuf::OneofDescriptorProto* mutable_oneof_decl(int index);
- inline ::google::protobuf::OneofDescriptorProto* add_oneof_decl();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >&
- oneof_decl() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >*
+ const ::google::protobuf::OneofDescriptorProto& oneof_decl(int index) const;
+ ::google::protobuf::OneofDescriptorProto* mutable_oneof_decl(int index);
+ ::google::protobuf::OneofDescriptorProto* add_oneof_decl();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >*
mutable_oneof_decl();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >&
+ oneof_decl() const;
// optional .google.protobuf.MessageOptions options = 7;
- inline bool has_options() const;
- inline void clear_options();
+ bool has_options() const;
+ void clear_options();
static const int kOptionsFieldNumber = 7;
- inline const ::google::protobuf::MessageOptions& options() const;
- inline ::google::protobuf::MessageOptions* mutable_options();
- inline ::google::protobuf::MessageOptions* release_options();
- inline void set_allocated_options(::google::protobuf::MessageOptions* options);
+ const ::google::protobuf::MessageOptions& options() const;
+ ::google::protobuf::MessageOptions* mutable_options();
+ ::google::protobuf::MessageOptions* release_options();
+ void set_allocated_options(::google::protobuf::MessageOptions* options);
+
+ // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
+ int reserved_range_size() const;
+ void clear_reserved_range();
+ static const int kReservedRangeFieldNumber = 9;
+ const ::google::protobuf::DescriptorProto_ReservedRange& reserved_range(int index) const;
+ ::google::protobuf::DescriptorProto_ReservedRange* mutable_reserved_range(int index);
+ ::google::protobuf::DescriptorProto_ReservedRange* add_reserved_range();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ReservedRange >*
+ mutable_reserved_range();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::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);
+ 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);
+ 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();
// @@protoc_insertion_point(class_scope:google.protobuf.DescriptorProto)
private:
@@ -698,11 +908,10 @@
inline void set_has_options();
inline void clear_has_options();
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
- ::std::string* name_;
+ ::google::protobuf::internal::ArenaStringPtr name_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto > field_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto > extension_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto > nested_type_;
@@ -710,6 +919,8 @@
::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange > extension_range_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto > oneof_decl_;
::google::protobuf::MessageOptions* options_;
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ReservedRange > reserved_range_;
+ ::google::protobuf::RepeatedPtrField< ::std::string> reserved_name_;
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -732,11 +943,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -746,7 +957,9 @@
// implements Message ----------------------------------------------
- FieldDescriptorProto* New() const;
+ inline FieldDescriptorProto* New() const { return New(NULL); }
+
+ FieldDescriptorProto* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const FieldDescriptorProto& from);
@@ -765,30 +978,57 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(FieldDescriptorProto* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
typedef FieldDescriptorProto_Type Type;
- static const Type TYPE_DOUBLE = FieldDescriptorProto_Type_TYPE_DOUBLE;
- static const Type TYPE_FLOAT = FieldDescriptorProto_Type_TYPE_FLOAT;
- static const Type TYPE_INT64 = FieldDescriptorProto_Type_TYPE_INT64;
- static const Type TYPE_UINT64 = FieldDescriptorProto_Type_TYPE_UINT64;
- static const Type TYPE_INT32 = FieldDescriptorProto_Type_TYPE_INT32;
- static const Type TYPE_FIXED64 = FieldDescriptorProto_Type_TYPE_FIXED64;
- static const Type TYPE_FIXED32 = FieldDescriptorProto_Type_TYPE_FIXED32;
- static const Type TYPE_BOOL = FieldDescriptorProto_Type_TYPE_BOOL;
- static const Type TYPE_STRING = FieldDescriptorProto_Type_TYPE_STRING;
- static const Type TYPE_GROUP = FieldDescriptorProto_Type_TYPE_GROUP;
- static const Type TYPE_MESSAGE = FieldDescriptorProto_Type_TYPE_MESSAGE;
- static const Type TYPE_BYTES = FieldDescriptorProto_Type_TYPE_BYTES;
- static const Type TYPE_UINT32 = FieldDescriptorProto_Type_TYPE_UINT32;
- static const Type TYPE_ENUM = FieldDescriptorProto_Type_TYPE_ENUM;
- static const Type TYPE_SFIXED32 = FieldDescriptorProto_Type_TYPE_SFIXED32;
- static const Type TYPE_SFIXED64 = FieldDescriptorProto_Type_TYPE_SFIXED64;
- static const Type TYPE_SINT32 = FieldDescriptorProto_Type_TYPE_SINT32;
- static const Type TYPE_SINT64 = FieldDescriptorProto_Type_TYPE_SINT64;
+ static const Type TYPE_DOUBLE =
+ FieldDescriptorProto_Type_TYPE_DOUBLE;
+ static const Type TYPE_FLOAT =
+ FieldDescriptorProto_Type_TYPE_FLOAT;
+ static const Type TYPE_INT64 =
+ FieldDescriptorProto_Type_TYPE_INT64;
+ static const Type TYPE_UINT64 =
+ FieldDescriptorProto_Type_TYPE_UINT64;
+ static const Type TYPE_INT32 =
+ FieldDescriptorProto_Type_TYPE_INT32;
+ static const Type TYPE_FIXED64 =
+ FieldDescriptorProto_Type_TYPE_FIXED64;
+ static const Type TYPE_FIXED32 =
+ FieldDescriptorProto_Type_TYPE_FIXED32;
+ static const Type TYPE_BOOL =
+ FieldDescriptorProto_Type_TYPE_BOOL;
+ static const Type TYPE_STRING =
+ FieldDescriptorProto_Type_TYPE_STRING;
+ static const Type TYPE_GROUP =
+ FieldDescriptorProto_Type_TYPE_GROUP;
+ static const Type TYPE_MESSAGE =
+ FieldDescriptorProto_Type_TYPE_MESSAGE;
+ static const Type TYPE_BYTES =
+ FieldDescriptorProto_Type_TYPE_BYTES;
+ static const Type TYPE_UINT32 =
+ FieldDescriptorProto_Type_TYPE_UINT32;
+ static const Type TYPE_ENUM =
+ FieldDescriptorProto_Type_TYPE_ENUM;
+ static const Type TYPE_SFIXED32 =
+ FieldDescriptorProto_Type_TYPE_SFIXED32;
+ static const Type TYPE_SFIXED64 =
+ FieldDescriptorProto_Type_TYPE_SFIXED64;
+ static const Type TYPE_SINT32 =
+ FieldDescriptorProto_Type_TYPE_SINT32;
+ static const Type TYPE_SINT64 =
+ FieldDescriptorProto_Type_TYPE_SINT64;
static inline bool Type_IsValid(int value) {
return FieldDescriptorProto_Type_IsValid(value);
}
@@ -811,9 +1051,12 @@
}
typedef FieldDescriptorProto_Label Label;
- static const Label LABEL_OPTIONAL = FieldDescriptorProto_Label_LABEL_OPTIONAL;
- static const Label LABEL_REQUIRED = FieldDescriptorProto_Label_LABEL_REQUIRED;
- static const Label LABEL_REPEATED = FieldDescriptorProto_Label_LABEL_REPEATED;
+ static const Label LABEL_OPTIONAL =
+ FieldDescriptorProto_Label_LABEL_OPTIONAL;
+ static const Label LABEL_REQUIRED =
+ FieldDescriptorProto_Label_LABEL_REQUIRED;
+ static const Label LABEL_REPEATED =
+ FieldDescriptorProto_Label_LABEL_REPEATED;
static inline bool Label_IsValid(int value) {
return FieldDescriptorProto_Label_IsValid(value);
}
@@ -838,89 +1081,101 @@
// accessors -------------------------------------------------------
// optional string name = 1;
- inline bool has_name() const;
- inline void clear_name();
+ bool has_name() const;
+ void clear_name();
static const int kNameFieldNumber = 1;
- inline const ::std::string& name() const;
- inline void set_name(const ::std::string& value);
- inline void set_name(const char* value);
- inline void set_name(const char* value, size_t size);
- inline ::std::string* mutable_name();
- inline ::std::string* release_name();
- inline void set_allocated_name(::std::string* name);
+ const ::std::string& name() const;
+ void set_name(const ::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);
// optional int32 number = 3;
- inline bool has_number() const;
- inline void clear_number();
+ bool has_number() const;
+ void clear_number();
static const int kNumberFieldNumber = 3;
- inline ::google::protobuf::int32 number() const;
- inline void set_number(::google::protobuf::int32 value);
+ ::google::protobuf::int32 number() const;
+ void set_number(::google::protobuf::int32 value);
// optional .google.protobuf.FieldDescriptorProto.Label label = 4;
- inline bool has_label() const;
- inline void clear_label();
+ bool has_label() const;
+ void clear_label();
static const int kLabelFieldNumber = 4;
- inline ::google::protobuf::FieldDescriptorProto_Label label() const;
- inline void set_label(::google::protobuf::FieldDescriptorProto_Label value);
+ ::google::protobuf::FieldDescriptorProto_Label label() const;
+ void set_label(::google::protobuf::FieldDescriptorProto_Label value);
// optional .google.protobuf.FieldDescriptorProto.Type type = 5;
- inline bool has_type() const;
- inline void clear_type();
+ bool has_type() const;
+ void clear_type();
static const int kTypeFieldNumber = 5;
- inline ::google::protobuf::FieldDescriptorProto_Type type() const;
- inline void set_type(::google::protobuf::FieldDescriptorProto_Type value);
+ ::google::protobuf::FieldDescriptorProto_Type type() const;
+ void set_type(::google::protobuf::FieldDescriptorProto_Type value);
// optional string type_name = 6;
- inline bool has_type_name() const;
- inline void clear_type_name();
+ bool has_type_name() const;
+ void clear_type_name();
static const int kTypeNameFieldNumber = 6;
- inline const ::std::string& type_name() const;
- inline void set_type_name(const ::std::string& value);
- inline void set_type_name(const char* value);
- inline void set_type_name(const char* value, size_t size);
- inline ::std::string* mutable_type_name();
- inline ::std::string* release_type_name();
- inline void set_allocated_type_name(::std::string* type_name);
+ const ::std::string& type_name() const;
+ void set_type_name(const ::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);
// optional string extendee = 2;
- inline bool has_extendee() const;
- inline void clear_extendee();
+ bool has_extendee() const;
+ void clear_extendee();
static const int kExtendeeFieldNumber = 2;
- inline const ::std::string& extendee() const;
- inline void set_extendee(const ::std::string& value);
- inline void set_extendee(const char* value);
- inline void set_extendee(const char* value, size_t size);
- inline ::std::string* mutable_extendee();
- inline ::std::string* release_extendee();
- inline void set_allocated_extendee(::std::string* extendee);
+ const ::std::string& extendee() const;
+ void set_extendee(const ::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);
// optional string default_value = 7;
- inline bool has_default_value() const;
- inline void clear_default_value();
+ bool has_default_value() const;
+ void clear_default_value();
static const int kDefaultValueFieldNumber = 7;
- inline const ::std::string& default_value() const;
- inline void set_default_value(const ::std::string& value);
- inline void set_default_value(const char* value);
- inline void set_default_value(const char* value, size_t size);
- inline ::std::string* mutable_default_value();
- inline ::std::string* release_default_value();
- inline void set_allocated_default_value(::std::string* default_value);
+ const ::std::string& default_value() const;
+ void set_default_value(const ::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);
// optional int32 oneof_index = 9;
- inline bool has_oneof_index() const;
- inline void clear_oneof_index();
+ bool has_oneof_index() const;
+ void clear_oneof_index();
static const int kOneofIndexFieldNumber = 9;
- inline ::google::protobuf::int32 oneof_index() const;
- inline void set_oneof_index(::google::protobuf::int32 value);
+ ::google::protobuf::int32 oneof_index() const;
+ void set_oneof_index(::google::protobuf::int32 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);
+ 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);
// optional .google.protobuf.FieldOptions options = 8;
- inline bool has_options() const;
- inline void clear_options();
+ bool has_options() const;
+ void clear_options();
static const int kOptionsFieldNumber = 8;
- inline const ::google::protobuf::FieldOptions& options() const;
- inline ::google::protobuf::FieldOptions* mutable_options();
- inline ::google::protobuf::FieldOptions* release_options();
- inline void set_allocated_options(::google::protobuf::FieldOptions* options);
+ const ::google::protobuf::FieldOptions& options() const;
+ ::google::protobuf::FieldOptions* mutable_options();
+ ::google::protobuf::FieldOptions* release_options();
+ void set_allocated_options(::google::protobuf::FieldOptions* options);
// @@protoc_insertion_point(class_scope:google.protobuf.FieldDescriptorProto)
private:
@@ -940,21 +1195,23 @@
inline void clear_has_default_value();
inline void set_has_oneof_index();
inline void clear_has_oneof_index();
+ inline void set_has_json_name();
+ inline void clear_has_json_name();
inline void set_has_options();
inline void clear_has_options();
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
- ::std::string* name_;
+ ::google::protobuf::internal::ArenaStringPtr name_;
::google::protobuf::int32 number_;
int label_;
- ::std::string* type_name_;
- ::std::string* extendee_;
+ ::google::protobuf::internal::ArenaStringPtr type_name_;
+ ::google::protobuf::internal::ArenaStringPtr extendee_;
int type_;
::google::protobuf::int32 oneof_index_;
- ::std::string* default_value_;
+ ::google::protobuf::internal::ArenaStringPtr default_value_;
+ ::google::protobuf::internal::ArenaStringPtr json_name_;
::google::protobuf::FieldOptions* options_;
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
@@ -978,11 +1235,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -992,7 +1249,9 @@
// implements Message ----------------------------------------------
- OneofDescriptorProto* New() const;
+ inline OneofDescriptorProto* New() const { return New(NULL); }
+
+ OneofDescriptorProto* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const OneofDescriptorProto& from);
@@ -1011,7 +1270,16 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(OneofDescriptorProto* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -1019,27 +1287,26 @@
// accessors -------------------------------------------------------
// optional string name = 1;
- inline bool has_name() const;
- inline void clear_name();
+ bool has_name() const;
+ void clear_name();
static const int kNameFieldNumber = 1;
- inline const ::std::string& name() const;
- inline void set_name(const ::std::string& value);
- inline void set_name(const char* value);
- inline void set_name(const char* value, size_t size);
- inline ::std::string* mutable_name();
- inline ::std::string* release_name();
- inline void set_allocated_name(::std::string* name);
+ const ::std::string& name() const;
+ void set_name(const ::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);
// @@protoc_insertion_point(class_scope:google.protobuf.OneofDescriptorProto)
private:
inline void set_has_name();
inline void clear_has_name();
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
- ::std::string* name_;
+ ::google::protobuf::internal::ArenaStringPtr name_;
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -1062,11 +1329,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -1076,7 +1343,9 @@
// implements Message ----------------------------------------------
- EnumDescriptorProto* New() const;
+ inline EnumDescriptorProto* New() const { return New(NULL); }
+
+ EnumDescriptorProto* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const EnumDescriptorProto& from);
@@ -1095,7 +1364,16 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(EnumDescriptorProto* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -1103,37 +1381,37 @@
// accessors -------------------------------------------------------
// optional string name = 1;
- inline bool has_name() const;
- inline void clear_name();
+ bool has_name() const;
+ void clear_name();
static const int kNameFieldNumber = 1;
- inline const ::std::string& name() const;
- inline void set_name(const ::std::string& value);
- inline void set_name(const char* value);
- inline void set_name(const char* value, size_t size);
- inline ::std::string* mutable_name();
- inline ::std::string* release_name();
- inline void set_allocated_name(::std::string* name);
+ const ::std::string& name() const;
+ void set_name(const ::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);
// repeated .google.protobuf.EnumValueDescriptorProto value = 2;
- inline int value_size() const;
- inline void clear_value();
+ int value_size() const;
+ void clear_value();
static const int kValueFieldNumber = 2;
- inline const ::google::protobuf::EnumValueDescriptorProto& value(int index) const;
- inline ::google::protobuf::EnumValueDescriptorProto* mutable_value(int index);
- inline ::google::protobuf::EnumValueDescriptorProto* add_value();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >&
- value() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >*
+ const ::google::protobuf::EnumValueDescriptorProto& value(int index) const;
+ ::google::protobuf::EnumValueDescriptorProto* mutable_value(int index);
+ ::google::protobuf::EnumValueDescriptorProto* add_value();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >*
mutable_value();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >&
+ value() const;
// optional .google.protobuf.EnumOptions options = 3;
- inline bool has_options() const;
- inline void clear_options();
+ bool has_options() const;
+ void clear_options();
static const int kOptionsFieldNumber = 3;
- inline const ::google::protobuf::EnumOptions& options() const;
- inline ::google::protobuf::EnumOptions* mutable_options();
- inline ::google::protobuf::EnumOptions* release_options();
- inline void set_allocated_options(::google::protobuf::EnumOptions* options);
+ const ::google::protobuf::EnumOptions& options() const;
+ ::google::protobuf::EnumOptions* mutable_options();
+ ::google::protobuf::EnumOptions* release_options();
+ void set_allocated_options(::google::protobuf::EnumOptions* options);
// @@protoc_insertion_point(class_scope:google.protobuf.EnumDescriptorProto)
private:
@@ -1142,11 +1420,10 @@
inline void set_has_options();
inline void clear_has_options();
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
- ::std::string* name_;
+ ::google::protobuf::internal::ArenaStringPtr name_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto > value_;
::google::protobuf::EnumOptions* options_;
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
@@ -1171,11 +1448,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -1185,7 +1462,9 @@
// implements Message ----------------------------------------------
- EnumValueDescriptorProto* New() const;
+ inline EnumValueDescriptorProto* New() const { return New(NULL); }
+
+ EnumValueDescriptorProto* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const EnumValueDescriptorProto& from);
@@ -1204,7 +1483,16 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(EnumValueDescriptorProto* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -1212,32 +1500,32 @@
// accessors -------------------------------------------------------
// optional string name = 1;
- inline bool has_name() const;
- inline void clear_name();
+ bool has_name() const;
+ void clear_name();
static const int kNameFieldNumber = 1;
- inline const ::std::string& name() const;
- inline void set_name(const ::std::string& value);
- inline void set_name(const char* value);
- inline void set_name(const char* value, size_t size);
- inline ::std::string* mutable_name();
- inline ::std::string* release_name();
- inline void set_allocated_name(::std::string* name);
+ const ::std::string& name() const;
+ void set_name(const ::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);
// optional int32 number = 2;
- inline bool has_number() const;
- inline void clear_number();
+ bool has_number() const;
+ void clear_number();
static const int kNumberFieldNumber = 2;
- inline ::google::protobuf::int32 number() const;
- inline void set_number(::google::protobuf::int32 value);
+ ::google::protobuf::int32 number() const;
+ void set_number(::google::protobuf::int32 value);
// optional .google.protobuf.EnumValueOptions options = 3;
- inline bool has_options() const;
- inline void clear_options();
+ bool has_options() const;
+ void clear_options();
static const int kOptionsFieldNumber = 3;
- inline const ::google::protobuf::EnumValueOptions& options() const;
- inline ::google::protobuf::EnumValueOptions* mutable_options();
- inline ::google::protobuf::EnumValueOptions* release_options();
- inline void set_allocated_options(::google::protobuf::EnumValueOptions* options);
+ const ::google::protobuf::EnumValueOptions& options() const;
+ ::google::protobuf::EnumValueOptions* mutable_options();
+ ::google::protobuf::EnumValueOptions* release_options();
+ void set_allocated_options(::google::protobuf::EnumValueOptions* options);
// @@protoc_insertion_point(class_scope:google.protobuf.EnumValueDescriptorProto)
private:
@@ -1248,11 +1536,10 @@
inline void set_has_options();
inline void clear_has_options();
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
- ::std::string* name_;
+ ::google::protobuf::internal::ArenaStringPtr name_;
::google::protobuf::EnumValueOptions* options_;
::google::protobuf::int32 number_;
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
@@ -1277,11 +1564,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -1291,7 +1578,9 @@
// implements Message ----------------------------------------------
- ServiceDescriptorProto* New() const;
+ inline ServiceDescriptorProto* New() const { return New(NULL); }
+
+ ServiceDescriptorProto* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const ServiceDescriptorProto& from);
@@ -1310,7 +1599,16 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(ServiceDescriptorProto* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -1318,37 +1616,37 @@
// accessors -------------------------------------------------------
// optional string name = 1;
- inline bool has_name() const;
- inline void clear_name();
+ bool has_name() const;
+ void clear_name();
static const int kNameFieldNumber = 1;
- inline const ::std::string& name() const;
- inline void set_name(const ::std::string& value);
- inline void set_name(const char* value);
- inline void set_name(const char* value, size_t size);
- inline ::std::string* mutable_name();
- inline ::std::string* release_name();
- inline void set_allocated_name(::std::string* name);
+ const ::std::string& name() const;
+ void set_name(const ::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);
// repeated .google.protobuf.MethodDescriptorProto method = 2;
- inline int method_size() const;
- inline void clear_method();
+ int method_size() const;
+ void clear_method();
static const int kMethodFieldNumber = 2;
- inline const ::google::protobuf::MethodDescriptorProto& method(int index) const;
- inline ::google::protobuf::MethodDescriptorProto* mutable_method(int index);
- inline ::google::protobuf::MethodDescriptorProto* add_method();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >&
- method() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >*
+ const ::google::protobuf::MethodDescriptorProto& method(int index) const;
+ ::google::protobuf::MethodDescriptorProto* mutable_method(int index);
+ ::google::protobuf::MethodDescriptorProto* add_method();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >*
mutable_method();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >&
+ method() const;
// optional .google.protobuf.ServiceOptions options = 3;
- inline bool has_options() const;
- inline void clear_options();
+ bool has_options() const;
+ void clear_options();
static const int kOptionsFieldNumber = 3;
- inline const ::google::protobuf::ServiceOptions& options() const;
- inline ::google::protobuf::ServiceOptions* mutable_options();
- inline ::google::protobuf::ServiceOptions* release_options();
- inline void set_allocated_options(::google::protobuf::ServiceOptions* options);
+ const ::google::protobuf::ServiceOptions& options() const;
+ ::google::protobuf::ServiceOptions* mutable_options();
+ ::google::protobuf::ServiceOptions* release_options();
+ void set_allocated_options(::google::protobuf::ServiceOptions* options);
// @@protoc_insertion_point(class_scope:google.protobuf.ServiceDescriptorProto)
private:
@@ -1357,11 +1655,10 @@
inline void set_has_options();
inline void clear_has_options();
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
- ::std::string* name_;
+ ::google::protobuf::internal::ArenaStringPtr name_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto > method_;
::google::protobuf::ServiceOptions* options_;
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
@@ -1386,11 +1683,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -1400,7 +1697,9 @@
// implements Message ----------------------------------------------
- MethodDescriptorProto* New() const;
+ inline MethodDescriptorProto* New() const { return New(NULL); }
+
+ MethodDescriptorProto* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const MethodDescriptorProto& from);
@@ -1419,7 +1718,16 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(MethodDescriptorProto* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -1427,49 +1735,63 @@
// accessors -------------------------------------------------------
// optional string name = 1;
- inline bool has_name() const;
- inline void clear_name();
+ bool has_name() const;
+ void clear_name();
static const int kNameFieldNumber = 1;
- inline const ::std::string& name() const;
- inline void set_name(const ::std::string& value);
- inline void set_name(const char* value);
- inline void set_name(const char* value, size_t size);
- inline ::std::string* mutable_name();
- inline ::std::string* release_name();
- inline void set_allocated_name(::std::string* name);
+ const ::std::string& name() const;
+ void set_name(const ::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);
// optional string input_type = 2;
- inline bool has_input_type() const;
- inline void clear_input_type();
+ bool has_input_type() const;
+ void clear_input_type();
static const int kInputTypeFieldNumber = 2;
- inline const ::std::string& input_type() const;
- inline void set_input_type(const ::std::string& value);
- inline void set_input_type(const char* value);
- inline void set_input_type(const char* value, size_t size);
- inline ::std::string* mutable_input_type();
- inline ::std::string* release_input_type();
- inline void set_allocated_input_type(::std::string* input_type);
+ const ::std::string& input_type() const;
+ void set_input_type(const ::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);
// optional string output_type = 3;
- inline bool has_output_type() const;
- inline void clear_output_type();
+ bool has_output_type() const;
+ void clear_output_type();
static const int kOutputTypeFieldNumber = 3;
- inline const ::std::string& output_type() const;
- inline void set_output_type(const ::std::string& value);
- inline void set_output_type(const char* value);
- inline void set_output_type(const char* value, size_t size);
- inline ::std::string* mutable_output_type();
- inline ::std::string* release_output_type();
- inline void set_allocated_output_type(::std::string* output_type);
+ const ::std::string& output_type() const;
+ void set_output_type(const ::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);
// optional .google.protobuf.MethodOptions options = 4;
- inline bool has_options() const;
- inline void clear_options();
+ bool has_options() const;
+ void clear_options();
static const int kOptionsFieldNumber = 4;
- inline const ::google::protobuf::MethodOptions& options() const;
- inline ::google::protobuf::MethodOptions* mutable_options();
- inline ::google::protobuf::MethodOptions* release_options();
- inline void set_allocated_options(::google::protobuf::MethodOptions* options);
+ const ::google::protobuf::MethodOptions& options() const;
+ ::google::protobuf::MethodOptions* mutable_options();
+ ::google::protobuf::MethodOptions* release_options();
+ void set_allocated_options(::google::protobuf::MethodOptions* options);
+
+ // optional bool client_streaming = 5 [default = false];
+ bool has_client_streaming() const;
+ void clear_client_streaming();
+ static const int kClientStreamingFieldNumber = 5;
+ bool client_streaming() const;
+ void set_client_streaming(bool value);
+
+ // optional bool server_streaming = 6 [default = false];
+ bool has_server_streaming() const;
+ void clear_server_streaming();
+ static const int kServerStreamingFieldNumber = 6;
+ bool server_streaming() const;
+ void set_server_streaming(bool value);
// @@protoc_insertion_point(class_scope:google.protobuf.MethodDescriptorProto)
private:
@@ -1481,15 +1803,20 @@
inline void clear_has_output_type();
inline void set_has_options();
inline void clear_has_options();
+ inline void set_has_client_streaming();
+ inline void clear_has_client_streaming();
+ inline void set_has_server_streaming();
+ inline void clear_has_server_streaming();
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
- ::std::string* name_;
- ::std::string* input_type_;
- ::std::string* output_type_;
+ ::google::protobuf::internal::ArenaStringPtr name_;
+ ::google::protobuf::internal::ArenaStringPtr input_type_;
+ ::google::protobuf::internal::ArenaStringPtr output_type_;
::google::protobuf::MethodOptions* options_;
+ bool client_streaming_;
+ bool server_streaming_;
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -1512,11 +1839,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -1526,7 +1853,9 @@
// implements Message ----------------------------------------------
- FileOptions* New() const;
+ inline FileOptions* New() const { return New(NULL); }
+
+ FileOptions* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const FileOptions& from);
@@ -1545,15 +1874,27 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(FileOptions* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
typedef FileOptions_OptimizeMode OptimizeMode;
- static const OptimizeMode SPEED = FileOptions_OptimizeMode_SPEED;
- static const OptimizeMode CODE_SIZE = FileOptions_OptimizeMode_CODE_SIZE;
- static const OptimizeMode LITE_RUNTIME = FileOptions_OptimizeMode_LITE_RUNTIME;
+ static const OptimizeMode SPEED =
+ FileOptions_OptimizeMode_SPEED;
+ static const OptimizeMode CODE_SIZE =
+ FileOptions_OptimizeMode_CODE_SIZE;
+ static const OptimizeMode LITE_RUNTIME =
+ FileOptions_OptimizeMode_LITE_RUNTIME;
static inline bool OptimizeMode_IsValid(int value) {
return FileOptions_OptimizeMode_IsValid(value);
}
@@ -1578,108 +1919,139 @@
// accessors -------------------------------------------------------
// optional string java_package = 1;
- inline bool has_java_package() const;
- inline void clear_java_package();
+ bool has_java_package() const;
+ void clear_java_package();
static const int kJavaPackageFieldNumber = 1;
- inline const ::std::string& java_package() const;
- inline void set_java_package(const ::std::string& value);
- inline void set_java_package(const char* value);
- inline void set_java_package(const char* value, size_t size);
- inline ::std::string* mutable_java_package();
- inline ::std::string* release_java_package();
- inline void set_allocated_java_package(::std::string* java_package);
+ const ::std::string& java_package() const;
+ void set_java_package(const ::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);
// optional string java_outer_classname = 8;
- inline bool has_java_outer_classname() const;
- inline void clear_java_outer_classname();
+ bool has_java_outer_classname() const;
+ void clear_java_outer_classname();
static const int kJavaOuterClassnameFieldNumber = 8;
- inline const ::std::string& java_outer_classname() const;
- inline void set_java_outer_classname(const ::std::string& value);
- inline void set_java_outer_classname(const char* value);
- inline void set_java_outer_classname(const char* value, size_t size);
- inline ::std::string* mutable_java_outer_classname();
- inline ::std::string* release_java_outer_classname();
- inline void set_allocated_java_outer_classname(::std::string* java_outer_classname);
+ const ::std::string& java_outer_classname() const;
+ void set_java_outer_classname(const ::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);
// optional bool java_multiple_files = 10 [default = false];
- inline bool has_java_multiple_files() const;
- inline void clear_java_multiple_files();
+ bool has_java_multiple_files() const;
+ void clear_java_multiple_files();
static const int kJavaMultipleFilesFieldNumber = 10;
- inline bool java_multiple_files() const;
- inline void set_java_multiple_files(bool value);
+ bool java_multiple_files() const;
+ void set_java_multiple_files(bool value);
// optional bool java_generate_equals_and_hash = 20 [default = false];
- inline bool has_java_generate_equals_and_hash() const;
- inline void clear_java_generate_equals_and_hash();
+ bool has_java_generate_equals_and_hash() const;
+ void clear_java_generate_equals_and_hash();
static const int kJavaGenerateEqualsAndHashFieldNumber = 20;
- inline bool java_generate_equals_and_hash() const;
- inline void set_java_generate_equals_and_hash(bool value);
+ bool java_generate_equals_and_hash() const;
+ void set_java_generate_equals_and_hash(bool value);
// optional bool java_string_check_utf8 = 27 [default = false];
- inline bool has_java_string_check_utf8() const;
- inline void clear_java_string_check_utf8();
+ bool has_java_string_check_utf8() const;
+ void clear_java_string_check_utf8();
static const int kJavaStringCheckUtf8FieldNumber = 27;
- inline bool java_string_check_utf8() const;
- inline void set_java_string_check_utf8(bool value);
+ bool java_string_check_utf8() const;
+ void set_java_string_check_utf8(bool value);
// optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
- inline bool has_optimize_for() const;
- inline void clear_optimize_for();
+ bool has_optimize_for() const;
+ void clear_optimize_for();
static const int kOptimizeForFieldNumber = 9;
- inline ::google::protobuf::FileOptions_OptimizeMode optimize_for() const;
- inline void set_optimize_for(::google::protobuf::FileOptions_OptimizeMode value);
+ ::google::protobuf::FileOptions_OptimizeMode optimize_for() const;
+ void set_optimize_for(::google::protobuf::FileOptions_OptimizeMode value);
// optional string go_package = 11;
- inline bool has_go_package() const;
- inline void clear_go_package();
+ bool has_go_package() const;
+ void clear_go_package();
static const int kGoPackageFieldNumber = 11;
- inline const ::std::string& go_package() const;
- inline void set_go_package(const ::std::string& value);
- inline void set_go_package(const char* value);
- inline void set_go_package(const char* value, size_t size);
- inline ::std::string* mutable_go_package();
- inline ::std::string* release_go_package();
- inline void set_allocated_go_package(::std::string* go_package);
+ const ::std::string& go_package() const;
+ void set_go_package(const ::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);
// optional bool cc_generic_services = 16 [default = false];
- inline bool has_cc_generic_services() const;
- inline void clear_cc_generic_services();
+ bool has_cc_generic_services() const;
+ void clear_cc_generic_services();
static const int kCcGenericServicesFieldNumber = 16;
- inline bool cc_generic_services() const;
- inline void set_cc_generic_services(bool value);
+ bool cc_generic_services() const;
+ void set_cc_generic_services(bool value);
// optional bool java_generic_services = 17 [default = false];
- inline bool has_java_generic_services() const;
- inline void clear_java_generic_services();
+ bool has_java_generic_services() const;
+ void clear_java_generic_services();
static const int kJavaGenericServicesFieldNumber = 17;
- inline bool java_generic_services() const;
- inline void set_java_generic_services(bool value);
+ bool java_generic_services() const;
+ void set_java_generic_services(bool value);
// optional bool py_generic_services = 18 [default = false];
- inline bool has_py_generic_services() const;
- inline void clear_py_generic_services();
+ bool has_py_generic_services() const;
+ void clear_py_generic_services();
static const int kPyGenericServicesFieldNumber = 18;
- inline bool py_generic_services() const;
- inline void set_py_generic_services(bool value);
+ bool py_generic_services() const;
+ void set_py_generic_services(bool value);
// optional bool deprecated = 23 [default = false];
- inline bool has_deprecated() const;
- inline void clear_deprecated();
+ bool has_deprecated() const;
+ void clear_deprecated();
static const int kDeprecatedFieldNumber = 23;
- inline bool deprecated() const;
- inline void set_deprecated(bool value);
+ bool deprecated() const;
+ void set_deprecated(bool value);
+
+ // optional bool cc_enable_arenas = 31 [default = false];
+ bool has_cc_enable_arenas() const;
+ void clear_cc_enable_arenas();
+ static const int kCcEnableArenasFieldNumber = 31;
+ bool cc_enable_arenas() const;
+ void set_cc_enable_arenas(bool value);
+
+ // 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);
+ 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);
+
+ // 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);
+ 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);
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- inline int uninterpreted_option_size() const;
- inline void clear_uninterpreted_option();
+ int uninterpreted_option_size() const;
+ void clear_uninterpreted_option();
static const int kUninterpretedOptionFieldNumber = 999;
- inline const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const;
- inline ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index);
- inline ::google::protobuf::UninterpretedOption* add_uninterpreted_option();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
- uninterpreted_option() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
+ const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const;
+ ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index);
+ ::google::protobuf::UninterpretedOption* add_uninterpreted_option();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
mutable_uninterpreted_option();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
+ uninterpreted_option() const;
GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(FileOptions)
// @@protoc_insertion_point(class_scope:google.protobuf.FileOptions)
@@ -1706,25 +2078,33 @@
inline void clear_has_py_generic_services();
inline void set_has_deprecated();
inline void clear_has_deprecated();
+ inline void set_has_cc_enable_arenas();
+ inline void clear_has_cc_enable_arenas();
+ inline void set_has_objc_class_prefix();
+ inline void clear_has_objc_class_prefix();
+ inline void set_has_csharp_namespace();
+ inline void clear_has_csharp_namespace();
::google::protobuf::internal::ExtensionSet _extensions_;
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
- ::std::string* java_package_;
- ::std::string* java_outer_classname_;
+ ::google::protobuf::internal::ArenaStringPtr java_package_;
+ ::google::protobuf::internal::ArenaStringPtr java_outer_classname_;
bool java_multiple_files_;
bool java_generate_equals_and_hash_;
bool java_string_check_utf8_;
bool cc_generic_services_;
int optimize_for_;
- ::std::string* go_package_;
+ ::google::protobuf::internal::ArenaStringPtr go_package_;
+ ::google::protobuf::internal::ArenaStringPtr objc_class_prefix_;
+ ::google::protobuf::internal::ArenaStringPtr csharp_namespace_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_;
bool java_generic_services_;
bool py_generic_services_;
bool deprecated_;
+ bool cc_enable_arenas_;
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -1747,11 +2127,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -1761,7 +2141,9 @@
// implements Message ----------------------------------------------
- MessageOptions* New() const;
+ inline MessageOptions* New() const { return New(NULL); }
+
+ MessageOptions* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const MessageOptions& from);
@@ -1780,7 +2162,16 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(MessageOptions* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -1788,37 +2179,44 @@
// accessors -------------------------------------------------------
// optional bool message_set_wire_format = 1 [default = false];
- inline bool has_message_set_wire_format() const;
- inline void clear_message_set_wire_format();
+ bool has_message_set_wire_format() const;
+ void clear_message_set_wire_format();
static const int kMessageSetWireFormatFieldNumber = 1;
- inline bool message_set_wire_format() const;
- inline void set_message_set_wire_format(bool value);
+ bool message_set_wire_format() const;
+ void set_message_set_wire_format(bool value);
// optional bool no_standard_descriptor_accessor = 2 [default = false];
- inline bool has_no_standard_descriptor_accessor() const;
- inline void clear_no_standard_descriptor_accessor();
+ bool has_no_standard_descriptor_accessor() const;
+ void clear_no_standard_descriptor_accessor();
static const int kNoStandardDescriptorAccessorFieldNumber = 2;
- inline bool no_standard_descriptor_accessor() const;
- inline void set_no_standard_descriptor_accessor(bool value);
+ bool no_standard_descriptor_accessor() const;
+ void set_no_standard_descriptor_accessor(bool value);
// optional bool deprecated = 3 [default = false];
- inline bool has_deprecated() const;
- inline void clear_deprecated();
+ bool has_deprecated() const;
+ void clear_deprecated();
static const int kDeprecatedFieldNumber = 3;
- inline bool deprecated() const;
- inline void set_deprecated(bool value);
+ bool deprecated() const;
+ void set_deprecated(bool value);
+
+ // optional bool map_entry = 7;
+ bool has_map_entry() const;
+ void clear_map_entry();
+ static const int kMapEntryFieldNumber = 7;
+ bool map_entry() const;
+ void set_map_entry(bool value);
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- inline int uninterpreted_option_size() const;
- inline void clear_uninterpreted_option();
+ int uninterpreted_option_size() const;
+ void clear_uninterpreted_option();
static const int kUninterpretedOptionFieldNumber = 999;
- inline const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const;
- inline ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index);
- inline ::google::protobuf::UninterpretedOption* add_uninterpreted_option();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
- uninterpreted_option() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
+ const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const;
+ ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index);
+ ::google::protobuf::UninterpretedOption* add_uninterpreted_option();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
mutable_uninterpreted_option();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
+ uninterpreted_option() const;
GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(MessageOptions)
// @@protoc_insertion_point(class_scope:google.protobuf.MessageOptions)
@@ -1829,17 +2227,19 @@
inline void clear_has_no_standard_descriptor_accessor();
inline void set_has_deprecated();
inline void clear_has_deprecated();
+ inline void set_has_map_entry();
+ inline void clear_has_map_entry();
::google::protobuf::internal::ExtensionSet _extensions_;
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_;
bool message_set_wire_format_;
bool no_standard_descriptor_accessor_;
bool deprecated_;
+ bool map_entry_;
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -1862,11 +2262,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -1876,7 +2276,9 @@
// implements Message ----------------------------------------------
- FieldOptions* New() const;
+ inline FieldOptions* New() const { return New(NULL); }
+
+ FieldOptions* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const FieldOptions& from);
@@ -1895,15 +2297,27 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(FieldOptions* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
typedef FieldOptions_CType CType;
- static const CType STRING = FieldOptions_CType_STRING;
- static const CType CORD = FieldOptions_CType_CORD;
- static const CType STRING_PIECE = FieldOptions_CType_STRING_PIECE;
+ static const CType STRING =
+ FieldOptions_CType_STRING;
+ static const CType CORD =
+ FieldOptions_CType_CORD;
+ static const CType STRING_PIECE =
+ FieldOptions_CType_STRING_PIECE;
static inline bool CType_IsValid(int value) {
return FieldOptions_CType_IsValid(value);
}
@@ -1925,66 +2339,89 @@
return FieldOptions_CType_Parse(name, value);
}
+ typedef FieldOptions_JSType JSType;
+ static const JSType JS_NORMAL =
+ FieldOptions_JSType_JS_NORMAL;
+ static const JSType JS_STRING =
+ FieldOptions_JSType_JS_STRING;
+ static const JSType JS_NUMBER =
+ FieldOptions_JSType_JS_NUMBER;
+ static inline bool JSType_IsValid(int value) {
+ return FieldOptions_JSType_IsValid(value);
+ }
+ static const JSType JSType_MIN =
+ FieldOptions_JSType_JSType_MIN;
+ static const JSType JSType_MAX =
+ FieldOptions_JSType_JSType_MAX;
+ static const int JSType_ARRAYSIZE =
+ FieldOptions_JSType_JSType_ARRAYSIZE;
+ static inline const ::google::protobuf::EnumDescriptor*
+ JSType_descriptor() {
+ return FieldOptions_JSType_descriptor();
+ }
+ static inline const ::std::string& JSType_Name(JSType value) {
+ return FieldOptions_JSType_Name(value);
+ }
+ static inline bool JSType_Parse(const ::std::string& name,
+ JSType* value) {
+ return FieldOptions_JSType_Parse(name, value);
+ }
+
// accessors -------------------------------------------------------
// optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
- inline bool has_ctype() const;
- inline void clear_ctype();
+ bool has_ctype() const;
+ void clear_ctype();
static const int kCtypeFieldNumber = 1;
- inline ::google::protobuf::FieldOptions_CType ctype() const;
- inline void set_ctype(::google::protobuf::FieldOptions_CType value);
+ ::google::protobuf::FieldOptions_CType ctype() const;
+ void set_ctype(::google::protobuf::FieldOptions_CType value);
// optional bool packed = 2;
- inline bool has_packed() const;
- inline void clear_packed();
+ bool has_packed() const;
+ void clear_packed();
static const int kPackedFieldNumber = 2;
- inline bool packed() const;
- inline void set_packed(bool value);
+ bool packed() const;
+ void set_packed(bool value);
+
+ // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
+ 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);
// optional bool lazy = 5 [default = false];
- inline bool has_lazy() const;
- inline void clear_lazy();
+ bool has_lazy() const;
+ void clear_lazy();
static const int kLazyFieldNumber = 5;
- inline bool lazy() const;
- inline void set_lazy(bool value);
+ bool lazy() const;
+ void set_lazy(bool value);
// optional bool deprecated = 3 [default = false];
- inline bool has_deprecated() const;
- inline void clear_deprecated();
+ bool has_deprecated() const;
+ void clear_deprecated();
static const int kDeprecatedFieldNumber = 3;
- inline bool deprecated() const;
- inline void set_deprecated(bool value);
-
- // optional string experimental_map_key = 9;
- inline bool has_experimental_map_key() const;
- inline void clear_experimental_map_key();
- static const int kExperimentalMapKeyFieldNumber = 9;
- inline const ::std::string& experimental_map_key() const;
- inline void set_experimental_map_key(const ::std::string& value);
- inline void set_experimental_map_key(const char* value);
- inline void set_experimental_map_key(const char* value, size_t size);
- inline ::std::string* mutable_experimental_map_key();
- inline ::std::string* release_experimental_map_key();
- inline void set_allocated_experimental_map_key(::std::string* experimental_map_key);
+ bool deprecated() const;
+ void set_deprecated(bool value);
// optional bool weak = 10 [default = false];
- inline bool has_weak() const;
- inline void clear_weak();
+ bool has_weak() const;
+ void clear_weak();
static const int kWeakFieldNumber = 10;
- inline bool weak() const;
- inline void set_weak(bool value);
+ bool weak() const;
+ void set_weak(bool value);
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- inline int uninterpreted_option_size() const;
- inline void clear_uninterpreted_option();
+ int uninterpreted_option_size() const;
+ void clear_uninterpreted_option();
static const int kUninterpretedOptionFieldNumber = 999;
- inline const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const;
- inline ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index);
- inline ::google::protobuf::UninterpretedOption* add_uninterpreted_option();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
- uninterpreted_option() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
+ const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const;
+ ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index);
+ ::google::protobuf::UninterpretedOption* add_uninterpreted_option();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
mutable_uninterpreted_option();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
+ uninterpreted_option() const;
GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(FieldOptions)
// @@protoc_insertion_point(class_scope:google.protobuf.FieldOptions)
@@ -1993,28 +2430,27 @@
inline void clear_has_ctype();
inline void set_has_packed();
inline void clear_has_packed();
+ inline void set_has_jstype();
+ inline void clear_has_jstype();
inline void set_has_lazy();
inline void clear_has_lazy();
inline void set_has_deprecated();
inline void clear_has_deprecated();
- inline void set_has_experimental_map_key();
- inline void clear_has_experimental_map_key();
inline void set_has_weak();
inline void clear_has_weak();
::google::protobuf::internal::ExtensionSet _extensions_;
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
int ctype_;
+ int jstype_;
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_;
bool packed_;
bool lazy_;
bool deprecated_;
bool weak_;
- ::std::string* experimental_map_key_;
- ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_;
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -2037,11 +2473,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -2051,7 +2487,9 @@
// implements Message ----------------------------------------------
- EnumOptions* New() const;
+ inline EnumOptions* New() const { return New(NULL); }
+
+ EnumOptions* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const EnumOptions& from);
@@ -2070,7 +2508,16 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(EnumOptions* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -2078,30 +2525,30 @@
// accessors -------------------------------------------------------
// optional bool allow_alias = 2;
- inline bool has_allow_alias() const;
- inline void clear_allow_alias();
+ bool has_allow_alias() const;
+ void clear_allow_alias();
static const int kAllowAliasFieldNumber = 2;
- inline bool allow_alias() const;
- inline void set_allow_alias(bool value);
+ bool allow_alias() const;
+ void set_allow_alias(bool value);
// optional bool deprecated = 3 [default = false];
- inline bool has_deprecated() const;
- inline void clear_deprecated();
+ bool has_deprecated() const;
+ void clear_deprecated();
static const int kDeprecatedFieldNumber = 3;
- inline bool deprecated() const;
- inline void set_deprecated(bool value);
+ bool deprecated() const;
+ void set_deprecated(bool value);
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- inline int uninterpreted_option_size() const;
- inline void clear_uninterpreted_option();
+ int uninterpreted_option_size() const;
+ void clear_uninterpreted_option();
static const int kUninterpretedOptionFieldNumber = 999;
- inline const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const;
- inline ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index);
- inline ::google::protobuf::UninterpretedOption* add_uninterpreted_option();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
- uninterpreted_option() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
+ const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const;
+ ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index);
+ ::google::protobuf::UninterpretedOption* add_uninterpreted_option();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
mutable_uninterpreted_option();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
+ uninterpreted_option() const;
GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(EnumOptions)
// @@protoc_insertion_point(class_scope:google.protobuf.EnumOptions)
@@ -2113,8 +2560,7 @@
::google::protobuf::internal::ExtensionSet _extensions_;
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_;
@@ -2142,11 +2588,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -2156,7 +2602,9 @@
// implements Message ----------------------------------------------
- EnumValueOptions* New() const;
+ inline EnumValueOptions* New() const { return New(NULL); }
+
+ EnumValueOptions* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const EnumValueOptions& from);
@@ -2175,7 +2623,16 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(EnumValueOptions* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -2183,23 +2640,23 @@
// accessors -------------------------------------------------------
// optional bool deprecated = 1 [default = false];
- inline bool has_deprecated() const;
- inline void clear_deprecated();
+ bool has_deprecated() const;
+ void clear_deprecated();
static const int kDeprecatedFieldNumber = 1;
- inline bool deprecated() const;
- inline void set_deprecated(bool value);
+ bool deprecated() const;
+ void set_deprecated(bool value);
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- inline int uninterpreted_option_size() const;
- inline void clear_uninterpreted_option();
+ int uninterpreted_option_size() const;
+ void clear_uninterpreted_option();
static const int kUninterpretedOptionFieldNumber = 999;
- inline const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const;
- inline ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index);
- inline ::google::protobuf::UninterpretedOption* add_uninterpreted_option();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
- uninterpreted_option() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
+ const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const;
+ ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index);
+ ::google::protobuf::UninterpretedOption* add_uninterpreted_option();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
mutable_uninterpreted_option();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
+ uninterpreted_option() const;
GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(EnumValueOptions)
// @@protoc_insertion_point(class_scope:google.protobuf.EnumValueOptions)
@@ -2209,8 +2666,7 @@
::google::protobuf::internal::ExtensionSet _extensions_;
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_;
@@ -2237,11 +2693,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -2251,7 +2707,9 @@
// implements Message ----------------------------------------------
- ServiceOptions* New() const;
+ inline ServiceOptions* New() const { return New(NULL); }
+
+ ServiceOptions* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const ServiceOptions& from);
@@ -2270,7 +2728,16 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(ServiceOptions* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -2278,23 +2745,23 @@
// accessors -------------------------------------------------------
// optional bool deprecated = 33 [default = false];
- inline bool has_deprecated() const;
- inline void clear_deprecated();
+ bool has_deprecated() const;
+ void clear_deprecated();
static const int kDeprecatedFieldNumber = 33;
- inline bool deprecated() const;
- inline void set_deprecated(bool value);
+ bool deprecated() const;
+ void set_deprecated(bool value);
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- inline int uninterpreted_option_size() const;
- inline void clear_uninterpreted_option();
+ int uninterpreted_option_size() const;
+ void clear_uninterpreted_option();
static const int kUninterpretedOptionFieldNumber = 999;
- inline const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const;
- inline ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index);
- inline ::google::protobuf::UninterpretedOption* add_uninterpreted_option();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
- uninterpreted_option() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
+ const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const;
+ ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index);
+ ::google::protobuf::UninterpretedOption* add_uninterpreted_option();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
mutable_uninterpreted_option();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
+ uninterpreted_option() const;
GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(ServiceOptions)
// @@protoc_insertion_point(class_scope:google.protobuf.ServiceOptions)
@@ -2304,8 +2771,7 @@
::google::protobuf::internal::ExtensionSet _extensions_;
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_;
@@ -2332,11 +2798,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -2346,7 +2812,9 @@
// implements Message ----------------------------------------------
- MethodOptions* New() const;
+ inline MethodOptions* New() const { return New(NULL); }
+
+ MethodOptions* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const MethodOptions& from);
@@ -2365,7 +2833,16 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(MethodOptions* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -2373,23 +2850,23 @@
// accessors -------------------------------------------------------
// optional bool deprecated = 33 [default = false];
- inline bool has_deprecated() const;
- inline void clear_deprecated();
+ bool has_deprecated() const;
+ void clear_deprecated();
static const int kDeprecatedFieldNumber = 33;
- inline bool deprecated() const;
- inline void set_deprecated(bool value);
+ bool deprecated() const;
+ void set_deprecated(bool value);
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- inline int uninterpreted_option_size() const;
- inline void clear_uninterpreted_option();
+ int uninterpreted_option_size() const;
+ void clear_uninterpreted_option();
static const int kUninterpretedOptionFieldNumber = 999;
- inline const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const;
- inline ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index);
- inline ::google::protobuf::UninterpretedOption* add_uninterpreted_option();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
- uninterpreted_option() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
+ const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const;
+ ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index);
+ ::google::protobuf::UninterpretedOption* add_uninterpreted_option();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
mutable_uninterpreted_option();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
+ uninterpreted_option() const;
GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(MethodOptions)
// @@protoc_insertion_point(class_scope:google.protobuf.MethodOptions)
@@ -2399,8 +2876,7 @@
::google::protobuf::internal::ExtensionSet _extensions_;
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_;
@@ -2427,11 +2903,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -2441,7 +2917,9 @@
// implements Message ----------------------------------------------
- UninterpretedOption_NamePart* New() const;
+ inline UninterpretedOption_NamePart* New() const { return New(NULL); }
+
+ UninterpretedOption_NamePart* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const UninterpretedOption_NamePart& from);
@@ -2460,7 +2938,16 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(UninterpretedOption_NamePart* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -2468,23 +2955,23 @@
// accessors -------------------------------------------------------
// required string name_part = 1;
- inline bool has_name_part() const;
- inline void clear_name_part();
+ bool has_name_part() const;
+ void clear_name_part();
static const int kNamePartFieldNumber = 1;
- inline const ::std::string& name_part() const;
- inline void set_name_part(const ::std::string& value);
- inline void set_name_part(const char* value);
- inline void set_name_part(const char* value, size_t size);
- inline ::std::string* mutable_name_part();
- inline ::std::string* release_name_part();
- inline void set_allocated_name_part(::std::string* name_part);
+ const ::std::string& name_part() const;
+ void set_name_part(const ::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);
// required bool is_extension = 2;
- inline bool has_is_extension() const;
- inline void clear_is_extension();
+ bool has_is_extension() const;
+ void clear_is_extension();
static const int kIsExtensionFieldNumber = 2;
- inline bool is_extension() const;
- inline void set_is_extension(bool value);
+ bool is_extension() const;
+ void set_is_extension(bool value);
// @@protoc_insertion_point(class_scope:google.protobuf.UninterpretedOption.NamePart)
private:
@@ -2493,11 +2980,13 @@
inline void set_has_is_extension();
inline void clear_has_is_extension();
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
+ // helper for ByteSize()
+ int RequiredFieldsByteSizeFallback() const;
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
- ::std::string* name_part_;
+ ::google::protobuf::internal::ArenaStringPtr name_part_;
bool is_extension_;
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
@@ -2521,11 +3010,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -2535,7 +3024,9 @@
// implements Message ----------------------------------------------
- UninterpretedOption* New() const;
+ inline UninterpretedOption* New() const { return New(NULL); }
+
+ UninterpretedOption* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const UninterpretedOption& from);
@@ -2554,7 +3045,16 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(UninterpretedOption* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -2564,73 +3064,73 @@
// accessors -------------------------------------------------------
// repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
- inline int name_size() const;
- inline void clear_name();
+ int name_size() const;
+ void clear_name();
static const int kNameFieldNumber = 2;
- inline const ::google::protobuf::UninterpretedOption_NamePart& name(int index) const;
- inline ::google::protobuf::UninterpretedOption_NamePart* mutable_name(int index);
- inline ::google::protobuf::UninterpretedOption_NamePart* add_name();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >&
- name() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >*
+ const ::google::protobuf::UninterpretedOption_NamePart& name(int index) const;
+ ::google::protobuf::UninterpretedOption_NamePart* mutable_name(int index);
+ ::google::protobuf::UninterpretedOption_NamePart* add_name();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >*
mutable_name();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >&
+ name() const;
// optional string identifier_value = 3;
- inline bool has_identifier_value() const;
- inline void clear_identifier_value();
+ bool has_identifier_value() const;
+ void clear_identifier_value();
static const int kIdentifierValueFieldNumber = 3;
- inline const ::std::string& identifier_value() const;
- inline void set_identifier_value(const ::std::string& value);
- inline void set_identifier_value(const char* value);
- inline void set_identifier_value(const char* value, size_t size);
- inline ::std::string* mutable_identifier_value();
- inline ::std::string* release_identifier_value();
- inline void set_allocated_identifier_value(::std::string* identifier_value);
+ const ::std::string& identifier_value() const;
+ void set_identifier_value(const ::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);
// optional uint64 positive_int_value = 4;
- inline bool has_positive_int_value() const;
- inline void clear_positive_int_value();
+ bool has_positive_int_value() const;
+ void clear_positive_int_value();
static const int kPositiveIntValueFieldNumber = 4;
- inline ::google::protobuf::uint64 positive_int_value() const;
- inline void set_positive_int_value(::google::protobuf::uint64 value);
+ ::google::protobuf::uint64 positive_int_value() const;
+ void set_positive_int_value(::google::protobuf::uint64 value);
// optional int64 negative_int_value = 5;
- inline bool has_negative_int_value() const;
- inline void clear_negative_int_value();
+ bool has_negative_int_value() const;
+ void clear_negative_int_value();
static const int kNegativeIntValueFieldNumber = 5;
- inline ::google::protobuf::int64 negative_int_value() const;
- inline void set_negative_int_value(::google::protobuf::int64 value);
+ ::google::protobuf::int64 negative_int_value() const;
+ void set_negative_int_value(::google::protobuf::int64 value);
// optional double double_value = 6;
- inline bool has_double_value() const;
- inline void clear_double_value();
+ bool has_double_value() const;
+ void clear_double_value();
static const int kDoubleValueFieldNumber = 6;
- inline double double_value() const;
- inline void set_double_value(double value);
+ double double_value() const;
+ void set_double_value(double value);
// optional bytes string_value = 7;
- inline bool has_string_value() const;
- inline void clear_string_value();
+ bool has_string_value() const;
+ void clear_string_value();
static const int kStringValueFieldNumber = 7;
- inline const ::std::string& string_value() const;
- inline void set_string_value(const ::std::string& value);
- inline void set_string_value(const char* value);
- inline void set_string_value(const void* value, size_t size);
- inline ::std::string* mutable_string_value();
- inline ::std::string* release_string_value();
- inline void set_allocated_string_value(::std::string* string_value);
+ const ::std::string& string_value() const;
+ void set_string_value(const ::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);
// optional string aggregate_value = 8;
- inline bool has_aggregate_value() const;
- inline void clear_aggregate_value();
+ bool has_aggregate_value() const;
+ void clear_aggregate_value();
static const int kAggregateValueFieldNumber = 8;
- inline const ::std::string& aggregate_value() const;
- inline void set_aggregate_value(const ::std::string& value);
- inline void set_aggregate_value(const char* value);
- inline void set_aggregate_value(const char* value, size_t size);
- inline ::std::string* mutable_aggregate_value();
- inline ::std::string* release_aggregate_value();
- inline void set_allocated_aggregate_value(::std::string* aggregate_value);
+ const ::std::string& aggregate_value() const;
+ void set_aggregate_value(const ::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);
// @@protoc_insertion_point(class_scope:google.protobuf.UninterpretedOption)
private:
@@ -2647,17 +3147,16 @@
inline void set_has_aggregate_value();
inline void clear_has_aggregate_value();
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart > name_;
- ::std::string* identifier_value_;
+ ::google::protobuf::internal::ArenaStringPtr identifier_value_;
::google::protobuf::uint64 positive_int_value_;
::google::protobuf::int64 negative_int_value_;
double double_value_;
- ::std::string* string_value_;
- ::std::string* aggregate_value_;
+ ::google::protobuf::internal::ArenaStringPtr string_value_;
+ ::google::protobuf::internal::ArenaStringPtr aggregate_value_;
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -2680,11 +3179,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -2694,7 +3193,9 @@
// implements Message ----------------------------------------------
- SourceCodeInfo_Location* New() const;
+ inline SourceCodeInfo_Location* New() const { return New(NULL); }
+
+ SourceCodeInfo_Location* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const SourceCodeInfo_Location& from);
@@ -2713,7 +3214,16 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(SourceCodeInfo_Location* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -2721,52 +3231,68 @@
// accessors -------------------------------------------------------
// repeated int32 path = 1 [packed = true];
- inline int path_size() const;
- inline void clear_path();
+ int path_size() const;
+ void clear_path();
static const int kPathFieldNumber = 1;
- inline ::google::protobuf::int32 path(int index) const;
- inline void set_path(int index, ::google::protobuf::int32 value);
- inline void add_path(::google::protobuf::int32 value);
- inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
+ ::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 >&
path() const;
- inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
+ ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
mutable_path();
// repeated int32 span = 2 [packed = true];
- inline int span_size() const;
- inline void clear_span();
+ int span_size() const;
+ void clear_span();
static const int kSpanFieldNumber = 2;
- inline ::google::protobuf::int32 span(int index) const;
- inline void set_span(int index, ::google::protobuf::int32 value);
- inline void add_span(::google::protobuf::int32 value);
- inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
+ ::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 >&
span() const;
- inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
+ ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
mutable_span();
// optional string leading_comments = 3;
- inline bool has_leading_comments() const;
- inline void clear_leading_comments();
+ bool has_leading_comments() const;
+ void clear_leading_comments();
static const int kLeadingCommentsFieldNumber = 3;
- inline const ::std::string& leading_comments() const;
- inline void set_leading_comments(const ::std::string& value);
- inline void set_leading_comments(const char* value);
- inline void set_leading_comments(const char* value, size_t size);
- inline ::std::string* mutable_leading_comments();
- inline ::std::string* release_leading_comments();
- inline void set_allocated_leading_comments(::std::string* leading_comments);
+ const ::std::string& leading_comments() const;
+ void set_leading_comments(const ::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);
// optional string trailing_comments = 4;
- inline bool has_trailing_comments() const;
- inline void clear_trailing_comments();
+ bool has_trailing_comments() const;
+ void clear_trailing_comments();
static const int kTrailingCommentsFieldNumber = 4;
- inline const ::std::string& trailing_comments() const;
- inline void set_trailing_comments(const ::std::string& value);
- inline void set_trailing_comments(const char* value);
- inline void set_trailing_comments(const char* value, size_t size);
- inline ::std::string* mutable_trailing_comments();
- inline ::std::string* release_trailing_comments();
- inline void set_allocated_trailing_comments(::std::string* trailing_comments);
+ const ::std::string& trailing_comments() const;
+ void set_trailing_comments(const ::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);
+
+ // 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);
+ 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);
+ 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();
// @@protoc_insertion_point(class_scope:google.protobuf.SourceCodeInfo.Location)
private:
@@ -2775,16 +3301,16 @@
inline void set_has_trailing_comments();
inline void clear_has_trailing_comments();
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
::google::protobuf::RepeatedField< ::google::protobuf::int32 > path_;
mutable int _path_cached_byte_size_;
::google::protobuf::RepeatedField< ::google::protobuf::int32 > span_;
mutable int _span_cached_byte_size_;
- ::std::string* leading_comments_;
- ::std::string* trailing_comments_;
+ ::google::protobuf::internal::ArenaStringPtr leading_comments_;
+ ::google::protobuf::internal::ArenaStringPtr trailing_comments_;
+ ::google::protobuf::RepeatedPtrField< ::std::string> leading_detached_comments_;
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -2807,11 +3333,11 @@
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
+ return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
+ return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
@@ -2821,7 +3347,9 @@
// implements Message ----------------------------------------------
- SourceCodeInfo* New() const;
+ inline SourceCodeInfo* New() const { return New(NULL); }
+
+ SourceCodeInfo* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const SourceCodeInfo& from);
@@ -2840,7 +3368,16 @@
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
+ void InternalSwap(SourceCodeInfo* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -2850,22 +3387,21 @@
// accessors -------------------------------------------------------
// repeated .google.protobuf.SourceCodeInfo.Location location = 1;
- inline int location_size() const;
- inline void clear_location();
+ int location_size() const;
+ void clear_location();
static const int kLocationFieldNumber = 1;
- inline const ::google::protobuf::SourceCodeInfo_Location& location(int index) const;
- inline ::google::protobuf::SourceCodeInfo_Location* mutable_location(int index);
- inline ::google::protobuf::SourceCodeInfo_Location* add_location();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >&
- location() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >*
+ const ::google::protobuf::SourceCodeInfo_Location& location(int index) const;
+ ::google::protobuf::SourceCodeInfo_Location* mutable_location(int index);
+ ::google::protobuf::SourceCodeInfo_Location* add_location();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >*
mutable_location();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >&
+ location() const;
// @@protoc_insertion_point(class_scope:google.protobuf.SourceCodeInfo)
private:
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location > location_;
@@ -2876,11 +3412,234 @@
void InitAsDefaultInstance();
static SourceCodeInfo* default_instance_;
};
+// -------------------------------------------------------------------
+
+class LIBPROTOBUF_EXPORT GeneratedCodeInfo_Annotation : public ::google::protobuf::Message {
+ public:
+ GeneratedCodeInfo_Annotation();
+ virtual ~GeneratedCodeInfo_Annotation();
+
+ GeneratedCodeInfo_Annotation(const GeneratedCodeInfo_Annotation& from);
+
+ inline GeneratedCodeInfo_Annotation& operator=(const GeneratedCodeInfo_Annotation& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+ return _internal_metadata_.unknown_fields();
+ }
+
+ inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+ return _internal_metadata_.mutable_unknown_fields();
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const GeneratedCodeInfo_Annotation& default_instance();
+
+ void Swap(GeneratedCodeInfo_Annotation* other);
+
+ // implements Message ----------------------------------------------
+
+ inline GeneratedCodeInfo_Annotation* New() const { return New(NULL); }
+
+ GeneratedCodeInfo_Annotation* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const GeneratedCodeInfo_Annotation& from);
+ void MergeFrom(const GeneratedCodeInfo_Annotation& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(GeneratedCodeInfo_Annotation* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // repeated int32 path = 1 [packed = true];
+ 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 >&
+ path() const;
+ ::google::protobuf::RepeatedField< ::google::protobuf::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);
+ 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);
+
+ // 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);
+
+ // 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);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.GeneratedCodeInfo.Annotation)
+ private:
+ inline void set_has_source_file();
+ inline void clear_has_source_file();
+ inline void set_has_begin();
+ inline void clear_has_begin();
+ inline void set_has_end();
+ inline void clear_has_end();
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ ::google::protobuf::uint32 _has_bits_[1];
+ mutable int _cached_size_;
+ ::google::protobuf::RepeatedField< ::google::protobuf::int32 > path_;
+ mutable int _path_cached_byte_size_;
+ ::google::protobuf::internal::ArenaStringPtr source_file_;
+ ::google::protobuf::int32 begin_;
+ ::google::protobuf::int32 end_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
+
+ void InitAsDefaultInstance();
+ static GeneratedCodeInfo_Annotation* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class LIBPROTOBUF_EXPORT GeneratedCodeInfo : public ::google::protobuf::Message {
+ public:
+ GeneratedCodeInfo();
+ virtual ~GeneratedCodeInfo();
+
+ GeneratedCodeInfo(const GeneratedCodeInfo& from);
+
+ inline GeneratedCodeInfo& operator=(const GeneratedCodeInfo& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+ return _internal_metadata_.unknown_fields();
+ }
+
+ inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+ return _internal_metadata_.mutable_unknown_fields();
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const GeneratedCodeInfo& default_instance();
+
+ void Swap(GeneratedCodeInfo* other);
+
+ // implements Message ----------------------------------------------
+
+ inline GeneratedCodeInfo* New() const { return New(NULL); }
+
+ GeneratedCodeInfo* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const GeneratedCodeInfo& from);
+ void MergeFrom(const GeneratedCodeInfo& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(GeneratedCodeInfo* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ typedef GeneratedCodeInfo_Annotation Annotation;
+
+ // accessors -------------------------------------------------------
+
+ // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
+ int annotation_size() const;
+ void clear_annotation();
+ static const int kAnnotationFieldNumber = 1;
+ const ::google::protobuf::GeneratedCodeInfo_Annotation& annotation(int index) const;
+ ::google::protobuf::GeneratedCodeInfo_Annotation* mutable_annotation(int index);
+ ::google::protobuf::GeneratedCodeInfo_Annotation* add_annotation();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::GeneratedCodeInfo_Annotation >*
+ mutable_annotation();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::GeneratedCodeInfo_Annotation >&
+ annotation() const;
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.GeneratedCodeInfo)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ ::google::protobuf::uint32 _has_bits_[1];
+ mutable int _cached_size_;
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::GeneratedCodeInfo_Annotation > annotation_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
+
+ void InitAsDefaultInstance();
+ static GeneratedCodeInfo* default_instance_;
+};
// ===================================================================
// ===================================================================
+#if !PROTOBUF_INLINE_NOT_IN_HEADERS
// FileDescriptorSet
// repeated .google.protobuf.FileDescriptorProto file = 1;
@@ -2902,16 +3661,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorSet.file)
return file_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >&
-FileDescriptorSet::file() const {
- // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorSet.file)
- return file_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >*
FileDescriptorSet::mutable_file() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorSet.file)
return &file_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >&
+FileDescriptorSet::file() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorSet.file)
+ return file_;
+}
// -------------------------------------------------------------------
@@ -2928,68 +3687,46 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void FileDescriptorProto::clear_name() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_->clear();
- }
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name();
}
inline const ::std::string& FileDescriptorProto::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.name)
- return *name_;
+ return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void FileDescriptorProto::set_name(const ::std::string& value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.name)
}
inline void FileDescriptorProto::set_name(const char* value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.name)
}
inline void FileDescriptorProto::set_name(const char* value, size_t size) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(reinterpret_cast<const char*>(value), size);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.name)
}
inline ::std::string* FileDescriptorProto::mutable_name() {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.name)
- return name_;
+ return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* FileDescriptorProto::release_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.name)
clear_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = name_;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void FileDescriptorProto::set_allocated_name(::std::string* name) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete name_;
- }
- if (name) {
+ if (name != NULL) {
set_has_name();
- name_ = name;
} else {
clear_has_name();
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.name)
}
@@ -3004,68 +3741,46 @@
_has_bits_[0] &= ~0x00000002u;
}
inline void FileDescriptorProto::clear_package() {
- if (package_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- package_->clear();
- }
+ package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_package();
}
inline const ::std::string& FileDescriptorProto::package() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.package)
- return *package_;
+ return package_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void FileDescriptorProto::set_package(const ::std::string& value) {
set_has_package();
- if (package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- package_ = new ::std::string;
- }
- package_->assign(value);
+ package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.package)
}
inline void FileDescriptorProto::set_package(const char* value) {
set_has_package();
- if (package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- package_ = new ::std::string;
- }
- package_->assign(value);
+ package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.package)
}
inline void FileDescriptorProto::set_package(const char* value, size_t size) {
set_has_package();
- if (package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- package_ = new ::std::string;
- }
- package_->assign(reinterpret_cast<const char*>(value), size);
+ package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.package)
}
inline ::std::string* FileDescriptorProto::mutable_package() {
set_has_package();
- if (package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- package_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.package)
- return package_;
+ return package_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* FileDescriptorProto::release_package() {
+ // @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.package)
clear_has_package();
- if (package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = package_;
- package_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return package_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void FileDescriptorProto::set_allocated_package(::std::string* package) {
- if (package_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete package_;
- }
- if (package) {
+ if (package != NULL) {
set_has_package();
- package_ = package;
} else {
clear_has_package();
- package_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ package_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), package);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.package)
}
@@ -3098,6 +3813,7 @@
// @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.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) {
@@ -3202,16 +3918,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.message_type)
return message_type_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >&
-FileDescriptorProto::message_type() const {
- // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.message_type)
- return message_type_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >*
FileDescriptorProto::mutable_message_type() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.message_type)
return &message_type_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >&
+FileDescriptorProto::message_type() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.message_type)
+ return message_type_;
+}
// repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
inline int FileDescriptorProto::enum_type_size() const {
@@ -3232,16 +3948,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.enum_type)
return enum_type_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >&
-FileDescriptorProto::enum_type() const {
- // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.enum_type)
- return enum_type_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >*
FileDescriptorProto::mutable_enum_type() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.enum_type)
return &enum_type_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >&
+FileDescriptorProto::enum_type() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.enum_type)
+ return enum_type_;
+}
// repeated .google.protobuf.ServiceDescriptorProto service = 6;
inline int FileDescriptorProto::service_size() const {
@@ -3262,16 +3978,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.service)
return service_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >&
-FileDescriptorProto::service() const {
- // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.service)
- return service_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >*
FileDescriptorProto::mutable_service() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.service)
return &service_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >&
+FileDescriptorProto::service() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.service)
+ return service_;
+}
// repeated .google.protobuf.FieldDescriptorProto extension = 7;
inline int FileDescriptorProto::extension_size() const {
@@ -3292,16 +4008,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.extension)
return extension_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
-FileDescriptorProto::extension() const {
- // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.extension)
- return extension_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
FileDescriptorProto::mutable_extension() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.extension)
return &extension_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
+FileDescriptorProto::extension() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.extension)
+ return extension_;
+}
// optional .google.protobuf.FileOptions options = 8;
inline bool FileDescriptorProto::has_options() const {
@@ -3323,11 +4039,14 @@
}
inline ::google::protobuf::FileOptions* FileDescriptorProto::mutable_options() {
set_has_options();
- if (options_ == NULL) options_ = new ::google::protobuf::FileOptions;
+ if (options_ == NULL) {
+ options_ = new ::google::protobuf::FileOptions;
+ }
// @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.options)
return options_;
}
inline ::google::protobuf::FileOptions* FileDescriptorProto::release_options() {
+ // @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.options)
clear_has_options();
::google::protobuf::FileOptions* temp = options_;
options_ = NULL;
@@ -3364,11 +4083,14 @@
}
inline ::google::protobuf::SourceCodeInfo* FileDescriptorProto::mutable_source_code_info() {
set_has_source_code_info();
- if (source_code_info_ == NULL) source_code_info_ = new ::google::protobuf::SourceCodeInfo;
+ if (source_code_info_ == NULL) {
+ source_code_info_ = new ::google::protobuf::SourceCodeInfo;
+ }
// @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.source_code_info)
return source_code_info_;
}
inline ::google::protobuf::SourceCodeInfo* FileDescriptorProto::release_source_code_info() {
+ // @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.source_code_info)
clear_has_source_code_info();
::google::protobuf::SourceCodeInfo* temp = source_code_info_;
source_code_info_ = NULL;
@@ -3385,6 +4107,60 @@
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.source_code_info)
}
+// optional string syntax = 12;
+inline bool FileDescriptorProto::has_syntax() const {
+ return (_has_bits_[0] & 0x00000800u) != 0;
+}
+inline void FileDescriptorProto::set_has_syntax() {
+ _has_bits_[0] |= 0x00000800u;
+}
+inline void FileDescriptorProto::clear_has_syntax() {
+ _has_bits_[0] &= ~0x00000800u;
+}
+inline void FileDescriptorProto::clear_syntax() {
+ syntax_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ clear_has_syntax();
+}
+inline const ::std::string& FileDescriptorProto::syntax() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.syntax)
+ return syntax_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void FileDescriptorProto::set_syntax(const ::std::string& value) {
+ set_has_syntax();
+ syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.syntax)
+}
+inline void FileDescriptorProto::set_syntax(const char* value) {
+ set_has_syntax();
+ syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.syntax)
+}
+inline void FileDescriptorProto::set_syntax(const char* value, size_t size) {
+ set_has_syntax();
+ syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.syntax)
+}
+inline ::std::string* FileDescriptorProto::mutable_syntax() {
+ set_has_syntax();
+ // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.syntax)
+ return syntax_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* FileDescriptorProto::release_syntax() {
+ // @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.syntax)
+ clear_has_syntax();
+ return syntax_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void FileDescriptorProto::set_allocated_syntax(::std::string* syntax) {
+ if (syntax != NULL) {
+ set_has_syntax();
+ } else {
+ clear_has_syntax();
+ }
+ syntax_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), syntax);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.syntax)
+}
+
// -------------------------------------------------------------------
// DescriptorProto_ExtensionRange
@@ -3439,6 +4215,58 @@
// -------------------------------------------------------------------
+// DescriptorProto_ReservedRange
+
+// optional int32 start = 1;
+inline bool DescriptorProto_ReservedRange::has_start() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void DescriptorProto_ReservedRange::set_has_start() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void DescriptorProto_ReservedRange::clear_has_start() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void DescriptorProto_ReservedRange::clear_start() {
+ start_ = 0;
+ clear_has_start();
+}
+inline ::google::protobuf::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) {
+ set_has_start();
+ start_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ReservedRange.start)
+}
+
+// optional int32 end = 2;
+inline bool DescriptorProto_ReservedRange::has_end() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void DescriptorProto_ReservedRange::set_has_end() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void DescriptorProto_ReservedRange::clear_has_end() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void DescriptorProto_ReservedRange::clear_end() {
+ end_ = 0;
+ clear_has_end();
+}
+inline ::google::protobuf::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) {
+ set_has_end();
+ end_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ReservedRange.end)
+}
+
+// -------------------------------------------------------------------
+
// DescriptorProto
// optional string name = 1;
@@ -3452,68 +4280,46 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void DescriptorProto::clear_name() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_->clear();
- }
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name();
}
inline const ::std::string& DescriptorProto::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.name)
- return *name_;
+ return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void DescriptorProto::set_name(const ::std::string& value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.name)
}
inline void DescriptorProto::set_name(const char* value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.DescriptorProto.name)
}
inline void DescriptorProto::set_name(const char* value, size_t size) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(reinterpret_cast<const char*>(value), size);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.DescriptorProto.name)
}
inline ::std::string* DescriptorProto::mutable_name() {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.name)
- return name_;
+ return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* DescriptorProto::release_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.DescriptorProto.name)
clear_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = name_;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void DescriptorProto::set_allocated_name(::std::string* name) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete name_;
- }
- if (name) {
+ if (name != NULL) {
set_has_name();
- name_ = name;
} else {
clear_has_name();
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.name)
}
@@ -3536,16 +4342,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.field)
return field_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
-DescriptorProto::field() const {
- // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.field)
- return field_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
DescriptorProto::mutable_field() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.field)
return &field_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
+DescriptorProto::field() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.field)
+ return field_;
+}
// repeated .google.protobuf.FieldDescriptorProto extension = 6;
inline int DescriptorProto::extension_size() const {
@@ -3566,16 +4372,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.extension)
return extension_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
-DescriptorProto::extension() const {
- // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension)
- return extension_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
DescriptorProto::mutable_extension() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.extension)
return &extension_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
+DescriptorProto::extension() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension)
+ return extension_;
+}
// repeated .google.protobuf.DescriptorProto nested_type = 3;
inline int DescriptorProto::nested_type_size() const {
@@ -3596,16 +4402,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.nested_type)
return nested_type_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >&
-DescriptorProto::nested_type() const {
- // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.nested_type)
- return nested_type_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >*
DescriptorProto::mutable_nested_type() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.nested_type)
return &nested_type_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >&
+DescriptorProto::nested_type() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.nested_type)
+ return nested_type_;
+}
// repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
inline int DescriptorProto::enum_type_size() const {
@@ -3626,16 +4432,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.enum_type)
return enum_type_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >&
-DescriptorProto::enum_type() const {
- // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.enum_type)
- return enum_type_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >*
DescriptorProto::mutable_enum_type() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.enum_type)
return &enum_type_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >&
+DescriptorProto::enum_type() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.enum_type)
+ return enum_type_;
+}
// repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
inline int DescriptorProto::extension_range_size() const {
@@ -3656,16 +4462,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.extension_range)
return extension_range_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >&
-DescriptorProto::extension_range() const {
- // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension_range)
- return extension_range_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >*
DescriptorProto::mutable_extension_range() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.extension_range)
return &extension_range_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >&
+DescriptorProto::extension_range() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension_range)
+ return extension_range_;
+}
// repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
inline int DescriptorProto::oneof_decl_size() const {
@@ -3686,16 +4492,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.oneof_decl)
return oneof_decl_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >&
-DescriptorProto::oneof_decl() const {
- // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.oneof_decl)
- return oneof_decl_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >*
DescriptorProto::mutable_oneof_decl() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.oneof_decl)
return &oneof_decl_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >&
+DescriptorProto::oneof_decl() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.oneof_decl)
+ return oneof_decl_;
+}
// optional .google.protobuf.MessageOptions options = 7;
inline bool DescriptorProto::has_options() const {
@@ -3717,11 +4523,14 @@
}
inline ::google::protobuf::MessageOptions* DescriptorProto::mutable_options() {
set_has_options();
- if (options_ == NULL) options_ = new ::google::protobuf::MessageOptions;
+ if (options_ == NULL) {
+ options_ = new ::google::protobuf::MessageOptions;
+ }
// @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.options)
return options_;
}
inline ::google::protobuf::MessageOptions* DescriptorProto::release_options() {
+ // @@protoc_insertion_point(field_release:google.protobuf.DescriptorProto.options)
clear_has_options();
::google::protobuf::MessageOptions* temp = options_;
options_ = NULL;
@@ -3738,6 +4547,91 @@
// @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.options)
}
+// repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
+inline int DescriptorProto::reserved_range_size() const {
+ return reserved_range_.size();
+}
+inline void DescriptorProto::clear_reserved_range() {
+ reserved_range_.Clear();
+}
+inline const ::google::protobuf::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::mutable_reserved_range(int index) {
+ // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.reserved_range)
+ return reserved_range_.Mutable(index);
+}
+inline ::google::protobuf::DescriptorProto_ReservedRange* DescriptorProto::add_reserved_range() {
+ // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_range)
+ return reserved_range_.Add();
+}
+inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ReservedRange >*
+DescriptorProto::mutable_reserved_range() {
+ // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.reserved_range)
+ return &reserved_range_;
+}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ReservedRange >&
+DescriptorProto::reserved_range() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.reserved_range)
+ return reserved_range_;
+}
+
+// repeated string reserved_name = 10;
+inline int DescriptorProto::reserved_name_size() const {
+ return reserved_name_.size();
+}
+inline void DescriptorProto::clear_reserved_name() {
+ reserved_name_.Clear();
+}
+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) {
+ // @@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) {
+ // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.reserved_name)
+ reserved_name_.Mutable(index)->assign(value);
+}
+inline void DescriptorProto::set_reserved_name(int index, const char* value) {
+ reserved_name_.Mutable(index)->assign(value);
+ // @@protoc_insertion_point(field_set_char:google.protobuf.DescriptorProto.reserved_name)
+}
+inline void DescriptorProto::set_reserved_name(int index, const char* value, size_t size) {
+ reserved_name_.Mutable(index)->assign(
+ reinterpret_cast<const char*>(value), size);
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.DescriptorProto.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) {
+ reserved_name_.Add()->assign(value);
+ // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_name)
+}
+inline void DescriptorProto::add_reserved_name(const char* value) {
+ reserved_name_.Add()->assign(value);
+ // @@protoc_insertion_point(field_add_char:google.protobuf.DescriptorProto.reserved_name)
+}
+inline void DescriptorProto::add_reserved_name(const char* value, size_t size) {
+ reserved_name_.Add()->assign(reinterpret_cast<const char*>(value), size);
+ // @@protoc_insertion_point(field_add_pointer:google.protobuf.DescriptorProto.reserved_name)
+}
+inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
+DescriptorProto::reserved_name() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.reserved_name)
+ return reserved_name_;
+}
+inline ::google::protobuf::RepeatedPtrField< ::std::string>*
+DescriptorProto::mutable_reserved_name() {
+ // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.reserved_name)
+ return &reserved_name_;
+}
+
// -------------------------------------------------------------------
// FieldDescriptorProto
@@ -3753,68 +4647,46 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void FieldDescriptorProto::clear_name() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_->clear();
- }
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name();
}
inline const ::std::string& FieldDescriptorProto::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.name)
- return *name_;
+ return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void FieldDescriptorProto::set_name(const ::std::string& value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.name)
}
inline void FieldDescriptorProto::set_name(const char* value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.name)
}
inline void FieldDescriptorProto::set_name(const char* value, size_t size) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(reinterpret_cast<const char*>(value), size);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.name)
}
inline ::std::string* FieldDescriptorProto::mutable_name() {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.name)
- return name_;
+ return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* FieldDescriptorProto::release_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.name)
clear_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = name_;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void FieldDescriptorProto::set_allocated_name(::std::string* name) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete name_;
- }
- if (name) {
+ if (name != NULL) {
set_has_name();
- name_ = name;
} else {
clear_has_name();
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.name)
}
@@ -3903,68 +4775,46 @@
_has_bits_[0] &= ~0x00000010u;
}
inline void FieldDescriptorProto::clear_type_name() {
- if (type_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- type_name_->clear();
- }
+ type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_type_name();
}
inline const ::std::string& FieldDescriptorProto::type_name() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type_name)
- return *type_name_;
+ return type_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void FieldDescriptorProto::set_type_name(const ::std::string& value) {
set_has_type_name();
- if (type_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- type_name_ = new ::std::string;
- }
- type_name_->assign(value);
+ type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type_name)
}
inline void FieldDescriptorProto::set_type_name(const char* value) {
set_has_type_name();
- if (type_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- type_name_ = new ::std::string;
- }
- type_name_->assign(value);
+ type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.type_name)
}
inline void FieldDescriptorProto::set_type_name(const char* value, size_t size) {
set_has_type_name();
- if (type_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- type_name_ = new ::std::string;
- }
- type_name_->assign(reinterpret_cast<const char*>(value), size);
+ type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.type_name)
}
inline ::std::string* FieldDescriptorProto::mutable_type_name() {
set_has_type_name();
- if (type_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- type_name_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.type_name)
- return type_name_;
+ return type_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* FieldDescriptorProto::release_type_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.type_name)
clear_has_type_name();
- if (type_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = type_name_;
- type_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return type_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void FieldDescriptorProto::set_allocated_type_name(::std::string* type_name) {
- if (type_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete type_name_;
- }
- if (type_name) {
+ if (type_name != NULL) {
set_has_type_name();
- type_name_ = type_name;
} else {
clear_has_type_name();
- type_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ type_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_name);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.type_name)
}
@@ -3979,68 +4829,46 @@
_has_bits_[0] &= ~0x00000020u;
}
inline void FieldDescriptorProto::clear_extendee() {
- if (extendee_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- extendee_->clear();
- }
+ extendee_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_extendee();
}
inline const ::std::string& FieldDescriptorProto::extendee() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.extendee)
- return *extendee_;
+ return extendee_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void FieldDescriptorProto::set_extendee(const ::std::string& value) {
set_has_extendee();
- if (extendee_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- extendee_ = new ::std::string;
- }
- extendee_->assign(value);
+ extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.extendee)
}
inline void FieldDescriptorProto::set_extendee(const char* value) {
set_has_extendee();
- if (extendee_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- extendee_ = new ::std::string;
- }
- extendee_->assign(value);
+ extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.extendee)
}
inline void FieldDescriptorProto::set_extendee(const char* value, size_t size) {
set_has_extendee();
- if (extendee_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- extendee_ = new ::std::string;
- }
- extendee_->assign(reinterpret_cast<const char*>(value), size);
+ extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.extendee)
}
inline ::std::string* FieldDescriptorProto::mutable_extendee() {
set_has_extendee();
- if (extendee_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- extendee_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.extendee)
- return extendee_;
+ return extendee_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* FieldDescriptorProto::release_extendee() {
+ // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.extendee)
clear_has_extendee();
- if (extendee_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = extendee_;
- extendee_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return extendee_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void FieldDescriptorProto::set_allocated_extendee(::std::string* extendee) {
- if (extendee_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete extendee_;
- }
- if (extendee) {
+ if (extendee != NULL) {
set_has_extendee();
- extendee_ = extendee;
} else {
clear_has_extendee();
- extendee_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ extendee_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), extendee);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.extendee)
}
@@ -4055,68 +4883,46 @@
_has_bits_[0] &= ~0x00000040u;
}
inline void FieldDescriptorProto::clear_default_value() {
- if (default_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- default_value_->clear();
- }
+ default_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_default_value();
}
inline const ::std::string& FieldDescriptorProto::default_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.default_value)
- return *default_value_;
+ return default_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void FieldDescriptorProto::set_default_value(const ::std::string& value) {
set_has_default_value();
- if (default_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- default_value_ = new ::std::string;
- }
- default_value_->assign(value);
+ default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.default_value)
}
inline void FieldDescriptorProto::set_default_value(const char* value) {
set_has_default_value();
- if (default_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- default_value_ = new ::std::string;
- }
- default_value_->assign(value);
+ default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.default_value)
}
inline void FieldDescriptorProto::set_default_value(const char* value, size_t size) {
set_has_default_value();
- if (default_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- default_value_ = new ::std::string;
- }
- default_value_->assign(reinterpret_cast<const char*>(value), size);
+ default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.default_value)
}
inline ::std::string* FieldDescriptorProto::mutable_default_value() {
set_has_default_value();
- if (default_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- default_value_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.default_value)
- return default_value_;
+ return default_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* FieldDescriptorProto::release_default_value() {
+ // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.default_value)
clear_has_default_value();
- if (default_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = default_value_;
- default_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return default_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void FieldDescriptorProto::set_allocated_default_value(::std::string* default_value) {
- if (default_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete default_value_;
- }
- if (default_value) {
+ if (default_value != NULL) {
set_has_default_value();
- default_value_ = default_value;
} else {
clear_has_default_value();
- default_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ default_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), default_value);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.default_value)
}
@@ -4144,16 +4950,70 @@
// @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.oneof_index)
}
-// optional .google.protobuf.FieldOptions options = 8;
-inline bool FieldDescriptorProto::has_options() const {
+// optional string json_name = 10;
+inline bool FieldDescriptorProto::has_json_name() const {
return (_has_bits_[0] & 0x00000100u) != 0;
}
-inline void FieldDescriptorProto::set_has_options() {
+inline void FieldDescriptorProto::set_has_json_name() {
_has_bits_[0] |= 0x00000100u;
}
-inline void FieldDescriptorProto::clear_has_options() {
+inline void FieldDescriptorProto::clear_has_json_name() {
_has_bits_[0] &= ~0x00000100u;
}
+inline void FieldDescriptorProto::clear_json_name() {
+ json_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ clear_has_json_name();
+}
+inline const ::std::string& FieldDescriptorProto::json_name() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.json_name)
+ return json_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void FieldDescriptorProto::set_json_name(const ::std::string& value) {
+ set_has_json_name();
+ json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.json_name)
+}
+inline void FieldDescriptorProto::set_json_name(const char* value) {
+ set_has_json_name();
+ json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.json_name)
+}
+inline void FieldDescriptorProto::set_json_name(const char* value, size_t size) {
+ set_has_json_name();
+ json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.json_name)
+}
+inline ::std::string* FieldDescriptorProto::mutable_json_name() {
+ set_has_json_name();
+ // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.json_name)
+ return json_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* FieldDescriptorProto::release_json_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.json_name)
+ clear_has_json_name();
+ return json_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void FieldDescriptorProto::set_allocated_json_name(::std::string* json_name) {
+ if (json_name != NULL) {
+ set_has_json_name();
+ } else {
+ clear_has_json_name();
+ }
+ json_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), json_name);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.json_name)
+}
+
+// optional .google.protobuf.FieldOptions options = 8;
+inline bool FieldDescriptorProto::has_options() const {
+ return (_has_bits_[0] & 0x00000200u) != 0;
+}
+inline void FieldDescriptorProto::set_has_options() {
+ _has_bits_[0] |= 0x00000200u;
+}
+inline void FieldDescriptorProto::clear_has_options() {
+ _has_bits_[0] &= ~0x00000200u;
+}
inline void FieldDescriptorProto::clear_options() {
if (options_ != NULL) options_->::google::protobuf::FieldOptions::Clear();
clear_has_options();
@@ -4164,11 +5024,14 @@
}
inline ::google::protobuf::FieldOptions* FieldDescriptorProto::mutable_options() {
set_has_options();
- if (options_ == NULL) options_ = new ::google::protobuf::FieldOptions;
+ if (options_ == NULL) {
+ options_ = new ::google::protobuf::FieldOptions;
+ }
// @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.options)
return options_;
}
inline ::google::protobuf::FieldOptions* FieldDescriptorProto::release_options() {
+ // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.options)
clear_has_options();
::google::protobuf::FieldOptions* temp = options_;
options_ = NULL;
@@ -4200,68 +5063,46 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void OneofDescriptorProto::clear_name() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_->clear();
- }
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name();
}
inline const ::std::string& OneofDescriptorProto::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.OneofDescriptorProto.name)
- return *name_;
+ return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void OneofDescriptorProto::set_name(const ::std::string& value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.OneofDescriptorProto.name)
}
inline void OneofDescriptorProto::set_name(const char* value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.OneofDescriptorProto.name)
}
inline void OneofDescriptorProto::set_name(const char* value, size_t size) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(reinterpret_cast<const char*>(value), size);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.OneofDescriptorProto.name)
}
inline ::std::string* OneofDescriptorProto::mutable_name() {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.OneofDescriptorProto.name)
- return name_;
+ return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* OneofDescriptorProto::release_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.OneofDescriptorProto.name)
clear_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = name_;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void OneofDescriptorProto::set_allocated_name(::std::string* name) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete name_;
- }
- if (name) {
+ if (name != NULL) {
set_has_name();
- name_ = name;
} else {
clear_has_name();
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.OneofDescriptorProto.name)
}
@@ -4280,68 +5121,46 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void EnumDescriptorProto::clear_name() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_->clear();
- }
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name();
}
inline const ::std::string& EnumDescriptorProto::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.name)
- return *name_;
+ return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void EnumDescriptorProto::set_name(const ::std::string& value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.name)
}
inline void EnumDescriptorProto::set_name(const char* value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.EnumDescriptorProto.name)
}
inline void EnumDescriptorProto::set_name(const char* value, size_t size) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(reinterpret_cast<const char*>(value), size);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumDescriptorProto.name)
}
inline ::std::string* EnumDescriptorProto::mutable_name() {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.name)
- return name_;
+ return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* EnumDescriptorProto::release_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.EnumDescriptorProto.name)
clear_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = name_;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void EnumDescriptorProto::set_allocated_name(::std::string* name) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete name_;
- }
- if (name) {
+ if (name != NULL) {
set_has_name();
- name_ = name;
} else {
clear_has_name();
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.name)
}
@@ -4364,16 +5183,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.EnumDescriptorProto.value)
return value_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >&
-EnumDescriptorProto::value() const {
- // @@protoc_insertion_point(field_list:google.protobuf.EnumDescriptorProto.value)
- return value_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >*
EnumDescriptorProto::mutable_value() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumDescriptorProto.value)
return &value_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >&
+EnumDescriptorProto::value() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.EnumDescriptorProto.value)
+ return value_;
+}
// optional .google.protobuf.EnumOptions options = 3;
inline bool EnumDescriptorProto::has_options() const {
@@ -4395,11 +5214,14 @@
}
inline ::google::protobuf::EnumOptions* EnumDescriptorProto::mutable_options() {
set_has_options();
- if (options_ == NULL) options_ = new ::google::protobuf::EnumOptions;
+ if (options_ == NULL) {
+ options_ = new ::google::protobuf::EnumOptions;
+ }
// @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.options)
return options_;
}
inline ::google::protobuf::EnumOptions* EnumDescriptorProto::release_options() {
+ // @@protoc_insertion_point(field_release:google.protobuf.EnumDescriptorProto.options)
clear_has_options();
::google::protobuf::EnumOptions* temp = options_;
options_ = NULL;
@@ -4431,68 +5253,46 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void EnumValueDescriptorProto::clear_name() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_->clear();
- }
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name();
}
inline const ::std::string& EnumValueDescriptorProto::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.name)
- return *name_;
+ return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void EnumValueDescriptorProto::set_name(const ::std::string& value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.name)
}
inline void EnumValueDescriptorProto::set_name(const char* value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.EnumValueDescriptorProto.name)
}
inline void EnumValueDescriptorProto::set_name(const char* value, size_t size) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(reinterpret_cast<const char*>(value), size);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumValueDescriptorProto.name)
}
inline ::std::string* EnumValueDescriptorProto::mutable_name() {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.name)
- return name_;
+ return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* EnumValueDescriptorProto::release_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.EnumValueDescriptorProto.name)
clear_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = name_;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void EnumValueDescriptorProto::set_allocated_name(::std::string* name) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete name_;
- }
- if (name) {
+ if (name != NULL) {
set_has_name();
- name_ = name;
} else {
clear_has_name();
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.name)
}
@@ -4540,11 +5340,14 @@
}
inline ::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::mutable_options() {
set_has_options();
- if (options_ == NULL) options_ = new ::google::protobuf::EnumValueOptions;
+ if (options_ == NULL) {
+ options_ = new ::google::protobuf::EnumValueOptions;
+ }
// @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.options)
return options_;
}
inline ::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::release_options() {
+ // @@protoc_insertion_point(field_release:google.protobuf.EnumValueDescriptorProto.options)
clear_has_options();
::google::protobuf::EnumValueOptions* temp = options_;
options_ = NULL;
@@ -4576,68 +5379,46 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void ServiceDescriptorProto::clear_name() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_->clear();
- }
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name();
}
inline const ::std::string& ServiceDescriptorProto::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.name)
- return *name_;
+ return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void ServiceDescriptorProto::set_name(const ::std::string& value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.ServiceDescriptorProto.name)
}
inline void ServiceDescriptorProto::set_name(const char* value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.ServiceDescriptorProto.name)
}
inline void ServiceDescriptorProto::set_name(const char* value, size_t size) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(reinterpret_cast<const char*>(value), size);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.ServiceDescriptorProto.name)
}
inline ::std::string* ServiceDescriptorProto::mutable_name() {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.name)
- return name_;
+ return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* ServiceDescriptorProto::release_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.ServiceDescriptorProto.name)
clear_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = name_;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void ServiceDescriptorProto::set_allocated_name(::std::string* name) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete name_;
- }
- if (name) {
+ if (name != NULL) {
set_has_name();
- name_ = name;
} else {
clear_has_name();
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.name)
}
@@ -4660,16 +5441,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.ServiceDescriptorProto.method)
return method_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >&
-ServiceDescriptorProto::method() const {
- // @@protoc_insertion_point(field_list:google.protobuf.ServiceDescriptorProto.method)
- return method_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >*
ServiceDescriptorProto::mutable_method() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.ServiceDescriptorProto.method)
return &method_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >&
+ServiceDescriptorProto::method() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.ServiceDescriptorProto.method)
+ return method_;
+}
// optional .google.protobuf.ServiceOptions options = 3;
inline bool ServiceDescriptorProto::has_options() const {
@@ -4691,11 +5472,14 @@
}
inline ::google::protobuf::ServiceOptions* ServiceDescriptorProto::mutable_options() {
set_has_options();
- if (options_ == NULL) options_ = new ::google::protobuf::ServiceOptions;
+ if (options_ == NULL) {
+ options_ = new ::google::protobuf::ServiceOptions;
+ }
// @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.options)
return options_;
}
inline ::google::protobuf::ServiceOptions* ServiceDescriptorProto::release_options() {
+ // @@protoc_insertion_point(field_release:google.protobuf.ServiceDescriptorProto.options)
clear_has_options();
::google::protobuf::ServiceOptions* temp = options_;
options_ = NULL;
@@ -4727,68 +5511,46 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void MethodDescriptorProto::clear_name() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_->clear();
- }
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name();
}
inline const ::std::string& MethodDescriptorProto::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.name)
- return *name_;
+ return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void MethodDescriptorProto::set_name(const ::std::string& value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.name)
}
inline void MethodDescriptorProto::set_name(const char* value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.name)
}
inline void MethodDescriptorProto::set_name(const char* value, size_t size) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(reinterpret_cast<const char*>(value), size);
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.name)
}
inline ::std::string* MethodDescriptorProto::mutable_name() {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.name)
- return name_;
+ return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* MethodDescriptorProto::release_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.MethodDescriptorProto.name)
clear_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = name_;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void MethodDescriptorProto::set_allocated_name(::std::string* name) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete name_;
- }
- if (name) {
+ if (name != NULL) {
set_has_name();
- name_ = name;
} else {
clear_has_name();
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.name)
}
@@ -4803,68 +5565,46 @@
_has_bits_[0] &= ~0x00000002u;
}
inline void MethodDescriptorProto::clear_input_type() {
- if (input_type_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- input_type_->clear();
- }
+ input_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_input_type();
}
inline const ::std::string& MethodDescriptorProto::input_type() const {
// @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.input_type)
- return *input_type_;
+ return input_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void MethodDescriptorProto::set_input_type(const ::std::string& value) {
set_has_input_type();
- if (input_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- input_type_ = new ::std::string;
- }
- input_type_->assign(value);
+ input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.input_type)
}
inline void MethodDescriptorProto::set_input_type(const char* value) {
set_has_input_type();
- if (input_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- input_type_ = new ::std::string;
- }
- input_type_->assign(value);
+ input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.input_type)
}
inline void MethodDescriptorProto::set_input_type(const char* value, size_t size) {
set_has_input_type();
- if (input_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- input_type_ = new ::std::string;
- }
- input_type_->assign(reinterpret_cast<const char*>(value), size);
+ input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.input_type)
}
inline ::std::string* MethodDescriptorProto::mutable_input_type() {
set_has_input_type();
- if (input_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- input_type_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.input_type)
- return input_type_;
+ return input_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* MethodDescriptorProto::release_input_type() {
+ // @@protoc_insertion_point(field_release:google.protobuf.MethodDescriptorProto.input_type)
clear_has_input_type();
- if (input_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = input_type_;
- input_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return input_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void MethodDescriptorProto::set_allocated_input_type(::std::string* input_type) {
- if (input_type_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete input_type_;
- }
- if (input_type) {
+ if (input_type != NULL) {
set_has_input_type();
- input_type_ = input_type;
} else {
clear_has_input_type();
- input_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ input_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), input_type);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.input_type)
}
@@ -4879,68 +5619,46 @@
_has_bits_[0] &= ~0x00000004u;
}
inline void MethodDescriptorProto::clear_output_type() {
- if (output_type_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- output_type_->clear();
- }
+ output_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_output_type();
}
inline const ::std::string& MethodDescriptorProto::output_type() const {
// @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.output_type)
- return *output_type_;
+ return output_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void MethodDescriptorProto::set_output_type(const ::std::string& value) {
set_has_output_type();
- if (output_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- output_type_ = new ::std::string;
- }
- output_type_->assign(value);
+ output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.output_type)
}
inline void MethodDescriptorProto::set_output_type(const char* value) {
set_has_output_type();
- if (output_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- output_type_ = new ::std::string;
- }
- output_type_->assign(value);
+ output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.output_type)
}
inline void MethodDescriptorProto::set_output_type(const char* value, size_t size) {
set_has_output_type();
- if (output_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- output_type_ = new ::std::string;
- }
- output_type_->assign(reinterpret_cast<const char*>(value), size);
+ output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.output_type)
}
inline ::std::string* MethodDescriptorProto::mutable_output_type() {
set_has_output_type();
- if (output_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- output_type_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.output_type)
- return output_type_;
+ return output_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* MethodDescriptorProto::release_output_type() {
+ // @@protoc_insertion_point(field_release:google.protobuf.MethodDescriptorProto.output_type)
clear_has_output_type();
- if (output_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = output_type_;
- output_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return output_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void MethodDescriptorProto::set_allocated_output_type(::std::string* output_type) {
- if (output_type_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete output_type_;
- }
- if (output_type) {
+ if (output_type != NULL) {
set_has_output_type();
- output_type_ = output_type;
} else {
clear_has_output_type();
- output_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ output_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), output_type);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.output_type)
}
@@ -4964,11 +5682,14 @@
}
inline ::google::protobuf::MethodOptions* MethodDescriptorProto::mutable_options() {
set_has_options();
- if (options_ == NULL) options_ = new ::google::protobuf::MethodOptions;
+ if (options_ == NULL) {
+ options_ = new ::google::protobuf::MethodOptions;
+ }
// @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.options)
return options_;
}
inline ::google::protobuf::MethodOptions* MethodDescriptorProto::release_options() {
+ // @@protoc_insertion_point(field_release:google.protobuf.MethodDescriptorProto.options)
clear_has_options();
::google::protobuf::MethodOptions* temp = options_;
options_ = NULL;
@@ -4985,6 +5706,54 @@
// @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.options)
}
+// optional bool client_streaming = 5 [default = false];
+inline bool MethodDescriptorProto::has_client_streaming() const {
+ return (_has_bits_[0] & 0x00000010u) != 0;
+}
+inline void MethodDescriptorProto::set_has_client_streaming() {
+ _has_bits_[0] |= 0x00000010u;
+}
+inline void MethodDescriptorProto::clear_has_client_streaming() {
+ _has_bits_[0] &= ~0x00000010u;
+}
+inline void MethodDescriptorProto::clear_client_streaming() {
+ client_streaming_ = false;
+ clear_has_client_streaming();
+}
+inline bool MethodDescriptorProto::client_streaming() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.client_streaming)
+ return client_streaming_;
+}
+inline void MethodDescriptorProto::set_client_streaming(bool value) {
+ set_has_client_streaming();
+ client_streaming_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.client_streaming)
+}
+
+// optional bool server_streaming = 6 [default = false];
+inline bool MethodDescriptorProto::has_server_streaming() const {
+ return (_has_bits_[0] & 0x00000020u) != 0;
+}
+inline void MethodDescriptorProto::set_has_server_streaming() {
+ _has_bits_[0] |= 0x00000020u;
+}
+inline void MethodDescriptorProto::clear_has_server_streaming() {
+ _has_bits_[0] &= ~0x00000020u;
+}
+inline void MethodDescriptorProto::clear_server_streaming() {
+ server_streaming_ = false;
+ clear_has_server_streaming();
+}
+inline bool MethodDescriptorProto::server_streaming() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.server_streaming)
+ return server_streaming_;
+}
+inline void MethodDescriptorProto::set_server_streaming(bool value) {
+ set_has_server_streaming();
+ server_streaming_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.server_streaming)
+}
+
// -------------------------------------------------------------------
// FileOptions
@@ -5000,68 +5769,46 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void FileOptions::clear_java_package() {
- if (java_package_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- java_package_->clear();
- }
+ java_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_java_package();
}
inline const ::std::string& FileOptions::java_package() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_package)
- return *java_package_;
+ return java_package_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void FileOptions::set_java_package(const ::std::string& value) {
set_has_java_package();
- if (java_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- java_package_ = new ::std::string;
- }
- java_package_->assign(value);
+ java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_package)
}
inline void FileOptions::set_java_package(const char* value) {
set_has_java_package();
- if (java_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- java_package_ = new ::std::string;
- }
- java_package_->assign(value);
+ java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.java_package)
}
inline void FileOptions::set_java_package(const char* value, size_t size) {
set_has_java_package();
- if (java_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- java_package_ = new ::std::string;
- }
- java_package_->assign(reinterpret_cast<const char*>(value), size);
+ java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.java_package)
}
inline ::std::string* FileOptions::mutable_java_package() {
set_has_java_package();
- if (java_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- java_package_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_package)
- return java_package_;
+ return java_package_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* FileOptions::release_java_package() {
+ // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.java_package)
clear_has_java_package();
- if (java_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = java_package_;
- java_package_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return java_package_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void FileOptions::set_allocated_java_package(::std::string* java_package) {
- if (java_package_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete java_package_;
- }
- if (java_package) {
+ if (java_package != NULL) {
set_has_java_package();
- java_package_ = java_package;
} else {
clear_has_java_package();
- java_package_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ java_package_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), java_package);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_package)
}
@@ -5076,68 +5823,46 @@
_has_bits_[0] &= ~0x00000002u;
}
inline void FileOptions::clear_java_outer_classname() {
- if (java_outer_classname_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- java_outer_classname_->clear();
- }
+ java_outer_classname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_java_outer_classname();
}
inline const ::std::string& FileOptions::java_outer_classname() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_outer_classname)
- return *java_outer_classname_;
+ return java_outer_classname_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void FileOptions::set_java_outer_classname(const ::std::string& value) {
set_has_java_outer_classname();
- if (java_outer_classname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- java_outer_classname_ = new ::std::string;
- }
- java_outer_classname_->assign(value);
+ java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_outer_classname)
}
inline void FileOptions::set_java_outer_classname(const char* value) {
set_has_java_outer_classname();
- if (java_outer_classname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- java_outer_classname_ = new ::std::string;
- }
- java_outer_classname_->assign(value);
+ java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@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) {
set_has_java_outer_classname();
- if (java_outer_classname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- java_outer_classname_ = new ::std::string;
- }
- java_outer_classname_->assign(reinterpret_cast<const char*>(value), size);
+ java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.java_outer_classname)
}
inline ::std::string* FileOptions::mutable_java_outer_classname() {
set_has_java_outer_classname();
- if (java_outer_classname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- java_outer_classname_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_outer_classname)
- return java_outer_classname_;
+ return java_outer_classname_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* FileOptions::release_java_outer_classname() {
+ // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.java_outer_classname)
clear_has_java_outer_classname();
- if (java_outer_classname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = java_outer_classname_;
- java_outer_classname_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return java_outer_classname_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void FileOptions::set_allocated_java_outer_classname(::std::string* java_outer_classname) {
- if (java_outer_classname_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete java_outer_classname_;
- }
- if (java_outer_classname) {
+ if (java_outer_classname != NULL) {
set_has_java_outer_classname();
- java_outer_classname_ = java_outer_classname;
} else {
clear_has_java_outer_classname();
- java_outer_classname_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ java_outer_classname_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), java_outer_classname);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_outer_classname)
}
@@ -5249,68 +5974,46 @@
_has_bits_[0] &= ~0x00000040u;
}
inline void FileOptions::clear_go_package() {
- if (go_package_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- go_package_->clear();
- }
+ go_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_go_package();
}
inline const ::std::string& FileOptions::go_package() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.go_package)
- return *go_package_;
+ return go_package_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void FileOptions::set_go_package(const ::std::string& value) {
set_has_go_package();
- if (go_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- go_package_ = new ::std::string;
- }
- go_package_->assign(value);
+ go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.FileOptions.go_package)
}
inline void FileOptions::set_go_package(const char* value) {
set_has_go_package();
- if (go_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- go_package_ = new ::std::string;
- }
- go_package_->assign(value);
+ go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.go_package)
}
inline void FileOptions::set_go_package(const char* value, size_t size) {
set_has_go_package();
- if (go_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- go_package_ = new ::std::string;
- }
- go_package_->assign(reinterpret_cast<const char*>(value), size);
+ go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.go_package)
}
inline ::std::string* FileOptions::mutable_go_package() {
set_has_go_package();
- if (go_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- go_package_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.go_package)
- return go_package_;
+ return go_package_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* FileOptions::release_go_package() {
+ // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.go_package)
clear_has_go_package();
- if (go_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = go_package_;
- go_package_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return go_package_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void FileOptions::set_allocated_go_package(::std::string* go_package) {
- if (go_package_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete go_package_;
- }
- if (go_package) {
+ if (go_package != NULL) {
set_has_go_package();
- go_package_ = go_package;
} else {
clear_has_go_package();
- go_package_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ go_package_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), go_package);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.go_package)
}
@@ -5410,6 +6113,138 @@
// @@protoc_insertion_point(field_set:google.protobuf.FileOptions.deprecated)
}
+// optional bool cc_enable_arenas = 31 [default = false];
+inline bool FileOptions::has_cc_enable_arenas() const {
+ return (_has_bits_[0] & 0x00000800u) != 0;
+}
+inline void FileOptions::set_has_cc_enable_arenas() {
+ _has_bits_[0] |= 0x00000800u;
+}
+inline void FileOptions::clear_has_cc_enable_arenas() {
+ _has_bits_[0] &= ~0x00000800u;
+}
+inline void FileOptions::clear_cc_enable_arenas() {
+ cc_enable_arenas_ = false;
+ clear_has_cc_enable_arenas();
+}
+inline bool FileOptions::cc_enable_arenas() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.cc_enable_arenas)
+ return cc_enable_arenas_;
+}
+inline void FileOptions::set_cc_enable_arenas(bool value) {
+ set_has_cc_enable_arenas();
+ cc_enable_arenas_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.cc_enable_arenas)
+}
+
+// optional string objc_class_prefix = 36;
+inline bool FileOptions::has_objc_class_prefix() const {
+ return (_has_bits_[0] & 0x00001000u) != 0;
+}
+inline void FileOptions::set_has_objc_class_prefix() {
+ _has_bits_[0] |= 0x00001000u;
+}
+inline void FileOptions::clear_has_objc_class_prefix() {
+ _has_bits_[0] &= ~0x00001000u;
+}
+inline void FileOptions::clear_objc_class_prefix() {
+ objc_class_prefix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ clear_has_objc_class_prefix();
+}
+inline const ::std::string& FileOptions::objc_class_prefix() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.objc_class_prefix)
+ return objc_class_prefix_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void FileOptions::set_objc_class_prefix(const ::std::string& value) {
+ set_has_objc_class_prefix();
+ objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.objc_class_prefix)
+}
+inline void FileOptions::set_objc_class_prefix(const char* value) {
+ set_has_objc_class_prefix();
+ objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@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) {
+ set_has_objc_class_prefix();
+ objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.objc_class_prefix)
+}
+inline ::std::string* FileOptions::mutable_objc_class_prefix() {
+ set_has_objc_class_prefix();
+ // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.objc_class_prefix)
+ return objc_class_prefix_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* FileOptions::release_objc_class_prefix() {
+ // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.objc_class_prefix)
+ clear_has_objc_class_prefix();
+ return objc_class_prefix_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void FileOptions::set_allocated_objc_class_prefix(::std::string* objc_class_prefix) {
+ if (objc_class_prefix != NULL) {
+ set_has_objc_class_prefix();
+ } else {
+ clear_has_objc_class_prefix();
+ }
+ objc_class_prefix_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), objc_class_prefix);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.objc_class_prefix)
+}
+
+// optional string csharp_namespace = 37;
+inline bool FileOptions::has_csharp_namespace() const {
+ return (_has_bits_[0] & 0x00002000u) != 0;
+}
+inline void FileOptions::set_has_csharp_namespace() {
+ _has_bits_[0] |= 0x00002000u;
+}
+inline void FileOptions::clear_has_csharp_namespace() {
+ _has_bits_[0] &= ~0x00002000u;
+}
+inline void FileOptions::clear_csharp_namespace() {
+ csharp_namespace_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ clear_has_csharp_namespace();
+}
+inline const ::std::string& FileOptions::csharp_namespace() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.csharp_namespace)
+ return csharp_namespace_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void FileOptions::set_csharp_namespace(const ::std::string& value) {
+ set_has_csharp_namespace();
+ csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.csharp_namespace)
+}
+inline void FileOptions::set_csharp_namespace(const char* value) {
+ set_has_csharp_namespace();
+ csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.csharp_namespace)
+}
+inline void FileOptions::set_csharp_namespace(const char* value, size_t size) {
+ set_has_csharp_namespace();
+ csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.csharp_namespace)
+}
+inline ::std::string* FileOptions::mutable_csharp_namespace() {
+ set_has_csharp_namespace();
+ // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.csharp_namespace)
+ return csharp_namespace_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* FileOptions::release_csharp_namespace() {
+ // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.csharp_namespace)
+ clear_has_csharp_namespace();
+ return csharp_namespace_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void FileOptions::set_allocated_csharp_namespace(::std::string* csharp_namespace) {
+ if (csharp_namespace != NULL) {
+ set_has_csharp_namespace();
+ } else {
+ clear_has_csharp_namespace();
+ }
+ csharp_namespace_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), csharp_namespace);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.csharp_namespace)
+}
+
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int FileOptions::uninterpreted_option_size() const {
return uninterpreted_option_.size();
@@ -5429,16 +6264,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.FileOptions.uninterpreted_option)
return uninterpreted_option_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
-FileOptions::uninterpreted_option() const {
- // @@protoc_insertion_point(field_list:google.protobuf.FileOptions.uninterpreted_option)
- return uninterpreted_option_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
FileOptions::mutable_uninterpreted_option() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.FileOptions.uninterpreted_option)
return &uninterpreted_option_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
+FileOptions::uninterpreted_option() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.FileOptions.uninterpreted_option)
+ return uninterpreted_option_;
+}
// -------------------------------------------------------------------
@@ -5516,6 +6351,30 @@
// @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.deprecated)
}
+// optional bool map_entry = 7;
+inline bool MessageOptions::has_map_entry() const {
+ return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void MessageOptions::set_has_map_entry() {
+ _has_bits_[0] |= 0x00000008u;
+}
+inline void MessageOptions::clear_has_map_entry() {
+ _has_bits_[0] &= ~0x00000008u;
+}
+inline void MessageOptions::clear_map_entry() {
+ map_entry_ = false;
+ clear_has_map_entry();
+}
+inline bool MessageOptions::map_entry() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.map_entry)
+ return map_entry_;
+}
+inline void MessageOptions::set_map_entry(bool value) {
+ set_has_map_entry();
+ map_entry_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.map_entry)
+}
+
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int MessageOptions::uninterpreted_option_size() const {
return uninterpreted_option_.size();
@@ -5535,16 +6394,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.MessageOptions.uninterpreted_option)
return uninterpreted_option_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
-MessageOptions::uninterpreted_option() const {
- // @@protoc_insertion_point(field_list:google.protobuf.MessageOptions.uninterpreted_option)
- return uninterpreted_option_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
MessageOptions::mutable_uninterpreted_option() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.MessageOptions.uninterpreted_option)
return &uninterpreted_option_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
+MessageOptions::uninterpreted_option() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.MessageOptions.uninterpreted_option)
+ return uninterpreted_option_;
+}
// -------------------------------------------------------------------
@@ -5599,16 +6458,41 @@
// @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.packed)
}
-// optional bool lazy = 5 [default = false];
-inline bool FieldOptions::has_lazy() const {
+// optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
+inline bool FieldOptions::has_jstype() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
-inline void FieldOptions::set_has_lazy() {
+inline void FieldOptions::set_has_jstype() {
_has_bits_[0] |= 0x00000004u;
}
-inline void FieldOptions::clear_has_lazy() {
+inline void FieldOptions::clear_has_jstype() {
_has_bits_[0] &= ~0x00000004u;
}
+inline void FieldOptions::clear_jstype() {
+ jstype_ = 0;
+ clear_has_jstype();
+}
+inline ::google::protobuf::FieldOptions_JSType FieldOptions::jstype() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.jstype)
+ return static_cast< ::google::protobuf::FieldOptions_JSType >(jstype_);
+}
+inline void FieldOptions::set_jstype(::google::protobuf::FieldOptions_JSType value) {
+ assert(::google::protobuf::FieldOptions_JSType_IsValid(value));
+ set_has_jstype();
+ jstype_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.jstype)
+}
+
+// optional bool lazy = 5 [default = false];
+inline bool FieldOptions::has_lazy() const {
+ return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void FieldOptions::set_has_lazy() {
+ _has_bits_[0] |= 0x00000008u;
+}
+inline void FieldOptions::clear_has_lazy() {
+ _has_bits_[0] &= ~0x00000008u;
+}
inline void FieldOptions::clear_lazy() {
lazy_ = false;
clear_has_lazy();
@@ -5625,13 +6509,13 @@
// optional bool deprecated = 3 [default = false];
inline bool FieldOptions::has_deprecated() const {
- return (_has_bits_[0] & 0x00000008u) != 0;
+ return (_has_bits_[0] & 0x00000010u) != 0;
}
inline void FieldOptions::set_has_deprecated() {
- _has_bits_[0] |= 0x00000008u;
+ _has_bits_[0] |= 0x00000010u;
}
inline void FieldOptions::clear_has_deprecated() {
- _has_bits_[0] &= ~0x00000008u;
+ _has_bits_[0] &= ~0x00000010u;
}
inline void FieldOptions::clear_deprecated() {
deprecated_ = false;
@@ -5647,82 +6531,6 @@
// @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.deprecated)
}
-// optional string experimental_map_key = 9;
-inline bool FieldOptions::has_experimental_map_key() const {
- return (_has_bits_[0] & 0x00000010u) != 0;
-}
-inline void FieldOptions::set_has_experimental_map_key() {
- _has_bits_[0] |= 0x00000010u;
-}
-inline void FieldOptions::clear_has_experimental_map_key() {
- _has_bits_[0] &= ~0x00000010u;
-}
-inline void FieldOptions::clear_experimental_map_key() {
- if (experimental_map_key_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- experimental_map_key_->clear();
- }
- clear_has_experimental_map_key();
-}
-inline const ::std::string& FieldOptions::experimental_map_key() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.experimental_map_key)
- return *experimental_map_key_;
-}
-inline void FieldOptions::set_experimental_map_key(const ::std::string& value) {
- set_has_experimental_map_key();
- if (experimental_map_key_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- experimental_map_key_ = new ::std::string;
- }
- experimental_map_key_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.experimental_map_key)
-}
-inline void FieldOptions::set_experimental_map_key(const char* value) {
- set_has_experimental_map_key();
- if (experimental_map_key_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- experimental_map_key_ = new ::std::string;
- }
- experimental_map_key_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.FieldOptions.experimental_map_key)
-}
-inline void FieldOptions::set_experimental_map_key(const char* value, size_t size) {
- set_has_experimental_map_key();
- if (experimental_map_key_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- experimental_map_key_ = new ::std::string;
- }
- experimental_map_key_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldOptions.experimental_map_key)
-}
-inline ::std::string* FieldOptions::mutable_experimental_map_key() {
- set_has_experimental_map_key();
- if (experimental_map_key_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- experimental_map_key_ = new ::std::string;
- }
- // @@protoc_insertion_point(field_mutable:google.protobuf.FieldOptions.experimental_map_key)
- return experimental_map_key_;
-}
-inline ::std::string* FieldOptions::release_experimental_map_key() {
- clear_has_experimental_map_key();
- if (experimental_map_key_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = experimental_map_key_;
- experimental_map_key_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
-}
-inline void FieldOptions::set_allocated_experimental_map_key(::std::string* experimental_map_key) {
- if (experimental_map_key_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete experimental_map_key_;
- }
- if (experimental_map_key) {
- set_has_experimental_map_key();
- experimental_map_key_ = experimental_map_key;
- } else {
- clear_has_experimental_map_key();
- experimental_map_key_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldOptions.experimental_map_key)
-}
-
// optional bool weak = 10 [default = false];
inline bool FieldOptions::has_weak() const {
return (_has_bits_[0] & 0x00000020u) != 0;
@@ -5766,16 +6574,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.FieldOptions.uninterpreted_option)
return uninterpreted_option_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
-FieldOptions::uninterpreted_option() const {
- // @@protoc_insertion_point(field_list:google.protobuf.FieldOptions.uninterpreted_option)
- return uninterpreted_option_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
FieldOptions::mutable_uninterpreted_option() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.FieldOptions.uninterpreted_option)
return &uninterpreted_option_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
+FieldOptions::uninterpreted_option() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.FieldOptions.uninterpreted_option)
+ return uninterpreted_option_;
+}
// -------------------------------------------------------------------
@@ -5848,16 +6656,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.EnumOptions.uninterpreted_option)
return uninterpreted_option_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
-EnumOptions::uninterpreted_option() const {
- // @@protoc_insertion_point(field_list:google.protobuf.EnumOptions.uninterpreted_option)
- return uninterpreted_option_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
EnumOptions::mutable_uninterpreted_option() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumOptions.uninterpreted_option)
return &uninterpreted_option_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
+EnumOptions::uninterpreted_option() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.EnumOptions.uninterpreted_option)
+ return uninterpreted_option_;
+}
// -------------------------------------------------------------------
@@ -5906,16 +6714,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.EnumValueOptions.uninterpreted_option)
return uninterpreted_option_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
-EnumValueOptions::uninterpreted_option() const {
- // @@protoc_insertion_point(field_list:google.protobuf.EnumValueOptions.uninterpreted_option)
- return uninterpreted_option_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
EnumValueOptions::mutable_uninterpreted_option() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValueOptions.uninterpreted_option)
return &uninterpreted_option_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
+EnumValueOptions::uninterpreted_option() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.EnumValueOptions.uninterpreted_option)
+ return uninterpreted_option_;
+}
// -------------------------------------------------------------------
@@ -5964,16 +6772,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.ServiceOptions.uninterpreted_option)
return uninterpreted_option_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
-ServiceOptions::uninterpreted_option() const {
- // @@protoc_insertion_point(field_list:google.protobuf.ServiceOptions.uninterpreted_option)
- return uninterpreted_option_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
ServiceOptions::mutable_uninterpreted_option() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.ServiceOptions.uninterpreted_option)
return &uninterpreted_option_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
+ServiceOptions::uninterpreted_option() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.ServiceOptions.uninterpreted_option)
+ return uninterpreted_option_;
+}
// -------------------------------------------------------------------
@@ -6022,16 +6830,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.MethodOptions.uninterpreted_option)
return uninterpreted_option_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
-MethodOptions::uninterpreted_option() const {
- // @@protoc_insertion_point(field_list:google.protobuf.MethodOptions.uninterpreted_option)
- return uninterpreted_option_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
MethodOptions::mutable_uninterpreted_option() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.MethodOptions.uninterpreted_option)
return &uninterpreted_option_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
+MethodOptions::uninterpreted_option() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.MethodOptions.uninterpreted_option)
+ return uninterpreted_option_;
+}
// -------------------------------------------------------------------
@@ -6048,68 +6856,46 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void UninterpretedOption_NamePart::clear_name_part() {
- if (name_part_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_part_->clear();
- }
+ name_part_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name_part();
}
inline const ::std::string& UninterpretedOption_NamePart::name_part() const {
// @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.NamePart.name_part)
- return *name_part_;
+ return name_part_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void UninterpretedOption_NamePart::set_name_part(const ::std::string& value) {
set_has_name_part();
- if (name_part_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_part_ = new ::std::string;
- }
- name_part_->assign(value);
+ name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.NamePart.name_part)
}
inline void UninterpretedOption_NamePart::set_name_part(const char* value) {
set_has_name_part();
- if (name_part_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_part_ = new ::std::string;
- }
- name_part_->assign(value);
+ name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@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) {
set_has_name_part();
- if (name_part_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_part_ = new ::std::string;
- }
- name_part_->assign(reinterpret_cast<const char*>(value), size);
+ name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.NamePart.name_part)
}
inline ::std::string* UninterpretedOption_NamePart::mutable_name_part() {
set_has_name_part();
- if (name_part_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_part_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.NamePart.name_part)
- return name_part_;
+ return name_part_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* UninterpretedOption_NamePart::release_name_part() {
+ // @@protoc_insertion_point(field_release:google.protobuf.UninterpretedOption.NamePart.name_part)
clear_has_name_part();
- if (name_part_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = name_part_;
- name_part_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return name_part_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void UninterpretedOption_NamePart::set_allocated_name_part(::std::string* name_part) {
- if (name_part_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete name_part_;
- }
- if (name_part) {
+ if (name_part != NULL) {
set_has_name_part();
- name_part_ = name_part;
} else {
clear_has_name_part();
- name_part_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ name_part_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_part);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.NamePart.name_part)
}
@@ -6160,16 +6946,16 @@
// @@protoc_insertion_point(field_add:google.protobuf.UninterpretedOption.name)
return name_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >&
-UninterpretedOption::name() const {
- // @@protoc_insertion_point(field_list:google.protobuf.UninterpretedOption.name)
- return name_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >*
UninterpretedOption::mutable_name() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.UninterpretedOption.name)
return &name_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >&
+UninterpretedOption::name() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.UninterpretedOption.name)
+ return name_;
+}
// optional string identifier_value = 3;
inline bool UninterpretedOption::has_identifier_value() const {
@@ -6182,68 +6968,46 @@
_has_bits_[0] &= ~0x00000002u;
}
inline void UninterpretedOption::clear_identifier_value() {
- if (identifier_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- identifier_value_->clear();
- }
+ identifier_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_identifier_value();
}
inline const ::std::string& UninterpretedOption::identifier_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.identifier_value)
- return *identifier_value_;
+ return identifier_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void UninterpretedOption::set_identifier_value(const ::std::string& value) {
set_has_identifier_value();
- if (identifier_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- identifier_value_ = new ::std::string;
- }
- identifier_value_->assign(value);
+ identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.identifier_value)
}
inline void UninterpretedOption::set_identifier_value(const char* value) {
set_has_identifier_value();
- if (identifier_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- identifier_value_ = new ::std::string;
- }
- identifier_value_->assign(value);
+ identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.identifier_value)
}
inline void UninterpretedOption::set_identifier_value(const char* value, size_t size) {
set_has_identifier_value();
- if (identifier_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- identifier_value_ = new ::std::string;
- }
- identifier_value_->assign(reinterpret_cast<const char*>(value), size);
+ identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.identifier_value)
}
inline ::std::string* UninterpretedOption::mutable_identifier_value() {
set_has_identifier_value();
- if (identifier_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- identifier_value_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.identifier_value)
- return identifier_value_;
+ return identifier_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* UninterpretedOption::release_identifier_value() {
+ // @@protoc_insertion_point(field_release:google.protobuf.UninterpretedOption.identifier_value)
clear_has_identifier_value();
- if (identifier_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = identifier_value_;
- identifier_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return identifier_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void UninterpretedOption::set_allocated_identifier_value(::std::string* identifier_value) {
- if (identifier_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete identifier_value_;
- }
- if (identifier_value) {
+ if (identifier_value != NULL) {
set_has_identifier_value();
- identifier_value_ = identifier_value;
} else {
clear_has_identifier_value();
- identifier_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ identifier_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), identifier_value);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.identifier_value)
}
@@ -6330,68 +7094,46 @@
_has_bits_[0] &= ~0x00000020u;
}
inline void UninterpretedOption::clear_string_value() {
- if (string_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- string_value_->clear();
- }
+ string_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_string_value();
}
inline const ::std::string& UninterpretedOption::string_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.string_value)
- return *string_value_;
+ return string_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void UninterpretedOption::set_string_value(const ::std::string& value) {
set_has_string_value();
- if (string_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- string_value_ = new ::std::string;
- }
- string_value_->assign(value);
+ string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.string_value)
}
inline void UninterpretedOption::set_string_value(const char* value) {
set_has_string_value();
- if (string_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- string_value_ = new ::std::string;
- }
- string_value_->assign(value);
+ string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.string_value)
}
inline void UninterpretedOption::set_string_value(const void* value, size_t size) {
set_has_string_value();
- if (string_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- string_value_ = new ::std::string;
- }
- string_value_->assign(reinterpret_cast<const char*>(value), size);
+ string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.string_value)
}
inline ::std::string* UninterpretedOption::mutable_string_value() {
set_has_string_value();
- if (string_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- string_value_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.string_value)
- return string_value_;
+ return string_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* UninterpretedOption::release_string_value() {
+ // @@protoc_insertion_point(field_release:google.protobuf.UninterpretedOption.string_value)
clear_has_string_value();
- if (string_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = string_value_;
- string_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return string_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void UninterpretedOption::set_allocated_string_value(::std::string* string_value) {
- if (string_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete string_value_;
- }
- if (string_value) {
+ if (string_value != NULL) {
set_has_string_value();
- string_value_ = string_value;
} else {
clear_has_string_value();
- string_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ string_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), string_value);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.string_value)
}
@@ -6406,68 +7148,46 @@
_has_bits_[0] &= ~0x00000040u;
}
inline void UninterpretedOption::clear_aggregate_value() {
- if (aggregate_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- aggregate_value_->clear();
- }
+ aggregate_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_aggregate_value();
}
inline const ::std::string& UninterpretedOption::aggregate_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.aggregate_value)
- return *aggregate_value_;
+ return aggregate_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void UninterpretedOption::set_aggregate_value(const ::std::string& value) {
set_has_aggregate_value();
- if (aggregate_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- aggregate_value_ = new ::std::string;
- }
- aggregate_value_->assign(value);
+ aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.aggregate_value)
}
inline void UninterpretedOption::set_aggregate_value(const char* value) {
set_has_aggregate_value();
- if (aggregate_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- aggregate_value_ = new ::std::string;
- }
- aggregate_value_->assign(value);
+ aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.aggregate_value)
}
inline void UninterpretedOption::set_aggregate_value(const char* value, size_t size) {
set_has_aggregate_value();
- if (aggregate_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- aggregate_value_ = new ::std::string;
- }
- aggregate_value_->assign(reinterpret_cast<const char*>(value), size);
+ aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.aggregate_value)
}
inline ::std::string* UninterpretedOption::mutable_aggregate_value() {
set_has_aggregate_value();
- if (aggregate_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- aggregate_value_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.aggregate_value)
- return aggregate_value_;
+ return aggregate_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* UninterpretedOption::release_aggregate_value() {
+ // @@protoc_insertion_point(field_release:google.protobuf.UninterpretedOption.aggregate_value)
clear_has_aggregate_value();
- if (aggregate_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = aggregate_value_;
- aggregate_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return aggregate_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void UninterpretedOption::set_allocated_aggregate_value(::std::string* aggregate_value) {
- if (aggregate_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete aggregate_value_;
- }
- if (aggregate_value) {
+ if (aggregate_value != NULL) {
set_has_aggregate_value();
- aggregate_value_ = aggregate_value;
} else {
clear_has_aggregate_value();
- aggregate_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ aggregate_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), aggregate_value);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.aggregate_value)
}
@@ -6546,68 +7266,46 @@
_has_bits_[0] &= ~0x00000004u;
}
inline void SourceCodeInfo_Location::clear_leading_comments() {
- if (leading_comments_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- leading_comments_->clear();
- }
+ leading_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_leading_comments();
}
inline const ::std::string& SourceCodeInfo_Location::leading_comments() const {
// @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_comments)
- return *leading_comments_;
+ return leading_comments_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void SourceCodeInfo_Location::set_leading_comments(const ::std::string& value) {
set_has_leading_comments();
- if (leading_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- leading_comments_ = new ::std::string;
- }
- leading_comments_->assign(value);
+ leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_comments)
}
inline void SourceCodeInfo_Location::set_leading_comments(const char* value) {
set_has_leading_comments();
- if (leading_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- leading_comments_ = new ::std::string;
- }
- leading_comments_->assign(value);
+ leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@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) {
set_has_leading_comments();
- if (leading_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- leading_comments_ = new ::std::string;
- }
- leading_comments_->assign(reinterpret_cast<const char*>(value), size);
+ leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.leading_comments)
}
inline ::std::string* SourceCodeInfo_Location::mutable_leading_comments() {
set_has_leading_comments();
- if (leading_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- leading_comments_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_comments)
- return leading_comments_;
+ return leading_comments_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* SourceCodeInfo_Location::release_leading_comments() {
+ // @@protoc_insertion_point(field_release:google.protobuf.SourceCodeInfo.Location.leading_comments)
clear_has_leading_comments();
- if (leading_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = leading_comments_;
- leading_comments_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return leading_comments_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void SourceCodeInfo_Location::set_allocated_leading_comments(::std::string* leading_comments) {
- if (leading_comments_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete leading_comments_;
- }
- if (leading_comments) {
+ if (leading_comments != NULL) {
set_has_leading_comments();
- leading_comments_ = leading_comments;
} else {
clear_has_leading_comments();
- leading_comments_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ leading_comments_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), leading_comments);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.leading_comments)
}
@@ -6622,71 +7320,104 @@
_has_bits_[0] &= ~0x00000008u;
}
inline void SourceCodeInfo_Location::clear_trailing_comments() {
- if (trailing_comments_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- trailing_comments_->clear();
- }
+ trailing_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_trailing_comments();
}
inline const ::std::string& SourceCodeInfo_Location::trailing_comments() const {
// @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.trailing_comments)
- return *trailing_comments_;
+ return trailing_comments_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void SourceCodeInfo_Location::set_trailing_comments(const ::std::string& value) {
set_has_trailing_comments();
- if (trailing_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- trailing_comments_ = new ::std::string;
- }
- trailing_comments_->assign(value);
+ trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.trailing_comments)
}
inline void SourceCodeInfo_Location::set_trailing_comments(const char* value) {
set_has_trailing_comments();
- if (trailing_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- trailing_comments_ = new ::std::string;
- }
- trailing_comments_->assign(value);
+ trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@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) {
set_has_trailing_comments();
- if (trailing_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- trailing_comments_ = new ::std::string;
- }
- trailing_comments_->assign(reinterpret_cast<const char*>(value), size);
+ trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.trailing_comments)
}
inline ::std::string* SourceCodeInfo_Location::mutable_trailing_comments() {
set_has_trailing_comments();
- if (trailing_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- trailing_comments_ = new ::std::string;
- }
// @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.trailing_comments)
- return trailing_comments_;
+ return trailing_comments_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* SourceCodeInfo_Location::release_trailing_comments() {
+ // @@protoc_insertion_point(field_release:google.protobuf.SourceCodeInfo.Location.trailing_comments)
clear_has_trailing_comments();
- if (trailing_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = trailing_comments_;
- trailing_comments_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
+ return trailing_comments_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void SourceCodeInfo_Location::set_allocated_trailing_comments(::std::string* trailing_comments) {
- if (trailing_comments_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete trailing_comments_;
- }
- if (trailing_comments) {
+ if (trailing_comments != NULL) {
set_has_trailing_comments();
- trailing_comments_ = trailing_comments;
} else {
clear_has_trailing_comments();
- trailing_comments_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
+ trailing_comments_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), trailing_comments);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.trailing_comments)
}
+// repeated string leading_detached_comments = 6;
+inline int SourceCodeInfo_Location::leading_detached_comments_size() const {
+ return leading_detached_comments_.size();
+}
+inline void SourceCodeInfo_Location::clear_leading_detached_comments() {
+ leading_detached_comments_.Clear();
+}
+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) {
+ // @@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) {
+ // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
+ leading_detached_comments_.Mutable(index)->assign(value);
+}
+inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value) {
+ leading_detached_comments_.Mutable(index)->assign(value);
+ // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
+}
+inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value, size_t size) {
+ leading_detached_comments_.Mutable(index)->assign(
+ reinterpret_cast<const char*>(value), size);
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.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) {
+ leading_detached_comments_.Add()->assign(value);
+ // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
+}
+inline void SourceCodeInfo_Location::add_leading_detached_comments(const char* value) {
+ leading_detached_comments_.Add()->assign(value);
+ // @@protoc_insertion_point(field_add_char:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
+}
+inline void SourceCodeInfo_Location::add_leading_detached_comments(const char* value, size_t size) {
+ leading_detached_comments_.Add()->assign(reinterpret_cast<const char*>(value), size);
+ // @@protoc_insertion_point(field_add_pointer:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
+}
+inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
+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>*
+SourceCodeInfo_Location::mutable_leading_detached_comments() {
+ // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
+ return &leading_detached_comments_;
+}
+
// -------------------------------------------------------------------
// SourceCodeInfo
@@ -6710,16 +7441,233 @@
// @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.location)
return location_.Add();
}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >&
-SourceCodeInfo::location() const {
- // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.location)
- return location_;
-}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >*
SourceCodeInfo::mutable_location() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.location)
return &location_;
}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >&
+SourceCodeInfo::location() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.location)
+ return location_;
+}
+
+// -------------------------------------------------------------------
+
+// GeneratedCodeInfo_Annotation
+
+// repeated int32 path = 1 [packed = true];
+inline int GeneratedCodeInfo_Annotation::path_size() const {
+ return path_.size();
+}
+inline void GeneratedCodeInfo_Annotation::clear_path() {
+ path_.Clear();
+}
+inline ::google::protobuf::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) {
+ path_.Set(index, value);
+ // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.path)
+}
+inline void GeneratedCodeInfo_Annotation::add_path(::google::protobuf::int32 value) {
+ path_.Add(value);
+ // @@protoc_insertion_point(field_add:google.protobuf.GeneratedCodeInfo.Annotation.path)
+}
+inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
+GeneratedCodeInfo_Annotation::path() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.GeneratedCodeInfo.Annotation.path)
+ return path_;
+}
+inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
+GeneratedCodeInfo_Annotation::mutable_path() {
+ // @@protoc_insertion_point(field_mutable_list:google.protobuf.GeneratedCodeInfo.Annotation.path)
+ return &path_;
+}
+
+// optional string source_file = 2;
+inline bool GeneratedCodeInfo_Annotation::has_source_file() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void GeneratedCodeInfo_Annotation::set_has_source_file() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void GeneratedCodeInfo_Annotation::clear_has_source_file() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void GeneratedCodeInfo_Annotation::clear_source_file() {
+ source_file_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ clear_has_source_file();
+}
+inline const ::std::string& GeneratedCodeInfo_Annotation::source_file() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
+ return source_file_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void GeneratedCodeInfo_Annotation::set_source_file(const ::std::string& value) {
+ set_has_source_file();
+ source_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
+}
+inline void GeneratedCodeInfo_Annotation::set_source_file(const char* value) {
+ set_has_source_file();
+ source_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@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) {
+ set_has_source_file();
+ source_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
+}
+inline ::std::string* GeneratedCodeInfo_Annotation::mutable_source_file() {
+ set_has_source_file();
+ // @@protoc_insertion_point(field_mutable:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
+ return source_file_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* GeneratedCodeInfo_Annotation::release_source_file() {
+ // @@protoc_insertion_point(field_release:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
+ clear_has_source_file();
+ return source_file_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void GeneratedCodeInfo_Annotation::set_allocated_source_file(::std::string* source_file) {
+ if (source_file != NULL) {
+ set_has_source_file();
+ } else {
+ clear_has_source_file();
+ }
+ source_file_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), source_file);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
+}
+
+// optional int32 begin = 3;
+inline bool GeneratedCodeInfo_Annotation::has_begin() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void GeneratedCodeInfo_Annotation::set_has_begin() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void GeneratedCodeInfo_Annotation::clear_has_begin() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void GeneratedCodeInfo_Annotation::clear_begin() {
+ begin_ = 0;
+ clear_has_begin();
+}
+inline ::google::protobuf::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) {
+ set_has_begin();
+ begin_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.begin)
+}
+
+// optional int32 end = 4;
+inline bool GeneratedCodeInfo_Annotation::has_end() const {
+ return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void GeneratedCodeInfo_Annotation::set_has_end() {
+ _has_bits_[0] |= 0x00000008u;
+}
+inline void GeneratedCodeInfo_Annotation::clear_has_end() {
+ _has_bits_[0] &= ~0x00000008u;
+}
+inline void GeneratedCodeInfo_Annotation::clear_end() {
+ end_ = 0;
+ clear_has_end();
+}
+inline ::google::protobuf::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) {
+ set_has_end();
+ end_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.end)
+}
+
+// -------------------------------------------------------------------
+
+// GeneratedCodeInfo
+
+// repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
+inline int GeneratedCodeInfo::annotation_size() const {
+ return annotation_.size();
+}
+inline void GeneratedCodeInfo::clear_annotation() {
+ annotation_.Clear();
+}
+inline const ::google::protobuf::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::mutable_annotation(int index) {
+ // @@protoc_insertion_point(field_mutable:google.protobuf.GeneratedCodeInfo.annotation)
+ return annotation_.Mutable(index);
+}
+inline ::google::protobuf::GeneratedCodeInfo_Annotation* GeneratedCodeInfo::add_annotation() {
+ // @@protoc_insertion_point(field_add:google.protobuf.GeneratedCodeInfo.annotation)
+ return annotation_.Add();
+}
+inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::GeneratedCodeInfo_Annotation >*
+GeneratedCodeInfo::mutable_annotation() {
+ // @@protoc_insertion_point(field_mutable_list:google.protobuf.GeneratedCodeInfo.annotation)
+ return &annotation_;
+}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::GeneratedCodeInfo_Annotation >&
+GeneratedCodeInfo::annotation() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.GeneratedCodeInfo.annotation)
+ return annotation_;
+}
+
+#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope)
@@ -6751,9 +7699,14 @@
inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::FieldOptions_CType>() {
return ::google::protobuf::FieldOptions_CType_descriptor();
}
+template <> struct is_proto_enum< ::google::protobuf::FieldOptions_JSType> : ::google::protobuf::internal::true_type {};
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::FieldOptions_JSType>() {
+ return ::google::protobuf::FieldOptions_JSType_descriptor();
+}
-} // namespace google
} // namespace protobuf
+} // namespace google
#endif // SWIG
// @@protoc_insertion_point(global_scope)
diff --git a/darwin-x86_64/protoc/include/google/protobuf/descriptor.proto b/darwin-x86_64/protoc/include/google/protobuf/descriptor.proto
index a753601..08b1555 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/descriptor.proto
+++ b/darwin-x86_64/protoc/include/google/protobuf/descriptor.proto
@@ -37,10 +37,14 @@
// without any other information (e.g. without reading its imports).
+syntax = "proto2";
package google.protobuf;
+option go_package = "descriptor";
option java_package = "com.google.protobuf";
option java_outer_classname = "DescriptorProtos";
+option csharp_namespace = "Google.Protobuf.Reflection";
+option objc_class_prefix = "GPB";
// descriptor.proto must be optimized for speed because reflection-based
// algorithms don't work during bootstrapping.
@@ -74,10 +78,14 @@
optional FileOptions options = 8;
// This field contains optional information about the original source code.
- // You may safely remove this entire field whithout harming runtime
+ // You may safely remove this entire field without harming runtime
// functionality of the descriptors -- the information is needed only by
// development tools.
optional SourceCodeInfo source_code_info = 9;
+
+ // The syntax of the proto file.
+ // The supported values are "proto2" and "proto3".
+ optional string syntax = 12;
}
// Describes a message type.
@@ -99,6 +107,18 @@
repeated OneofDescriptorProto oneof_decl = 8;
optional MessageOptions options = 7;
+
+ // Range of reserved tag numbers. Reserved tag numbers may not be used by
+ // fields or extension ranges in the same message. Reserved ranges may
+ // not overlap.
+ message ReservedRange {
+ optional int32 start = 1; // Inclusive.
+ optional int32 end = 2; // Exclusive.
+ }
+ repeated ReservedRange reserved_range = 9;
+ // Reserved field names, which may not be used by fields in the same message.
+ // A given name may only be reserved once.
+ repeated string reserved_name = 10;
}
// Describes a field within a message.
@@ -167,11 +187,15 @@
optional string default_value = 7;
// If set, gives the index of a oneof in the containing type's oneof_decl
- // list. This field is a member of that oneof. Extensions of a oneof should
- // not set this since the oneof to which they belong will be inferred based
- // on the extension range containing the extension's field number.
+ // list. This field is a member of that oneof.
optional int32 oneof_index = 9;
+ // JSON name of this field. The value is set by protocol compiler. If the
+ // user has set a "json_name" option on this field, that option's value
+ // will be used. Otherwise, it's deduced from the field's name by converting
+ // it to camelCase.
+ optional string json_name = 10;
+
optional FieldOptions options = 8;
}
@@ -215,6 +239,11 @@
optional string output_type = 3;
optional MethodOptions options = 4;
+
+ // Identifies if client streams multiple client messages
+ optional bool client_streaming = 5 [default=false];
+ // Identifies if server streams multiple server messages
+ optional bool server_streaming = 6 [default=false];
}
@@ -241,11 +270,11 @@
// * For options which will be published and used publicly by multiple
// independent entities, e-mail protobuf-global-extension-registry@google.com
// to reserve extension numbers. Simply provide your project name (e.g.
-// Object-C plugin) and your porject website (if available) -- there's no need
-// to explain how you intend to use them. Usually you only need one extension
-// number. You can declare multiple options with only one extension number by
-// putting them in a sub-message. See the Custom Options section of the docs
-// for examples:
+// Objective-C plugin) and your project website (if available) -- there's no
+// need to explain how you intend to use them. Usually you only need one
+// extension number. You can declare multiple options with only one extension
+// number by putting them in a sub-message. See the Custom Options section of
+// the docs for examples:
// https://developers.google.com/protocol-buffers/docs/proto#options
// If this turns out to be popular, a web service will be set up
// to automatically assign option numbers.
@@ -277,10 +306,12 @@
// If set true, then the Java code generator will generate equals() and
// hashCode() methods for all messages defined in the .proto file.
- // - In the full runtime, this is purely a speed optimization, as the
+ // This increases generated code size, potentially substantially for large
+ // protos, which may harm a memory-constrained application.
+ // - In the full runtime this is a speed optimization, as the
// AbstractMessage base class includes reflection-based implementations of
// these methods.
- //- In the lite runtime, setting this option changes the semantics of
+ // - In the lite runtime, setting this option changes the semantics of
// equals() and hashCode() to more closely match those of the full runtime;
// the generated methods compute their results based on field values rather
// than object identity. (Implementations should not assume that hashcodes
@@ -306,7 +337,10 @@
optional OptimizeMode optimize_for = 9 [default=SPEED];
// Sets the Go package where structs generated from this .proto will be
- // placed. There is no default.
+ // placed. If omitted, the Go package will be derived from the following:
+ // - The basename of the package import path, if provided.
+ // - Otherwise, the package statement in the .proto file, if present.
+ // - Otherwise, the basename of the .proto file, without extension.
optional string go_package = 11;
@@ -315,7 +349,7 @@
// are not specific to any particular RPC system. They are generated by the
// main code generators in each language (without additional plugins).
// Generic services were the only kind of service generation supported by
- // early versions of proto2.
+ // early versions of google.protobuf.
//
// Generic services are now considered deprecated in favor of using plugins
// that generate code specific to your particular RPC system. Therefore,
@@ -331,12 +365,25 @@
// least, this is a formalization for deprecating files.
optional bool deprecated = 23 [default=false];
+ // Enables the use of arenas for the proto messages in this file. This applies
+ // only to generated classes for C++.
+ optional bool cc_enable_arenas = 31 [default=false];
+
+
+ // Sets the objective c class prefix which is prepended to all objective c
+ // generated classes from this .proto. There is no default.
+ optional string objc_class_prefix = 36;
+
+ // Namespace for generated classes; defaults to the package.
+ optional string csharp_namespace = 37;
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
// Clients can define custom options in extensions of this message. See above.
extensions 1000 to max;
+
+ reserved 38;
}
message MessageOptions {
@@ -371,6 +418,29 @@
// this is a formalization for deprecating messages.
optional bool deprecated = 3 [default=false];
+ // Whether the message is an automatically generated map entry type for the
+ // maps field.
+ //
+ // For maps fields:
+ // map<KeyType, ValueType> map_field = 1;
+ // The parsed descriptor looks like:
+ // message MapFieldEntry {
+ // option map_entry = true;
+ // optional KeyType key = 1;
+ // optional ValueType value = 2;
+ // }
+ // repeated MapFieldEntry map_field = 1;
+ //
+ // Implementations may choose not to generate the map_entry=true message, but
+ // use a native map in the target language to hold the keys and values.
+ // The reflection APIs in such implementions still need to work as
+ // if the field is a repeated message field.
+ //
+ // NOTE: Do not set the option in .proto files. Always use the maps syntax
+ // instead. The option should only be implicitly set by the proto compiler
+ // parser.
+ optional bool map_entry = 7;
+
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
@@ -395,10 +465,31 @@
// The packed option can be enabled for repeated primitive fields to enable
// a more efficient representation on the wire. Rather than repeatedly
// writing the tag and type for each element, the entire array is encoded as
- // a single length-delimited blob.
+ // a single length-delimited blob. In proto3, only explicit setting it to
+ // false will avoid using packed encoding.
optional bool packed = 2;
+ // The jstype option determines the JavaScript type used for values of the
+ // field. The option is permitted only for 64 bit integral and fixed types
+ // (int64, uint64, sint64, fixed64, sfixed64). By default these types are
+ // represented as JavaScript strings. This avoids loss of precision that can
+ // happen when a large value is converted to a floating point JavaScript
+ // numbers. Specifying JS_NUMBER for the jstype causes the generated
+ // JavaScript code to use the JavaScript "number" type instead of strings.
+ // This option is an enum to permit additional types to be added,
+ // e.g. goog.math.Integer.
+ optional JSType jstype = 6 [default = JS_NORMAL];
+ enum JSType {
+ // Use the default type.
+ JS_NORMAL = 0;
+
+ // Use JavaScript strings.
+ JS_STRING = 1;
+
+ // Use JavaScript numbers.
+ JS_NUMBER = 2;
+ }
// Should this field be parsed lazily? Lazy applies only to message-type
// fields. It means that when the outer message is initially parsed, the
@@ -436,25 +527,10 @@
// is a formalization for deprecating fields.
optional bool deprecated = 3 [default=false];
- // EXPERIMENTAL. DO NOT USE.
- // For "map" fields, the name of the field in the enclosed type that
- // is the key for this map. For example, suppose we have:
- // message Item {
- // required string name = 1;
- // required string value = 2;
- // }
- // message Config {
- // repeated Item items = 1 [experimental_map_key="name"];
- // }
- // In this situation, the map key for Item will be set to "name".
- // TODO: Fully-implement this, then remove the "experimental_" prefix.
- optional string experimental_map_key = 9;
-
// For Google-internal migration only. Do not use.
optional bool weak = 10 [default=false];
-
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
@@ -654,6 +730,11 @@
// A series of line comments appearing on consecutive lines, with no other
// tokens appearing on those lines, will be treated as a single comment.
//
+ // leading_detached_comments will keep paragraphs of comments that appear
+ // before (but not connected to) the current element. Each paragraph,
+ // separated by empty lines, will be one comment element in the repeated
+ // field.
+ //
// Only the comment content is provided; comment markers (e.g. //) are
// stripped out. For block comments, leading whitespace and an asterisk
// will be stripped from the beginning of each line other than the first.
@@ -674,6 +755,12 @@
// // Another line attached to qux.
// optional double qux = 4;
//
+ // // Detached comment for corge. This is not leading or trailing comments
+ // // to qux or corge because there are blank lines separating it from
+ // // both.
+ //
+ // // Detached comment for corge paragraph 2.
+ //
// optional string corge = 5;
// /* Block comment attached
// * to corge. Leading asterisks
@@ -681,7 +768,36 @@
// /* Block comment attached to
// * grault. */
// optional int32 grault = 6;
+ //
+ // // ignored detached comments.
optional string leading_comments = 3;
optional string trailing_comments = 4;
+ repeated string leading_detached_comments = 6;
+ }
+}
+
+// Describes the relationship between generated code and its original source
+// file. A GeneratedCodeInfo message is associated with only one generated
+// source file, but may contain references to different source .proto files.
+message GeneratedCodeInfo {
+ // An Annotation connects some span of text in generated code to an element
+ // of its generating .proto file.
+ repeated Annotation annotation = 1;
+ message Annotation {
+ // Identifies the element in the original source .proto file. This field
+ // is formatted the same as SourceCodeInfo.Location.path.
+ repeated int32 path = 1 [packed=true];
+
+ // Identifies the filesystem path to the original source .proto.
+ optional string source_file = 2;
+
+ // Identifies the starting offset in bytes in the generated code
+ // that relates to the identified object.
+ optional int32 begin = 3;
+
+ // Identifies the ending offset in bytes in the generated code that
+ // relates to the identified offset. The end offset should be one past
+ // the last relevant byte (so the length of the text = end - begin).
+ optional int32 end = 4;
}
}
diff --git a/darwin-x86_64/protoc/include/google/protobuf/descriptor_database.h b/darwin-x86_64/protoc/include/google/protobuf/descriptor_database.h
index 934e402..86002d5 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/descriptor_database.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/descriptor_database.h
@@ -312,7 +312,7 @@
// A DescriptorDatabase that fetches files from a given pool.
class LIBPROTOBUF_EXPORT DescriptorPoolDatabase : public DescriptorDatabase {
public:
- DescriptorPoolDatabase(const DescriptorPool& pool);
+ explicit DescriptorPoolDatabase(const DescriptorPool& pool);
~DescriptorPoolDatabase();
// implements DescriptorDatabase -----------------------------------
@@ -341,7 +341,7 @@
// Merge more than two databases. The sources remain property of the caller.
// The vector may be deleted after the constructor returns but the
// DescriptorDatabases need to stick around.
- MergedDescriptorDatabase(const vector<DescriptorDatabase*>& sources);
+ explicit MergedDescriptorDatabase(const vector<DescriptorDatabase*>& sources);
~MergedDescriptorDatabase();
// implements DescriptorDatabase -----------------------------------
diff --git a/darwin-x86_64/protoc/include/google/protobuf/duration.pb.h b/darwin-x86_64/protoc/include/google/protobuf/duration.pb.h
new file mode 100644
index 0000000..215a52c
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/duration.pb.h
@@ -0,0 +1,172 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/protobuf/duration.proto
+
+#ifndef PROTOBUF_google_2fprotobuf_2fduration_2eproto__INCLUDED
+#define PROTOBUF_google_2fprotobuf_2fduration_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 3000000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/arena.h>
+#include <google/protobuf/arenastring.h>
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/metadata.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/unknown_field_set.h>
+// @@protoc_insertion_point(includes)
+
+namespace google {
+namespace protobuf {
+
+// Internal implementation detail -- do not call these.
+void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fduration_2eproto();
+void protobuf_AssignDesc_google_2fprotobuf_2fduration_2eproto();
+void protobuf_ShutdownFile_google_2fprotobuf_2fduration_2eproto();
+
+class Duration;
+
+// ===================================================================
+
+class LIBPROTOBUF_EXPORT Duration : public ::google::protobuf::Message {
+ public:
+ Duration();
+ virtual ~Duration();
+
+ Duration(const Duration& from);
+
+ inline Duration& operator=(const Duration& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const Duration& default_instance();
+
+ void Swap(Duration* other);
+
+ // implements Message ----------------------------------------------
+
+ inline Duration* New() const { return New(NULL); }
+
+ Duration* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const Duration& from);
+ void MergeFrom(const Duration& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(Duration* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional int64 seconds = 1;
+ void clear_seconds();
+ static const int kSecondsFieldNumber = 1;
+ ::google::protobuf::int64 seconds() const;
+ void set_seconds(::google::protobuf::int64 value);
+
+ // optional int32 nanos = 2;
+ void clear_nanos();
+ static const int kNanosFieldNumber = 2;
+ ::google::protobuf::int32 nanos() const;
+ void set_nanos(::google::protobuf::int32 value);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.Duration)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ bool _is_default_instance_;
+ ::google::protobuf::int64 seconds_;
+ ::google::protobuf::int32 nanos_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fduration_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fduration_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fduration_2eproto();
+
+ void InitAsDefaultInstance();
+ static Duration* default_instance_;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+#if !PROTOBUF_INLINE_NOT_IN_HEADERS
+// Duration
+
+// optional int64 seconds = 1;
+inline void Duration::clear_seconds() {
+ seconds_ = GOOGLE_LONGLONG(0);
+}
+inline ::google::protobuf::int64 Duration::seconds() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Duration.seconds)
+ return seconds_;
+}
+inline void Duration::set_seconds(::google::protobuf::int64 value) {
+
+ seconds_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.Duration.seconds)
+}
+
+// optional int32 nanos = 2;
+inline void Duration::clear_nanos() {
+ nanos_ = 0;
+}
+inline ::google::protobuf::int32 Duration::nanos() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Duration.nanos)
+ return nanos_;
+}
+inline void Duration::set_nanos(::google::protobuf::int32 value) {
+
+ nanos_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.Duration.nanos)
+}
+
+#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace protobuf
+} // namespace google
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_google_2fprotobuf_2fduration_2eproto__INCLUDED
diff --git a/darwin-x86_64/protoc/include/google/protobuf/duration.proto b/darwin-x86_64/protoc/include/google/protobuf/duration.proto
new file mode 100644
index 0000000..96c1796
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/duration.proto
@@ -0,0 +1,98 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option go_package = "github.com/golang/protobuf/ptypes/duration";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "DurationProto";
+option java_multiple_files = true;
+option java_generate_equals_and_hash = true;
+option objc_class_prefix = "GPB";
+
+// A Duration represents a signed, fixed-length span of time represented
+// as a count of seconds and fractions of seconds at nanosecond
+// resolution. It is independent of any calendar and concepts like "day"
+// or "month". It is related to Timestamp in that the difference between
+// two Timestamp values is a Duration and it can be added or subtracted
+// from a Timestamp. Range is approximately +-10,000 years.
+//
+// Example 1: Compute Duration from two Timestamps in pseudo code.
+//
+// Timestamp start = ...;
+// Timestamp end = ...;
+// Duration duration = ...;
+//
+// duration.seconds = end.seconds - start.seconds;
+// duration.nanos = end.nanos - start.nanos;
+//
+// if (duration.seconds < 0 && duration.nanos > 0) {
+// duration.seconds += 1;
+// duration.nanos -= 1000000000;
+// } else if (durations.seconds > 0 && duration.nanos < 0) {
+// duration.seconds -= 1;
+// duration.nanos += 1000000000;
+// }
+//
+// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
+//
+// Timestamp start = ...;
+// Duration duration = ...;
+// Timestamp end = ...;
+//
+// end.seconds = start.seconds + duration.seconds;
+// end.nanos = start.nanos + duration.nanos;
+//
+// if (end.nanos < 0) {
+// end.seconds -= 1;
+// end.nanos += 1000000000;
+// } else if (end.nanos >= 1000000000) {
+// end.seconds += 1;
+// end.nanos -= 1000000000;
+// }
+//
+//
+message Duration {
+
+ // Signed seconds of the span of time. Must be from -315,576,000,000
+ // to +315,576,000,000 inclusive.
+ int64 seconds = 1;
+
+ // Signed fractions of a second at nanosecond resolution of the span
+ // of time. Durations less than one second are represented with a 0
+ // `seconds` field and a positive or negative `nanos` field. For durations
+ // of one second or more, a non-zero value for the `nanos` field must be
+ // of the same sign as the `seconds` field. Must be from -999,999,999
+ // to +999,999,999 inclusive.
+ int32 nanos = 2;
+}
diff --git a/darwin-x86_64/protoc/include/google/protobuf/dynamic_message.h b/darwin-x86_64/protoc/include/google/protobuf/dynamic_message.h
index 10ed700..f74cd7d 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/dynamic_message.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/dynamic_message.h
@@ -39,9 +39,13 @@
#define GOOGLE_PROTOBUF_DYNAMIC_MESSAGE_H__
#include <memory>
+#ifndef _SHARED_PTR_H
+#include <google/protobuf/stubs/shared_ptr.h>
+#endif
#include <google/protobuf/message.h>
#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/mutex.h>
namespace google {
namespace protobuf {
@@ -123,7 +127,7 @@
// public header (for good reason), but dynamic_message.h is, and public
// headers may only #include other public headers.
struct PrototypeMap;
- scoped_ptr<PrototypeMap> prototypes_;
+ google::protobuf::scoped_ptr<PrototypeMap> prototypes_;
mutable Mutex prototypes_mutex_;
friend class DynamicMessage;
diff --git a/darwin-x86_64/protoc/include/google/protobuf/empty.pb.h b/darwin-x86_64/protoc/include/google/protobuf/empty.pb.h
new file mode 100644
index 0000000..868009f
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/empty.pb.h
@@ -0,0 +1,143 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/protobuf/empty.proto
+
+#ifndef PROTOBUF_google_2fprotobuf_2fempty_2eproto__INCLUDED
+#define PROTOBUF_google_2fprotobuf_2fempty_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 3000000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/arena.h>
+#include <google/protobuf/arenastring.h>
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/metadata.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/unknown_field_set.h>
+// @@protoc_insertion_point(includes)
+
+namespace google {
+namespace protobuf {
+
+// Internal implementation detail -- do not call these.
+void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fempty_2eproto();
+void protobuf_AssignDesc_google_2fprotobuf_2fempty_2eproto();
+void protobuf_ShutdownFile_google_2fprotobuf_2fempty_2eproto();
+
+class Empty;
+
+// ===================================================================
+
+class LIBPROTOBUF_EXPORT Empty : public ::google::protobuf::Message {
+ public:
+ Empty();
+ virtual ~Empty();
+
+ Empty(const Empty& from);
+
+ inline Empty& operator=(const Empty& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
+ inline void* GetMaybeArenaPointer() const {
+ return MaybeArenaPtr();
+ }
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const Empty& default_instance();
+
+ void UnsafeArenaSwap(Empty* other);
+ void Swap(Empty* other);
+
+ // implements Message ----------------------------------------------
+
+ inline Empty* New() const { return New(NULL); }
+
+ Empty* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const Empty& from);
+ void MergeFrom(const Empty& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(Empty* other);
+ protected:
+ explicit Empty(::google::protobuf::Arena* arena);
+ private:
+ static void ArenaDtor(void* object);
+ inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.Empty)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ friend class ::google::protobuf::Arena;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
+ bool _is_default_instance_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fempty_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fempty_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fempty_2eproto();
+
+ void InitAsDefaultInstance();
+ static Empty* default_instance_;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+#if !PROTOBUF_INLINE_NOT_IN_HEADERS
+// Empty
+
+#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace protobuf
+} // namespace google
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_google_2fprotobuf_2fempty_2eproto__INCLUDED
diff --git a/linux-x86_64/protoc/include/google/protobuf/io/strtod.h b/darwin-x86_64/protoc/include/google/protobuf/empty.proto
similarity index 66%
copy from linux-x86_64/protoc/include/google/protobuf/io/strtod.h
copy to darwin-x86_64/protoc/include/google/protobuf/empty.proto
index c2efc8d..37f4cd1 100644
--- a/linux-x86_64/protoc/include/google/protobuf/io/strtod.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/empty.proto
@@ -28,23 +28,26 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// A locale-independent version of strtod(), used to parse floating
-// point default values in .proto files, where the decimal separator
-// is always a dot.
+syntax = "proto3";
-#ifndef GOOGLE_PROTOBUF_IO_STRTOD_H__
-#define GOOGLE_PROTOBUF_IO_STRTOD_H__
+package google.protobuf;
-namespace google {
-namespace protobuf {
-namespace io {
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option go_package = "github.com/golang/protobuf/ptypes/empty";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "EmptyProto";
+option java_multiple_files = true;
+option java_generate_equals_and_hash = true;
+option objc_class_prefix = "GPB";
+option cc_enable_arenas = true;
-// A locale-independent version of the standard strtod(), which always
-// uses a dot as the decimal separator.
-double NoLocaleStrtod(const char* str, char** endptr);
-
-} // namespace io
-} // namespace protobuf
-
-} // namespace google
-#endif // GOOGLE_PROTOBUF_IO_STRTOD_H__
+// A generic empty message that you can re-use to avoid defining duplicated
+// empty messages in your APIs. A typical example is to use it as the request
+// or the response type of an API method. For instance:
+//
+// service Foo {
+// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
+// }
+//
+// The JSON representation for `Empty` is empty JSON object `{}`.
+message Empty {}
diff --git a/darwin-x86_64/protoc/include/google/protobuf/extension_set.h b/darwin-x86_64/protoc/include/google/protobuf/extension_set.h
index d7ec519..bca179b 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/extension_set.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/extension_set.h
@@ -45,12 +45,15 @@
#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/logging.h>
+#include <google/protobuf/stubs/once.h>
#include <google/protobuf/repeated_field.h>
namespace google {
namespace protobuf {
+ class Arena;
class Descriptor; // descriptor.h
class FieldDescriptor; // descriptor.h
class DescriptorPool; // descriptor.h
@@ -157,6 +160,7 @@
class LIBPROTOBUF_EXPORT ExtensionSet {
public:
ExtensionSet();
+ explicit ExtensionSet(::google::protobuf::Arena* arena);
~ExtensionSet();
// These are called at startup by protocol-compiler-generated code to
@@ -182,7 +186,7 @@
// is useful to implement Reflection::ListFields().
void AppendToList(const Descriptor* containing_type,
const DescriptorPool* pool,
- vector<const FieldDescriptor*>* output) const;
+ std::vector<const FieldDescriptor*>* output) const;
// =================================================================
// Accessors
@@ -192,7 +196,7 @@
// directly, unless you are doing low-level memory management.
//
// When calling any of these accessors, the extension number requested
- // MUST exist in the DescriptorPool provided to the constructor. Otheriwse,
+ // MUST exist in the DescriptorPool provided to the constructor. Otherwise,
// the method will fail an assert. Normally, though, you would not call
// these directly; you would either call the generated accessors of your
// message class (e.g. GetExtension()) or you would call the accessors
@@ -260,10 +264,17 @@
void SetAllocatedMessage(int number, FieldType type,
const FieldDescriptor* descriptor,
MessageLite* message);
+ void UnsafeArenaSetAllocatedMessage(int number, FieldType type,
+ const FieldDescriptor* descriptor,
+ MessageLite* message);
MessageLite* ReleaseMessage(int number, const MessageLite& prototype);
+ MessageLite* UnsafeArenaReleaseMessage(
+ int number, const MessageLite& prototype);
+
MessageLite* ReleaseMessage(const FieldDescriptor* descriptor,
MessageFactory* factory);
#undef desc
+ ::google::protobuf::Arena* GetArenaNoVirtual() const { return arena_; }
// repeated fields -------------------------------------------------
@@ -321,6 +332,8 @@
const MessageLite& prototype, desc);
MessageLite* AddMessage(const FieldDescriptor* descriptor,
MessageFactory* factory);
+ void AddAllocatedMessage(const FieldDescriptor* descriptor,
+ MessageLite* new_entry);
#undef desc
void RemoveLast(int number);
@@ -421,12 +434,15 @@
LazyMessageExtension() {}
virtual ~LazyMessageExtension() {}
- virtual LazyMessageExtension* New() const = 0;
+ virtual LazyMessageExtension* New(::google::protobuf::Arena* arena) const = 0;
virtual const MessageLite& GetMessage(
const MessageLite& prototype) const = 0;
virtual MessageLite* MutableMessage(const MessageLite& prototype) = 0;
virtual void SetAllocatedMessage(MessageLite *message) = 0;
+ virtual void UnsafeArenaSetAllocatedMessage(MessageLite *message) = 0;
virtual MessageLite* ReleaseMessage(const MessageLite& prototype) = 0;
+ virtual MessageLite* UnsafeArenaReleaseMessage(
+ const MessageLite& prototype) = 0;
virtual bool IsInitialized() const = 0;
virtual int ByteSize() const = 0;
@@ -524,6 +540,9 @@
};
+ // Merges existing Extension from other_extension
+ void InternalExtensionMergeFrom(int number, const Extension& other_extension);
+
// Returns true and fills field_number and extension if extension is found.
// Note to support packed repeated field compatibility, it also fills whether
// the tag on wire is packed, which can be different from
@@ -563,13 +582,16 @@
bool MaybeNewExtension(int number, const FieldDescriptor* descriptor,
Extension** result);
+ // Gets the repeated extension for the given descriptor, creating it if
+ // it does not exist.
+ Extension* MaybeNewRepeatedExtension(const FieldDescriptor* descriptor);
+
// Parse a single MessageSet item -- called just after the item group start
// tag has been read.
bool ParseMessageSetItem(io::CodedInputStream* input,
ExtensionFinder* extension_finder,
MessageSetFieldSkipper* field_skipper);
-
// Hack: RepeatedPtrFieldBase declares ExtensionSet as a friend. This
// friendship should automatically extend to ExtensionSet::Extension, but
// unfortunately some older compilers (e.g. GCC 3.4.4) do not implement this
@@ -587,7 +609,7 @@
// for 100 elements or more. Also, we want AppendToList() to order fields
// by field number.
std::map<int, Extension> extensions_;
-
+ ::google::protobuf::Arena* arena_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ExtensionSet);
};
@@ -702,15 +724,13 @@
static const RepeatedFieldType* GetDefaultRepeatedField();
};
-// Declared here so that this can be friended below.
-void InitializeDefaultRepeatedFields();
-void DestroyDefaultRepeatedFields();
+LIBPROTOBUF_EXPORT extern ProtobufOnceType repeated_primitive_generic_type_traits_once_init_;
class LIBPROTOBUF_EXPORT RepeatedPrimitiveGenericTypeTraits {
private:
template<typename Type> friend class RepeatedPrimitiveTypeTraits;
- friend void InitializeDefaultRepeatedFields();
- friend void DestroyDefaultRepeatedFields();
+ static void InitializeDefaultRepeatedFields();
+ static void DestroyDefaultRepeatedFields();
static const RepeatedField<int32>* default_repeated_field_int32_;
static const RepeatedField<int64>* default_repeated_field_int64_;
static const RepeatedField<uint32>* default_repeated_field_uint32_;
@@ -745,6 +765,9 @@
} \
template<> inline const RepeatedField<TYPE>* \
RepeatedPrimitiveTypeTraits<TYPE>::GetDefaultRepeatedField() { \
+ ::google::protobuf::GoogleOnceInit( \
+ &repeated_primitive_generic_type_traits_once_init_, \
+ &RepeatedPrimitiveGenericTypeTraits::InitializeDefaultRepeatedFields); \
return RepeatedPrimitiveGenericTypeTraits:: \
default_repeated_field_##TYPE##_; \
} \
@@ -798,6 +821,8 @@
}
};
+LIBPROTOBUF_EXPORT extern ProtobufOnceType repeated_string_type_traits_once_init_;
+
class LIBPROTOBUF_EXPORT RepeatedStringTypeTraits {
public:
typedef const string& ConstType;
@@ -841,12 +866,14 @@
}
static const RepeatedFieldType* GetDefaultRepeatedField() {
+ ::google::protobuf::GoogleOnceInit(&repeated_string_type_traits_once_init_,
+ &InitializeDefaultRepeatedFields);
return default_repeated_field_;
}
private:
- friend void InitializeDefaultRepeatedFields();
- friend void DestroyDefaultRepeatedFields();
+ static void InitializeDefaultRepeatedFields();
+ static void DestroyDefaultRepeatedFields();
static const RepeatedFieldType *default_repeated_field_;
};
@@ -1005,6 +1032,8 @@
static const RepeatedFieldType* GetDefaultRepeatedField();
};
+LIBPROTOBUF_EXPORT extern ProtobufOnceType repeated_message_generic_type_traits_once_init_;
+
// This class exists only to hold a generic default empty repeated field for all
// message-type repeated field extensions.
class LIBPROTOBUF_EXPORT RepeatedMessageGenericTypeTraits {
@@ -1012,14 +1041,17 @@
typedef RepeatedPtrField< ::google::protobuf::MessageLite*> RepeatedFieldType;
private:
template<typename Type> friend class RepeatedMessageTypeTraits;
- friend void InitializeDefaultRepeatedFields();
- friend void DestroyDefaultRepeatedFields();
+ static void InitializeDefaultRepeatedFields();
+ static void DestroyDefaultRepeatedFields();
static const RepeatedFieldType* default_repeated_field_;
};
template<typename Type> inline
const typename RepeatedMessageTypeTraits<Type>::RepeatedFieldType*
RepeatedMessageTypeTraits<Type>::GetDefaultRepeatedField() {
+ ::google::protobuf::GoogleOnceInit(
+ &repeated_message_generic_type_traits_once_init_,
+ &RepeatedMessageGenericTypeTraits::InitializeDefaultRepeatedFields);
return reinterpret_cast<const RepeatedFieldType*>(
RepeatedMessageGenericTypeTraits::default_repeated_field_);
}
diff --git a/darwin-x86_64/protoc/include/google/protobuf/field_mask.pb.h b/darwin-x86_64/protoc/include/google/protobuf/field_mask.pb.h
new file mode 100644
index 0000000..f5e0b65
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/field_mask.pb.h
@@ -0,0 +1,202 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/protobuf/field_mask.proto
+
+#ifndef PROTOBUF_google_2fprotobuf_2ffield_5fmask_2eproto__INCLUDED
+#define PROTOBUF_google_2fprotobuf_2ffield_5fmask_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 3000000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/arena.h>
+#include <google/protobuf/arenastring.h>
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/metadata.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/unknown_field_set.h>
+// @@protoc_insertion_point(includes)
+
+namespace google {
+namespace protobuf {
+
+// Internal implementation detail -- do not call these.
+void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ffield_5fmask_2eproto();
+void protobuf_AssignDesc_google_2fprotobuf_2ffield_5fmask_2eproto();
+void protobuf_ShutdownFile_google_2fprotobuf_2ffield_5fmask_2eproto();
+
+class FieldMask;
+
+// ===================================================================
+
+class LIBPROTOBUF_EXPORT FieldMask : public ::google::protobuf::Message {
+ public:
+ FieldMask();
+ virtual ~FieldMask();
+
+ FieldMask(const FieldMask& from);
+
+ inline FieldMask& operator=(const FieldMask& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const FieldMask& default_instance();
+
+ void Swap(FieldMask* other);
+
+ // implements Message ----------------------------------------------
+
+ inline FieldMask* New() const { return New(NULL); }
+
+ FieldMask* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const FieldMask& from);
+ void MergeFrom(const FieldMask& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(FieldMask* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // repeated string paths = 1;
+ 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);
+ 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);
+ 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();
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.FieldMask)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ bool _is_default_instance_;
+ ::google::protobuf::RepeatedPtrField< ::std::string> paths_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ffield_5fmask_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2ffield_5fmask_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2ffield_5fmask_2eproto();
+
+ void InitAsDefaultInstance();
+ static FieldMask* default_instance_;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+#if !PROTOBUF_INLINE_NOT_IN_HEADERS
+// FieldMask
+
+// repeated string paths = 1;
+inline int FieldMask::paths_size() const {
+ return paths_.size();
+}
+inline void FieldMask::clear_paths() {
+ paths_.Clear();
+}
+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) {
+ // @@protoc_insertion_point(field_mutable:google.protobuf.FieldMask.paths)
+ return paths_.Mutable(index);
+}
+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);
+}
+inline void FieldMask::set_paths(int index, const char* value) {
+ paths_.Mutable(index)->assign(value);
+ // @@protoc_insertion_point(field_set_char:google.protobuf.FieldMask.paths)
+}
+inline void FieldMask::set_paths(int index, const char* value, size_t size) {
+ paths_.Mutable(index)->assign(
+ reinterpret_cast<const char*>(value), size);
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldMask.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) {
+ paths_.Add()->assign(value);
+ // @@protoc_insertion_point(field_add:google.protobuf.FieldMask.paths)
+}
+inline void FieldMask::add_paths(const char* value) {
+ paths_.Add()->assign(value);
+ // @@protoc_insertion_point(field_add_char:google.protobuf.FieldMask.paths)
+}
+inline void FieldMask::add_paths(const char* value, size_t size) {
+ paths_.Add()->assign(reinterpret_cast<const char*>(value), size);
+ // @@protoc_insertion_point(field_add_pointer:google.protobuf.FieldMask.paths)
+}
+inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
+FieldMask::paths() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.FieldMask.paths)
+ return paths_;
+}
+inline ::google::protobuf::RepeatedPtrField< ::std::string>*
+FieldMask::mutable_paths() {
+ // @@protoc_insertion_point(field_mutable_list:google.protobuf.FieldMask.paths)
+ return &paths_;
+}
+
+#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace protobuf
+} // namespace google
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_google_2fprotobuf_2ffield_5fmask_2eproto__INCLUDED
diff --git a/darwin-x86_64/protoc/include/google/protobuf/field_mask.proto b/darwin-x86_64/protoc/include/google/protobuf/field_mask.proto
new file mode 100644
index 0000000..6af6dbe
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/field_mask.proto
@@ -0,0 +1,194 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "FieldMaskProto";
+option java_multiple_files = true;
+option objc_class_prefix = "GPB";
+option java_generate_equals_and_hash = true;
+
+// `FieldMask` represents a set of symbolic field paths, for example:
+//
+// paths: "f.a"
+// paths: "f.b.d"
+//
+// Here `f` represents a field in some root message, `a` and `b`
+// fields in the message found in `f`, and `d` a field found in the
+// message in `f.b`.
+//
+// Field masks are used to specify a subset of fields that should be
+// returned by a get operation or modified by an update operation.
+// Field masks also have a custom JSON encoding (see below).
+//
+// # Field Masks in Projections
+//
+// When used in the context of a projection, a response message or
+// sub-message is filtered by the API to only contain those fields as
+// specified in the mask. For example, if the mask in the previous
+// example is applied to a response message as follows:
+//
+// f {
+// a : 22
+// b {
+// d : 1
+// x : 2
+// }
+// y : 13
+// }
+// z: 8
+//
+// The result will not contain specific values for fields x,y and z
+// (their value will be set to the default, and omitted in proto text
+// output):
+//
+//
+// f {
+// a : 22
+// b {
+// d : 1
+// }
+// }
+//
+// A repeated field is not allowed except at the last position of a
+// field mask.
+//
+// If a FieldMask object is not present in a get operation, the
+// operation applies to all fields (as if a FieldMask of all fields
+// had been specified).
+//
+// Note that a field mask does not necessarily apply to the
+// top-level response message. In case of a REST get operation, the
+// field mask applies directly to the response, but in case of a REST
+// list operation, the mask instead applies to each individual message
+// in the returned resource list. In case of a REST custom method,
+// other definitions may be used. Where the mask applies will be
+// clearly documented together with its declaration in the API. In
+// any case, the effect on the returned resource/resources is required
+// behavior for APIs.
+//
+// # Field Masks in Update Operations
+//
+// A field mask in update operations specifies which fields of the
+// targeted resource are going to be updated. The API is required
+// to only change the values of the fields as specified in the mask
+// and leave the others untouched. If a resource is passed in to
+// describe the updated values, the API ignores the values of all
+// fields not covered by the mask.
+//
+// In order to reset a field's value to the default, the field must
+// be in the mask and set to the default value in the provided resource.
+// Hence, in order to reset all fields of a resource, provide a default
+// instance of the resource and set all fields in the mask, or do
+// not provide a mask as described below.
+//
+// If a field mask is not present on update, the operation applies to
+// all fields (as if a field mask of all fields has been specified).
+// Note that in the presence of schema evolution, this may mean that
+// fields the client does not know and has therefore not filled into
+// the request will be reset to their default. If this is unwanted
+// behavior, a specific service may require a client to always specify
+// a field mask, producing an error if not.
+//
+// As with get operations, the location of the resource which
+// describes the updated values in the request message depends on the
+// operation kind. In any case, the effect of the field mask is
+// required to be honored by the API.
+//
+// ## Considerations for HTTP REST
+//
+// The HTTP kind of an update operation which uses a field mask must
+// be set to PATCH instead of PUT in order to satisfy HTTP semantics
+// (PUT must only be used for full updates).
+//
+// # JSON Encoding of Field Masks
+//
+// In JSON, a field mask is encoded as a single string where paths are
+// separated by a comma. Fields name in each path are converted
+// to/from lower-camel naming conventions.
+//
+// As an example, consider the following message declarations:
+//
+// message Profile {
+// User user = 1;
+// Photo photo = 2;
+// }
+// message User {
+// string display_name = 1;
+// string address = 2;
+// }
+//
+// In proto a field mask for `Profile` may look as such:
+//
+// mask {
+// paths: "user.display_name"
+// paths: "photo"
+// }
+//
+// In JSON, the same mask is represented as below:
+//
+// {
+// mask: "user.displayName,photo"
+// }
+//
+// # Field Masks and Oneof Fields
+//
+// Field masks treat fields in oneofs just as regular fields. Consider the
+// following message:
+//
+// message SampleMessage {
+// oneof test_oneof {
+// string name = 4;
+// SubMessage sub_message = 9;
+// }
+// }
+//
+// The field mask can be:
+//
+// mask {
+// paths: "name"
+// }
+//
+// Or:
+//
+// mask {
+// paths: "sub_message"
+// }
+//
+// Note that oneof type names ("test_oneof" in this case) cannot be used in
+// paths.
+message FieldMask {
+ // The set of field mask paths.
+ repeated string paths = 1;
+}
diff --git a/darwin-x86_64/protoc/include/google/protobuf/generated_enum_reflection.h b/darwin-x86_64/protoc/include/google/protobuf/generated_enum_reflection.h
index 3852cea..fdcdc27 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/generated_enum_reflection.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/generated_enum_reflection.h
@@ -42,6 +42,7 @@
#include <string>
#include <google/protobuf/stubs/template_util.h>
+#include <google/protobuf/generated_enum_util.h>
namespace google {
namespace protobuf {
@@ -50,10 +51,6 @@
namespace protobuf {
-// This type trait can be used to cause templates to only match proto2 enum
-// types.
-template <typename T> struct is_proto_enum : ::google::protobuf::internal::false_type {};
-
// Returns the EnumDescriptor for enum type E, which must be a
// proto-declared enum type. Code generated by the protocol compiler
// will include specializations of this template for each enum type declared.
diff --git a/linux-x86_64/protoc/include/google/protobuf/io/strtod.h b/darwin-x86_64/protoc/include/google/protobuf/generated_enum_util.h
similarity index 77%
rename from linux-x86_64/protoc/include/google/protobuf/io/strtod.h
rename to darwin-x86_64/protoc/include/google/protobuf/generated_enum_util.h
index c2efc8d..e424205 100644
--- a/linux-x86_64/protoc/include/google/protobuf/io/strtod.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/generated_enum_util.h
@@ -28,23 +28,19 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// A locale-independent version of strtod(), used to parse floating
-// point default values in .proto files, where the decimal separator
-// is always a dot.
+#ifndef GOOGLE_PROTOBUF_GENERATED_ENUM_UTIL_H__
+#define GOOGLE_PROTOBUF_GENERATED_ENUM_UTIL_H__
-#ifndef GOOGLE_PROTOBUF_IO_STRTOD_H__
-#define GOOGLE_PROTOBUF_IO_STRTOD_H__
+#include <google/protobuf/stubs/template_util.h>
namespace google {
namespace protobuf {
-namespace io {
-// A locale-independent version of the standard strtod(), which always
-// uses a dot as the decimal separator.
-double NoLocaleStrtod(const char* str, char** endptr);
+// This type trait can be used to cause templates to only match proto2 enum
+// types.
+template <typename T> struct is_proto_enum : ::google::protobuf::internal::false_type {};
-} // namespace io
} // namespace protobuf
} // namespace google
-#endif // GOOGLE_PROTOBUF_IO_STRTOD_H__
+#endif // GOOGLE_PROTOBUF_GENERATED_ENUM_UTIL_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/generated_message_reflection.h b/darwin-x86_64/protoc/include/google/protobuf/generated_message_reflection.h
index b6671ad..15fc802 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/generated_message_reflection.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/generated_message_reflection.h
@@ -40,11 +40,13 @@
#include <string>
#include <vector>
+#include <google/protobuf/stubs/casts.h>
#include <google/protobuf/stubs/common.h>
// TODO(jasonh): Remove this once the compiler change to directly include this
// is released to components.
#include <google/protobuf/generated_enum_reflection.h>
#include <google/protobuf/message.h>
+#include <google/protobuf/metadata.h>
#include <google/protobuf/unknown_field_set.h>
@@ -56,7 +58,9 @@
} // namespace upb
namespace protobuf {
- class DescriptorPool;
+class DescriptorPool;
+class MapKey;
+class MapValueRef;
}
namespace protobuf {
@@ -134,7 +138,9 @@
int extensions_offset,
const DescriptorPool* pool,
MessageFactory* factory,
- int object_size);
+ int object_size,
+ int arena_offset,
+ int is_default_instance_offset = -1);
// Similar with the construction above. Call this construction if the
// message has oneof definition.
@@ -170,9 +176,39 @@
int oneof_case_offset,
const DescriptorPool* pool,
MessageFactory* factory,
- int object_size);
+ int object_size,
+ int arena_offset,
+ int is_default_instance_offset = -1);
~GeneratedMessageReflection();
+ // Shorter-to-call helpers for the above two constructions that work if the
+ // pool and factory are the usual, namely, DescriptorPool::generated_pool()
+ // and MessageFactory::generated_factory().
+
+ static GeneratedMessageReflection* NewGeneratedMessageReflection(
+ const Descriptor* descriptor,
+ const Message* default_instance,
+ const int offsets[],
+ int has_bits_offset,
+ int unknown_fields_offset,
+ int extensions_offset,
+ const void* default_oneof_instance,
+ int oneof_case_offset,
+ int object_size,
+ int arena_offset,
+ int is_default_instance_offset = -1);
+
+ static GeneratedMessageReflection* NewGeneratedMessageReflection(
+ const Descriptor* descriptor,
+ const Message* default_instance,
+ const int offsets[],
+ int has_bits_offset,
+ int unknown_fields_offset,
+ int extensions_offset,
+ int object_size,
+ int arena_offset,
+ int is_default_instance_offset = -1);
+
// implements Reflection -------------------------------------------
const UnknownFieldSet& GetUnknownFields(const Message& message) const;
@@ -217,6 +253,8 @@
string* scratch) const;
const EnumValueDescriptor* GetEnum(const Message& message,
const FieldDescriptor* field) const;
+ int GetEnumValue(const Message& message,
+ const FieldDescriptor* field) const;
const Message& GetMessage(const Message& message,
const FieldDescriptor* field,
MessageFactory* factory = NULL) const;
@@ -225,6 +263,25 @@
const Message& message,
const OneofDescriptor* oneof_descriptor) const;
+ private:
+ bool ContainsMapKey(const Message& message,
+ const FieldDescriptor* field,
+ const MapKey& key) const;
+ bool InsertOrLookupMapValue(Message* message,
+ const FieldDescriptor* field,
+ const MapKey& key,
+ MapValueRef* val) const;
+ bool DeleteMapValue(Message* message,
+ const FieldDescriptor* field,
+ const MapKey& key) const;
+ MapIterator MapBegin(
+ Message* message,
+ const FieldDescriptor* field) const;
+ MapIterator MapEnd(
+ Message* message,
+ const FieldDescriptor* field) const;
+ int MapSize(const Message& message, const FieldDescriptor* field) const;
+
public:
void SetInt32 (Message* message,
const FieldDescriptor* field, int32 value) const;
@@ -245,6 +302,8 @@
const string& value) const;
void SetEnum (Message* message, const FieldDescriptor* field,
const EnumValueDescriptor* value) const;
+ void SetEnumValue(Message* message, const FieldDescriptor* field,
+ int value) const;
Message* MutableMessage(Message* message, const FieldDescriptor* field,
MessageFactory* factory = NULL) const;
void SetAllocatedMessage(Message* message,
@@ -275,6 +334,9 @@
const EnumValueDescriptor* GetRepeatedEnum(const Message& message,
const FieldDescriptor* field,
int index) const;
+ int GetRepeatedEnumValue(const Message& message,
+ const FieldDescriptor* field,
+ int index) const;
const Message& GetRepeatedMessage(const Message& message,
const FieldDescriptor* field,
int index) const;
@@ -299,6 +361,8 @@
const string& value) const;
void SetRepeatedEnum(Message* message, const FieldDescriptor* field,
int index, const EnumValueDescriptor* value) const;
+ void SetRepeatedEnumValue(Message* message, const FieldDescriptor* field,
+ int index, int value) const;
// Get a mutable pointer to a field with a message type.
Message* MutableRepeatedMessage(Message* message,
const FieldDescriptor* field,
@@ -323,23 +387,56 @@
void AddEnum(Message* message,
const FieldDescriptor* field,
const EnumValueDescriptor* value) const;
+ void AddEnumValue(Message* message,
+ const FieldDescriptor* field,
+ int value) const;
Message* AddMessage(Message* message, const FieldDescriptor* field,
MessageFactory* factory = NULL) const;
+ void AddAllocatedMessage(
+ Message* message, const FieldDescriptor* field,
+ Message* new_entry) const;
const FieldDescriptor* FindKnownExtensionByName(const string& name) const;
const FieldDescriptor* FindKnownExtensionByNumber(int number) const;
+ bool SupportsUnknownEnumValues() const;
+
+ // This value for arena_offset_ indicates that there is no arena pointer in
+ // this message (e.g., old generated code).
+ static const int kNoArenaPointer = -1;
+
+ // This value for unknown_field_offset_ indicates that there is no
+ // UnknownFieldSet in this message, and that instead, we are using the
+ // Zero-Overhead Arena Pointer trick. When this is the case, arena_offset_
+ // actually indexes to an InternalMetadataWithArena instance, which can return
+ // either an arena pointer or an UnknownFieldSet or both. It is never the case
+ // that unknown_field_offset_ == kUnknownFieldSetInMetadata && arena_offset_
+ // == kNoArenaPointer.
+ static const int kUnknownFieldSetInMetadata = -1;
+
protected:
- virtual void* MutableRawRepeatedField(
+ void* MutableRawRepeatedField(
Message* message, const FieldDescriptor* field, FieldDescriptor::CppType,
int ctype, const Descriptor* desc) const;
+ const void* GetRawRepeatedField(
+ const Message& message, const FieldDescriptor* field,
+ FieldDescriptor::CppType, int ctype,
+ const Descriptor* desc) const;
+
+ virtual MessageFactory* GetMessageFactory() const;
+
+ virtual void* RepeatedFieldData(
+ Message* message, const FieldDescriptor* field,
+ FieldDescriptor::CppType cpp_type,
+ const Descriptor* message_type) const;
+
private:
friend class GeneratedMessage;
// To parse directly into a proto2 generated class, the class GMR_Handlers
// needs access to member offsets and hasbits.
- friend class LIBPROTOBUF_EXPORT upb::google_opensource::GMR_Handlers;
+ friend class upb::google_opensource::GMR_Handlers;
const Descriptor* descriptor_;
const Message* default_instance_;
@@ -350,8 +447,12 @@
int oneof_case_offset_;
int unknown_fields_offset_;
int extensions_offset_;
+ int arena_offset_;
+ int is_default_instance_offset_;
int object_size_;
+ static const int kHasNoDefaultInstanceField = -1;
+
const DescriptorPool* descriptor_pool_;
MessageFactory* message_factory_;
@@ -376,6 +477,13 @@
const OneofDescriptor* oneof_descriptor) const;
inline const ExtensionSet& GetExtensionSet(const Message& message) const;
inline ExtensionSet* MutableExtensionSet(Message* message) const;
+ inline Arena* GetArena(Message* message) const;
+ inline const internal::InternalMetadataWithArena&
+ GetInternalMetadataWithArena(const Message& message) const;
+ inline internal::InternalMetadataWithArena*
+ MutableInternalMetadataWithArena(Message* message) const;
+
+ inline bool GetIsDefaultInstance(const Message& message) const;
inline bool HasBit(const Message& message,
const FieldDescriptor* field) const;
@@ -438,6 +546,31 @@
int GetExtensionNumberOrDie(const Descriptor* type) const;
+ // Internal versions of EnumValue API perform no checking. Called after checks
+ // by public methods.
+ void SetEnumValueInternal(Message* message,
+ const FieldDescriptor* field,
+ int value) const;
+ void SetRepeatedEnumValueInternal(Message* message,
+ const FieldDescriptor* field,
+ int index,
+ int value) const;
+ void AddEnumValueInternal(Message* message,
+ const FieldDescriptor* field,
+ int value) const;
+
+
+ Message* UnsafeArenaReleaseMessage(Message* message,
+ const FieldDescriptor* field,
+ MessageFactory* factory = NULL) const;
+
+ void UnsafeArenaSetAllocatedMessage(Message* message,
+ Message* sub_message,
+ const FieldDescriptor* field) const;
+
+ internal::MapFieldBase* MapData(
+ Message* message, const FieldDescriptor* field) const;
+
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(GeneratedMessageReflection);
};
@@ -449,7 +582,16 @@
// which the offsets of the direct fields of a class are non-constant.
// Fields inherited from superclasses *can* have non-constant offsets,
// but that's not what this macro will be used for.
-//
+#if defined(__clang__)
+// For Clang we use __builtin_offsetof() and suppress the warning,
+// to avoid Control Flow Integrity and UBSan vptr sanitizers from
+// crashing while trying to validate the invalid reinterpet_casts.
+#define GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TYPE, FIELD) \
+ _Pragma("clang diagnostic push") \
+ _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
+ __builtin_offsetof(TYPE, FIELD) \
+ _Pragma("clang diagnostic pop")
+#else
// Note that we calculate relative to the pointer value 16 here since if we
// just use zero, GCC complains about dereferencing a NULL pointer. We
// choose 16 rather than some other number just in case the compiler would
@@ -459,6 +601,7 @@
reinterpret_cast<const char*>( \
&reinterpret_cast<const TYPE*>(16)->FIELD) - \
reinterpret_cast<const char*>(16))
+#endif
#define PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ONEOF, FIELD) \
static_cast<int>( \
@@ -497,6 +640,42 @@
#endif
}
+// Tries to downcast this message to a generated message type.
+// Returns NULL if this class is not an instance of T.
+//
+// This is like dynamic_cast_if_available, except it works even when
+// dynamic_cast is not available by using Reflection. However it only works
+// with Message objects.
+//
+// TODO(haberman): can we remove dynamic_cast_if_available in favor of this?
+template <typename T>
+T* DynamicCastToGenerated(const Message* from) {
+ // Compile-time assert that T is a generated type that has a
+ // default_instance() accessor, but avoid actually calling it.
+ const T&(*get_default_instance)() = &T::default_instance;
+ (void)get_default_instance;
+
+ // Compile-time assert that T is a subclass of google::protobuf::Message.
+ const Message* unused = static_cast<T*>(NULL);
+ (void)unused;
+
+#if defined(GOOGLE_PROTOBUF_NO_RTTI) || \
+ (defined(_MSC_VER) && !defined(_CPPRTTI))
+ bool ok = &T::default_instance() ==
+ from->GetReflection()->GetMessageFactory()->GetPrototype(
+ from->GetDescriptor());
+ return ok ? down_cast<T*>(from) : NULL;
+#else
+ return dynamic_cast<T*>(from);
+#endif
+}
+
+template <typename T>
+T* DynamicCastToGenerated(Message* from) {
+ const Message* message_const = from;
+ return const_cast<T*>(DynamicCastToGenerated<const T>(message_const));
+}
+
} // namespace internal
} // namespace protobuf
diff --git a/darwin-x86_64/protoc/include/google/protobuf/generated_message_util.h b/darwin-x86_64/protoc/include/google/protobuf/generated_message_util.h
index 678f92a..56f5afd 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/generated_message_util.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/generated_message_util.h
@@ -42,11 +42,15 @@
#include <string>
#include <google/protobuf/stubs/once.h>
-
#include <google/protobuf/stubs/common.h>
+
namespace google {
namespace protobuf {
+
+class Arena;
+namespace io { class CodedInputStream; }
+
namespace internal {
@@ -59,6 +63,8 @@
#undef DEPRECATED_PROTOBUF_FIELD
#define PROTOBUF_DEPRECATED
+#define GOOGLE_PROTOBUF_DEPRECATED_ATTR
+
// Constants for special floating point values.
LIBPROTOBUF_EXPORT double Infinity();
@@ -85,12 +91,6 @@
return GetEmptyStringAlreadyInited();
}
-// Defined in generated_message_reflection.cc -- not actually part of the lite
-// library.
-//
-// TODO(jasonh): The various callers get this declaration from a variety of
-// places: probably in most cases repeated_field.h. Clean these up so they all
-// get the declaration from this file.
LIBPROTOBUF_EXPORT int StringSpaceUsedExcludingSelf(const string& str);
@@ -106,6 +106,15 @@
return true;
}
+class ArenaString;
+
+// Read a length (varint32), followed by a string, from *input. Return a
+// pointer to a copy of the string that resides in *arena. Requires both
+// args to be non-NULL. If something goes wrong while reading the data
+// then NULL is returned (e.g., input does not start with a valid varint).
+ArenaString* ReadArenaString(::google::protobuf::io::CodedInputStream* input,
+ ::google::protobuf::Arena* arena);
+
} // namespace internal
} // namespace protobuf
diff --git a/darwin-x86_64/protoc/include/google/protobuf/io/._coded_stream.h b/darwin-x86_64/protoc/include/google/protobuf/io/._coded_stream.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/io/._coded_stream.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/io/._gzip_stream.h b/darwin-x86_64/protoc/include/google/protobuf/io/._gzip_stream.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/io/._gzip_stream.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/io/._printer.h b/darwin-x86_64/protoc/include/google/protobuf/io/._printer.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/io/._printer.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/io/._strtod.h b/darwin-x86_64/protoc/include/google/protobuf/io/._strtod.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/io/._strtod.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/io/._tokenizer.h b/darwin-x86_64/protoc/include/google/protobuf/io/._tokenizer.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/io/._tokenizer.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/io/._zero_copy_stream.h b/darwin-x86_64/protoc/include/google/protobuf/io/._zero_copy_stream.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/io/._zero_copy_stream.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/io/._zero_copy_stream_impl.h b/darwin-x86_64/protoc/include/google/protobuf/io/._zero_copy_stream_impl.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/io/._zero_copy_stream_impl.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/io/._zero_copy_stream_impl_lite.h b/darwin-x86_64/protoc/include/google/protobuf/io/._zero_copy_stream_impl_lite.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/io/._zero_copy_stream_impl_lite.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/io/coded_stream.h b/darwin-x86_64/protoc/include/google/protobuf/io/coded_stream.h
index 81fabb1..c81a33a 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/io/coded_stream.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/io/coded_stream.h
@@ -49,7 +49,7 @@
// // to identify the file type, then write a length-delimited string. The
// // string is composed of a varint giving the length followed by the raw
// // bytes.
-// int fd = open("myfile", O_WRONLY);
+// int fd = open("myfile", O_CREAT | O_WRONLY);
// ZeroCopyOutputStream* raw_output = new FileOutputStream(fd);
// CodedOutputStream* coded_output = new CodedOutputStream(raw_output);
//
@@ -109,28 +109,31 @@
#ifndef GOOGLE_PROTOBUF_IO_CODED_STREAM_H__
#define GOOGLE_PROTOBUF_IO_CODED_STREAM_H__
+#include <assert.h>
#include <string>
+#include <utility>
#ifdef _MSC_VER
- #if defined(_M_IX86) && \
- !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
+ // Assuming windows is always little-endian.
+ #if !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
#define PROTOBUF_LITTLE_ENDIAN 1
#endif
- #if _MSC_VER >= 1300
+ #if _MSC_VER >= 1300 && !defined(__INTEL_COMPILER)
// If MSVC has "/RTCc" set, it will complain about truncating casts at
// runtime. This file contains some intentional truncating casts.
#pragma runtime_checks("c", off)
#endif
#else
#include <sys/param.h> // __BYTE_ORDER
- #if defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN && \
+ #if ((defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)) || \
+ (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN)) && \
!defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
#define PROTOBUF_LITTLE_ENDIAN 1
#endif
#endif
#include <google/protobuf/stubs/common.h>
-
namespace google {
+
namespace protobuf {
class DescriptorPool;
@@ -189,12 +192,16 @@
// Like GetDirectBufferPointer, but this method is inlined, and does not
// attempt to Refresh() if the buffer is currently empty.
- inline void GetDirectBufferPointerInline(const void** data,
- int* size) GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE void GetDirectBufferPointerInline(const void** data,
+ int* size);
// Read raw bytes, copying them into the given buffer.
bool ReadRaw(void* buffer, int size);
+ // Like the above, with inlined optimizations. This should only be used
+ // by the protobuf implementation.
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE bool InternalReadRawInline(void* buffer, int size);
+
// Like ReadRaw, but reads into a string.
//
// Implementation Note: ReadString() grows the string gradually as it
@@ -205,8 +212,8 @@
bool ReadString(string* buffer, int size);
// Like the above, with inlined optimizations. This should only be used
// by the protobuf implementation.
- inline bool InternalReadStringInline(string* buffer,
- int size) GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE bool InternalReadStringInline(string* buffer,
+ int size);
// Read a 32-bit little-endian integer.
@@ -236,7 +243,7 @@
// Always inline because this is only called in one place per parse loop
// but it is called for every iteration of said loop, so it should be fast.
// GCC doesn't want to inline this by default.
- uint32 ReadTag() GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE uint32 ReadTag();
// This usually a faster alternative to ReadTag() when cutoff is a manifest
// constant. It does particularly well for cutoff >= 127. The first part
@@ -246,8 +253,8 @@
// above cutoff or is 0. (There's intentional wiggle room when tag is 0,
// because that can arise in several ways, and for best performance we want
// to avoid an extra "is tag == 0?" check here.)
- inline std::pair<uint32, bool> ReadTagWithCutoff(uint32 cutoff)
- GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE std::pair<uint32, bool> ReadTagWithCutoff(
+ uint32 cutoff);
// Usually returns true if calling ReadVarint32() now would produce the given
// value. Will always return false if ReadVarint32() would not return the
@@ -256,7 +263,7 @@
// parameter.
// Always inline because this collapses to a small number of instructions
// when given a constant parameter, but GCC doesn't want to inline by default.
- bool ExpectTag(uint32 expected) GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE bool ExpectTag(uint32 expected);
// Like above, except this reads from the specified buffer. The caller is
// responsible for ensuring that the buffer is large enough to read a varint
@@ -265,9 +272,9 @@
//
// Returns a pointer beyond the expected tag if it was found, or NULL if it
// was not.
- static const uint8* ExpectTagFromArray(
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE static const uint8* ExpectTagFromArray(
const uint8* buffer,
- uint32 expected) GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
+ uint32 expected);
// Usually returns true if no more bytes can be read. Always returns false
// if more bytes can be read. If ExpectAtEnd() returns true, a subsequent
@@ -385,9 +392,41 @@
// under the limit, false if it has gone over.
bool IncrementRecursionDepth();
- // Decrements the recursion depth.
+ // Decrements the recursion depth if possible.
void DecrementRecursionDepth();
+ // Decrements the recursion depth blindly. This is faster than
+ // DecrementRecursionDepth(). It should be used only if all previous
+ // increments to recursion depth were successful.
+ void UnsafeDecrementRecursionDepth();
+
+ // Shorthand for make_pair(PushLimit(byte_limit), --recursion_budget_).
+ // Using this can reduce code size and complexity in some cases. The caller
+ // is expected to check that the second part of the result is non-negative (to
+ // bail out if the depth of recursion is too high) and, if all is well, to
+ // later pass the first part of the result to PopLimit() or similar.
+ std::pair<CodedInputStream::Limit, int> IncrementRecursionDepthAndPushLimit(
+ int byte_limit);
+
+ // Shorthand for PushLimit(ReadVarint32(&length) ? length : 0).
+ Limit ReadLengthAndPushLimit();
+
+ // Helper that is equivalent to: {
+ // bool result = ConsumedEntireMessage();
+ // PopLimit(limit);
+ // UnsafeDecrementRecursionDepth();
+ // return result; }
+ // Using this can reduce code size and complexity in some cases.
+ // Do not use unless the current recursion depth is greater than zero.
+ bool DecrementRecursionDepthAndPopLimit(Limit limit);
+
+ // Helper that is equivalent to: {
+ // bool result = ConsumedEntireMessage();
+ // PopLimit(limit);
+ // return result; }
+ // Using this can reduce code size and complexity in some cases.
+ bool CheckEntireMessageConsumedAndPopLimit(Limit limit);
+
// Extension Registry ----------------------------------------------
// ADVANCED USAGE: 99.9% of people can ignore this section.
//
@@ -470,9 +509,9 @@
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CodedInputStream);
- ZeroCopyInputStream* input_;
const uint8* buffer_;
const uint8* buffer_end_; // pointer to the end of the buffer.
+ ZeroCopyInputStream* input_;
int total_bytes_read_; // total bytes read from input_, including
// the current buffer
@@ -513,9 +552,10 @@
// If -2: Internal: Limit has been reached, print full size when destructing.
int total_bytes_warning_threshold_;
- // Current recursion depth, controlled by IncrementRecursionDepth() and
- // DecrementRecursionDepth().
- int recursion_depth_;
+ // Current recursion budget, controlled by IncrementRecursionDepth() and
+ // similar. Starts at recursion_limit_ and goes down: if this reaches
+ // -1 we are over budget.
+ int recursion_budget_;
// Recursion depth limit, set by SetRecursionLimit().
int recursion_limit_;
@@ -548,9 +588,13 @@
// optimization. The Slow method is yet another fallback when the buffer is
// not large enough. Making the slow path out-of-line speeds up the common
// case by 10-15%. The slow path is fairly uncommon: it only triggers when a
- // message crosses multiple buffers.
- bool ReadVarint32Fallback(uint32* value);
- bool ReadVarint64Fallback(uint64* value);
+ // message crosses multiple buffers. Note: ReadVarint32Fallback() and
+ // ReadVarint64Fallback() are called frequently and generally not inlined, so
+ // they have been optimized to avoid "out" parameters. The former returns -1
+ // if it fails and the uint32 it read otherwise. The latter has a bool
+ // indicating success or failure as part of its return type.
+ int64 ReadVarint32Fallback(uint32 first_byte_or_zero);
+ std::pair<uint64, bool> ReadVarint64Fallback();
bool ReadVarint32Slow(uint32* value);
bool ReadVarint64Slow(uint64* value);
bool ReadLittleEndian32Fallback(uint32* value);
@@ -558,7 +602,7 @@
// Fallback/slow methods for reading tags. These do not update last_tag_,
// but will set legitimate_message_end_ if we are at the end of the input
// stream.
- uint32 ReadTagFallback();
+ uint32 ReadTagFallback(uint32 first_byte_or_zero);
uint32 ReadTagSlow();
bool ReadStringFallback(string* buffer, int size);
@@ -622,11 +666,19 @@
public:
// Create an CodedOutputStream that writes to the given ZeroCopyOutputStream.
explicit CodedOutputStream(ZeroCopyOutputStream* output);
+ CodedOutputStream(ZeroCopyOutputStream* output, bool do_eager_refresh);
// Destroy the CodedOutputStream and position the underlying
// ZeroCopyOutputStream immediately after the last byte written.
~CodedOutputStream();
+ // Trims any unused space in the underlying buffer so that its size matches
+ // the number of bytes written by this stream. The underlying buffer will
+ // automatically be trimmed when this stream is destroyed; this call is only
+ // necessary if the underlying buffer is accessed *before* the stream is
+ // destroyed.
+ void Trim();
+
// Skips a number of bytes, leaving the bytes unmodified in the underlying
// buffer. Returns false if an underlying write error occurs. This is
// mainly useful with GetDirectBufferPointer().
@@ -715,8 +767,8 @@
// but GCC by default doesn't want to inline this.
void WriteTag(uint32 value);
// Like WriteTag() but writing directly to the target array.
- static uint8* WriteTagToArray(
- uint32 value, uint8* target) GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE static uint8* WriteTagToArray(uint32 value,
+ uint8* target);
// Returns the number of bytes needed to encode the given value as a varint.
static int VarintSize32(uint32 value);
@@ -769,7 +821,9 @@
// ZeroCopyOutputStream supports it.
void WriteAliasedRaw(const void* buffer, int size);
- static uint8* WriteVarint32FallbackToArray(uint32 value, uint8* target);
+ // If this write might cross the end of the buffer, we compose the bytes first
+ // then use WriteRaw().
+ void WriteVarint32SlowPath(uint32 value);
// Always-inlined versions of WriteVarint* functions so that code can be
// reused, while still controlling size. For instance, WriteVarint32ToArray()
@@ -778,10 +832,8 @@
// WriteVarint32FallbackToArray. Meanwhile, WriteVarint32() is already
// out-of-line, so it should just invoke this directly to avoid any extra
// function call overhead.
- static uint8* WriteVarint32FallbackToArrayInline(
- uint32 value, uint8* target) GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
- static uint8* WriteVarint64ToArrayInline(
- uint64 value, uint8* target) GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE static uint8* WriteVarint64ToArrayInline(
+ uint64 value, uint8* target);
static int VarintSize32Fallback(uint32 value);
};
@@ -791,13 +843,18 @@
// methods optimize for that case.
inline bool CodedInputStream::ReadVarint32(uint32* value) {
- if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_) && *buffer_ < 0x80) {
- *value = *buffer_;
- Advance(1);
- return true;
- } else {
- return ReadVarint32Fallback(value);
+ uint32 v = 0;
+ if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_)) {
+ v = *buffer_;
+ if (v < 0x80) {
+ *value = v;
+ Advance(1);
+ return true;
+ }
}
+ int64 result = ReadVarint32Fallback(v);
+ *value = static_cast<uint32>(result);
+ return result >= 0;
}
inline bool CodedInputStream::ReadVarint64(uint64* value) {
@@ -805,9 +862,10 @@
*value = *buffer_;
Advance(1);
return true;
- } else {
- return ReadVarint64Fallback(value);
}
+ std::pair<uint64, bool> p = ReadVarint64Fallback();
+ *value = p.first;
+ return p.second;
}
// static
@@ -876,14 +934,17 @@
}
inline uint32 CodedInputStream::ReadTag() {
- if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_) && buffer_[0] < 0x80) {
- last_tag_ = buffer_[0];
- Advance(1);
- return last_tag_;
- } else {
- last_tag_ = ReadTagFallback();
- return last_tag_;
+ uint32 v = 0;
+ if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_)) {
+ v = *buffer_;
+ if (v < 0x80) {
+ last_tag_ = v;
+ Advance(1);
+ return v;
+ }
}
+ last_tag_ = ReadTagFallback(v);
+ return last_tag_;
}
inline std::pair<uint32, bool> CodedInputStream::ReadTagWithCutoff(
@@ -891,15 +952,17 @@
// In performance-sensitive code we can expect cutoff to be a compile-time
// constant, and things like "cutoff >= kMax1ByteVarint" to be evaluated at
// compile time.
+ uint32 first_byte_or_zero = 0;
if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_)) {
// Hot case: buffer_ non_empty, buffer_[0] in [1, 128).
// TODO(gpike): Is it worth rearranging this? E.g., if the number of fields
// is large enough then is it better to check for the two-byte case first?
+ first_byte_or_zero = buffer_[0];
if (static_cast<int8>(buffer_[0]) > 0) {
const uint32 kMax1ByteVarint = 0x7f;
uint32 tag = last_tag_ = buffer_[0];
Advance(1);
- return make_pair(tag, cutoff >= kMax1ByteVarint || tag <= cutoff);
+ return std::make_pair(tag, cutoff >= kMax1ByteVarint || tag <= cutoff);
}
// Other hot case: cutoff >= 0x80, buffer_ has at least two bytes available,
// and tag is two bytes. The latter is tested by bitwise-and-not of the
@@ -917,12 +980,12 @@
// so we don't have to check for tag == 0. We may need to check whether
// it exceeds cutoff.
bool at_or_below_cutoff = cutoff >= kMax2ByteVarint || tag <= cutoff;
- return make_pair(tag, at_or_below_cutoff);
+ return std::make_pair(tag, at_or_below_cutoff);
}
}
// Slow path
- last_tag_ = ReadTagFallback();
- return make_pair(last_tag_, static_cast<uint32>(last_tag_ - 1) < cutoff);
+ last_tag_ = ReadTagFallback(first_byte_or_zero);
+ return std::make_pair(last_tag_, static_cast<uint32>(last_tag_ - 1) < cutoff);
}
inline bool CodedInputStream::LastTagWas(uint32 expected) {
@@ -974,7 +1037,7 @@
inline void CodedInputStream::GetDirectBufferPointerInline(const void** data,
int* size) {
*data = buffer_;
- *size = buffer_end_ - buffer_;
+ *size = static_cast<int>(buffer_end_ - buffer_);
}
inline bool CodedInputStream::ExpectAtEnd() {
@@ -1007,13 +1070,14 @@
}
inline uint8* CodedOutputStream::WriteVarint32ToArray(uint32 value,
- uint8* target) {
- if (value < 0x80) {
- *target = value;
- return target + 1;
- } else {
- return WriteVarint32FallbackToArray(value, target);
+ uint8* target) {
+ while (value >= 0x80) {
+ *target = static_cast<uint8>(value | 0x80);
+ value >>= 7;
+ ++target;
}
+ *target = static_cast<uint8>(value);
+ return target + 1;
}
inline void CodedOutputStream::WriteVarint32SignExtended(int32 value) {
@@ -1066,22 +1130,26 @@
return target + sizeof(value);
}
+inline void CodedOutputStream::WriteVarint32(uint32 value) {
+ if (buffer_size_ >= 5) {
+ // Fast path: We have enough bytes left in the buffer to guarantee that
+ // this write won't cross the end, so we can skip the checks.
+ uint8* target = buffer_;
+ uint8* end = WriteVarint32ToArray(value, target);
+ int size = static_cast<int>(end - target);
+ Advance(size);
+ } else {
+ WriteVarint32SlowPath(value);
+ }
+}
+
inline void CodedOutputStream::WriteTag(uint32 value) {
WriteVarint32(value);
}
inline uint8* CodedOutputStream::WriteTagToArray(
uint32 value, uint8* target) {
- if (value < (1 << 7)) {
- target[0] = value;
- return target + 1;
- } else if (value < (1 << 14)) {
- target[0] = static_cast<uint8>(value | 0x80);
- target[1] = static_cast<uint8>(value >> 7);
- return target + 2;
- } else {
- return WriteVarint32FallbackToArray(value, target);
- }
+ return WriteVarint32ToArray(value, target);
}
inline int CodedOutputStream::VarintSize32(uint32 value) {
@@ -1132,16 +1200,22 @@
}
inline void CodedInputStream::SetRecursionLimit(int limit) {
+ recursion_budget_ += limit - recursion_limit_;
recursion_limit_ = limit;
}
inline bool CodedInputStream::IncrementRecursionDepth() {
- ++recursion_depth_;
- return recursion_depth_ <= recursion_limit_;
+ --recursion_budget_;
+ return recursion_budget_ >= 0;
}
inline void CodedInputStream::DecrementRecursionDepth() {
- if (recursion_depth_ > 0) --recursion_depth_;
+ if (recursion_budget_ < recursion_limit_) ++recursion_budget_;
+}
+
+inline void CodedInputStream::UnsafeDecrementRecursionDepth() {
+ assert(recursion_budget_ < recursion_limit_);
+ ++recursion_budget_;
}
inline void CodedInputStream::SetExtensionRegistry(const DescriptorPool* pool,
@@ -1159,13 +1233,13 @@
}
inline int CodedInputStream::BufferSize() const {
- return buffer_end_ - buffer_;
+ return static_cast<int>(buffer_end_ - buffer_);
}
inline CodedInputStream::CodedInputStream(ZeroCopyInputStream* input)
- : input_(input),
- buffer_(NULL),
+ : buffer_(NULL),
buffer_end_(NULL),
+ input_(input),
total_bytes_read_(0),
overflow_bytes_(0),
last_tag_(0),
@@ -1175,7 +1249,7 @@
buffer_size_after_limit_(0),
total_bytes_limit_(kDefaultTotalBytesLimit),
total_bytes_warning_threshold_(kDefaultTotalBytesWarningThreshold),
- recursion_depth_(0),
+ recursion_budget_(default_recursion_limit_),
recursion_limit_(default_recursion_limit_),
extension_pool_(NULL),
extension_factory_(NULL) {
@@ -1184,9 +1258,9 @@
}
inline CodedInputStream::CodedInputStream(const uint8* buffer, int size)
- : input_(NULL),
- buffer_(buffer),
+ : buffer_(buffer),
buffer_end_(buffer + size),
+ input_(NULL),
total_bytes_read_(size),
overflow_bytes_(0),
last_tag_(0),
@@ -1196,7 +1270,7 @@
buffer_size_after_limit_(0),
total_bytes_limit_(kDefaultTotalBytesLimit),
total_bytes_warning_threshold_(kDefaultTotalBytesWarningThreshold),
- recursion_depth_(0),
+ recursion_budget_(default_recursion_limit_),
recursion_limit_(default_recursion_limit_),
extension_pool_(NULL),
extension_factory_(NULL) {
@@ -1212,9 +1286,9 @@
} // namespace protobuf
-#if defined(_MSC_VER) && _MSC_VER >= 1300
+#if _MSC_VER >= 1300 && !defined(__INTEL_COMPILER)
#pragma runtime_checks("c", restore)
-#endif // _MSC_VER
+#endif // _MSC_VER && !defined(__INTEL_COMPILER)
} // namespace google
#endif // GOOGLE_PROTOBUF_IO_CODED_STREAM_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/io/gzip_stream.h b/darwin-x86_64/protoc/include/google/protobuf/io/gzip_stream.h
index c7ccc26..15b02fe 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/io/gzip_stream.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/io/gzip_stream.h
@@ -43,10 +43,9 @@
#ifndef GOOGLE_PROTOBUF_IO_GZIP_STREAM_H__
#define GOOGLE_PROTOBUF_IO_GZIP_STREAM_H__
-#include <zlib.h>
-
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/io/zero_copy_stream.h>
+#include <zlib.h>
namespace google {
namespace protobuf {
@@ -99,6 +98,7 @@
void* output_buffer_;
void* output_position_;
size_t output_buffer_length_;
+ int64 byte_count_;
int Inflate(int flush);
void DoNextOutput(const void** data, int* size);
diff --git a/darwin-x86_64/protoc/include/google/protobuf/io/printer.h b/darwin-x86_64/protoc/include/google/protobuf/io/printer.h
index f06cbf2..2ba8455 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/io/printer.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/io/printer.h
@@ -39,6 +39,7 @@
#include <string>
#include <map>
+#include <vector>
#include <google/protobuf/stubs/common.h>
namespace google {
@@ -47,6 +48,47 @@
class ZeroCopyOutputStream; // zero_copy_stream.h
+// Records annotations about a Printer's output.
+class LIBPROTOBUF_EXPORT AnnotationCollector {
+ public:
+ // Records that the bytes in file_path beginning with begin_offset and ending
+ // before end_offset are associated with the SourceCodeInfo-style path.
+ virtual void AddAnnotation(size_t begin_offset, size_t end_offset,
+ const string& file_path,
+ const vector<int>& path) = 0;
+
+ virtual ~AnnotationCollector() {}
+};
+
+// Records annotations about a Printer's output to the given protocol buffer,
+// assuming that the buffer has an ::Annotation message exposing path,
+// source_file, begin and end fields.
+template <typename AnnotationProto>
+class AnnotationProtoCollector : public AnnotationCollector {
+ public:
+ // annotation_proto is the protocol buffer to which new Annotations should be
+ // added. It is not owned by the AnnotationProtoCollector.
+ explicit AnnotationProtoCollector(AnnotationProto* annotation_proto)
+ : annotation_proto_(annotation_proto) {}
+
+ // Override for AnnotationCollector::AddAnnotation.
+ virtual void AddAnnotation(size_t begin_offset, size_t end_offset,
+ const string& file_path, const vector<int>& path) {
+ typename AnnotationProto::Annotation* annotation =
+ annotation_proto_->add_annotation();
+ for (int i = 0; i < path.size(); ++i) {
+ annotation->add_path(path[i]);
+ }
+ annotation->set_source_file(file_path);
+ annotation->set_begin(begin_offset);
+ annotation->set_end(end_offset);
+ }
+
+ private:
+ // The protocol buffer to which new annotations should be added.
+ AnnotationProto* const annotation_proto_;
+};
+
// This simple utility class assists in code generation. It basically
// allows the caller to define a set of variables and then output some
// text with variable substitutions. Example usage:
@@ -61,13 +103,103 @@
// Printer aggressively enforces correct usage, crashing (with assert failures)
// in the case of undefined variables in debug builds. This helps greatly in
// debugging code which uses it.
+//
+// If a Printer is constructed with an AnnotationCollector, it will provide it
+// with annotations that connect the Printer's output to paths that can identify
+// various descriptors. In the above example, if person_ is a descriptor that
+// identifies Bob, we can associate the output string "My name is Bob." with
+// a source path pointing to that descriptor with:
+//
+// printer.Annotate("name", person_);
+//
+// The AnnotationCollector will be sent an annotation linking the output range
+// covering "Bob" to the logical path provided by person_. Tools may use
+// this association to (for example) link "Bob" in the output back to the
+// source file that defined the person_ descriptor identifying Bob.
+//
+// Annotate can only examine variables substituted during the last call to
+// Print. It is invalid to refer to a variable that was used multiple times
+// in a single Print call.
+//
+// In full generality, one may specify a range of output text using a beginning
+// substitution variable and an ending variable. The resulting annotation will
+// span from the first character of the substituted value for the beginning
+// variable to the last character of the substituted value for the ending
+// variable. For example, the Annotate call above is equivalent to this one:
+//
+// printer.Annotate("name", "name", person_);
+//
+// This is useful if multiple variables combine to form a single span of output
+// that should be annotated with the same source path. For example:
+//
+// Printer printer(output, '$');
+// map<string, string> vars;
+// vars["first"] = "Alice";
+// vars["last"] = "Smith";
+// printer.Print(vars, "My name is $first$ $last$.");
+// printer.Annotate("first", "last", person_);
+//
+// This code would associate the span covering "Alice Smith" in the output with
+// the person_ descriptor.
+//
+// Note that the beginning variable must come before (or overlap with, in the
+// case of zero-sized substitution values) the ending variable.
+//
+// It is also sometimes useful to use variables with zero-sized values as
+// markers. This avoids issues with multiple references to the same variable
+// and also allows annotation ranges to span literal text from the Print
+// templates:
+//
+// Printer printer(output, '$');
+// map<string, string> vars;
+// vars["foo"] = "bar";
+// vars["function"] = "call";
+// vars["mark"] = "";
+// printer.Print(vars, "$function$($foo$,$foo$)$mark$");
+// printer.Annotate("function", "rmark", call_);
+//
+// This code associates the span covering "call(bar,bar)" in the output with the
+// call_ descriptor.
+
class LIBPROTOBUF_EXPORT Printer {
public:
// Create a printer that writes text to the given output stream. Use the
// given character as the delimiter for variables.
Printer(ZeroCopyOutputStream* output, char variable_delimiter);
+
+ // Create a printer that writes text to the given output stream. Use the
+ // given character as the delimiter for variables. If annotation_collector
+ // is not null, Printer will provide it with annotations about code written
+ // to the stream. annotation_collector is not owned by Printer.
+ Printer(ZeroCopyOutputStream* output, char variable_delimiter,
+ AnnotationCollector* annotation_collector);
+
~Printer();
+ // Link a subsitution variable emitted by the last call to Print to the object
+ // described by descriptor.
+ template <typename SomeDescriptor>
+ void Annotate(const char* varname, const SomeDescriptor* descriptor) {
+ Annotate(varname, varname, descriptor);
+ }
+
+ // Link the output range defined by the substitution variables as emitted by
+ // the last call to Print to the object described by descriptor. The range
+ // begins at begin_varname's value and ends after the last character of the
+ // value substituted for end_varname.
+ template <typename SomeDescriptor>
+ void Annotate(const char* begin_varname, const char* end_varname,
+ const SomeDescriptor* descriptor) {
+ if (annotation_collector_ == NULL) {
+ // Annotations aren't turned on for this Printer, so don't pay the cost
+ // of building the location path.
+ return;
+ }
+ vector<int> path;
+ descriptor->GetLocationPath(&path);
+ Annotate(begin_varname, end_varname, descriptor->file()->name(), path);
+ }
+
// Print some text after applying variable substitutions. If a particular
// variable in the text is not defined, this will crash. Variables to be
// substituted are identified by their names surrounded by delimiter
@@ -86,8 +218,41 @@
void Print(const char* text, const char* variable1, const string& value1,
const char* variable2, const string& value2,
const char* variable3, const string& value3);
- // TODO(kenton): Overloaded versions with more variables? Three seems
- // to be enough.
+ // Like the first Print(), except the substitutions are given as parameters.
+ void Print(const char* text, const char* variable1, const string& value1,
+ const char* variable2, const string& value2,
+ const char* variable3, const string& value3,
+ const char* variable4, const string& value4);
+ // Like the first Print(), except the substitutions are given as parameters.
+ void Print(const char* text, const char* variable1, const string& value1,
+ const char* variable2, const string& value2,
+ const char* variable3, const string& value3,
+ const char* variable4, const string& value4,
+ const char* variable5, const string& value5);
+ // Like the first Print(), except the substitutions are given as parameters.
+ void Print(const char* text, const char* variable1, const string& value1,
+ const char* variable2, const string& value2,
+ const char* variable3, const string& value3,
+ const char* variable4, const string& value4,
+ const char* variable5, const string& value5,
+ const char* variable6, const string& value6);
+ // Like the first Print(), except the substitutions are given as parameters.
+ void Print(const char* text, const char* variable1, const string& value1,
+ const char* variable2, const string& value2,
+ const char* variable3, const string& value3,
+ const char* variable4, const string& value4,
+ const char* variable5, const string& value5,
+ const char* variable6, const string& value6,
+ const char* variable7, const string& value7);
+ // Like the first Print(), except the substitutions are given as parameters.
+ void Print(const char* text, const char* variable1, const string& value1,
+ const char* variable2, const string& value2,
+ const char* variable3, const string& value3,
+ const char* variable4, const string& value4,
+ const char* variable5, const string& value5,
+ const char* variable6, const string& value6,
+ const char* variable7, const string& value7,
+ const char* variable8, const string& value8);
// Indent text by two spaces. After calling Indent(), two spaces will be
// inserted at the beginning of each line of text. Indent() may be called
@@ -116,16 +281,48 @@
bool failed() const { return failed_; }
private:
+ // Link the output range defined by the substitution variables as emitted by
+ // the last call to Print to the object found at the SourceCodeInfo-style path
+ // in a file with path file_path. The range begins at the start of
+ // begin_varname's value and ends after the last character of the value
+ // substituted for end_varname. Note that begin_varname and end_varname
+ // may refer to the same variable.
+ void Annotate(const char* begin_varname, const char* end_varname,
+ const string& file_path, const vector<int>& path);
+
const char variable_delimiter_;
ZeroCopyOutputStream* const output_;
char* buffer_;
int buffer_size_;
+ // The current position, in bytes, in the output stream. This is equivalent
+ // to the total number of bytes that have been written so far. This value is
+ // used to calculate annotation ranges in the substitutions_ map below.
+ size_t offset_;
string indent_;
bool at_start_of_line_;
bool failed_;
+ // A map from variable name to [start, end) offsets in the output buffer.
+ // These refer to the offsets used for a variable after the last call to
+ // Print. If a variable was used more than once, the entry used in
+ // this map is set to a negative-length span. For singly-used variables, the
+ // start offset is the beginning of the substitution; the end offset is the
+ // last byte of the substitution plus one (such that (end - start) is the
+ // length of the substituted string).
+ map<string, pair<size_t, size_t> > substitutions_;
+
+ // Returns true and sets range to the substitution range in the output for
+ // varname if varname was used once in the last call to Print. If varname
+ // was not used, or if it was used multiple times, returns false (and
+ // fails a debug assertion).
+ bool GetSubstitutionRange(const char* varname, pair<size_t, size_t>* range);
+
+ // If non-null, annotation_collector_ is used to store annotations about
+ // generated code.
+ AnnotationCollector* const annotation_collector_;
+
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Printer);
};
diff --git a/darwin-x86_64/protoc/include/google/protobuf/io/strtod.h b/darwin-x86_64/protoc/include/google/protobuf/io/strtod.h
index c2efc8d..f56e41c 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/io/strtod.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/io/strtod.h
@@ -43,6 +43,11 @@
// uses a dot as the decimal separator.
double NoLocaleStrtod(const char* str, char** endptr);
+// Casts a double value to a float value. If the value is outside of the
+// representable range of float, it will be converted to positive or negative
+// infinity.
+float SafeDoubleToFloat(double value);
+
} // namespace io
} // namespace protobuf
diff --git a/darwin-x86_64/protoc/include/google/protobuf/io/tokenizer.h b/darwin-x86_64/protoc/include/google/protobuf/io/tokenizer.h
index 8c6220a..64ee7d8 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/io/tokenizer.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/io/tokenizer.h
@@ -40,6 +40,7 @@
#include <string>
#include <vector>
#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/logging.h>
namespace google {
namespace protobuf {
@@ -51,6 +52,12 @@
class ErrorCollector;
class Tokenizer;
+// By "column number", the proto compiler refers to a count of the number
+// of bytes before a given byte, except that a tab character advances to
+// the next multiple of 8 bytes. Note in particular that column numbers
+// are zero-based, while many user interfaces use one-based column numbers.
+typedef int ColumnNumber;
+
// Abstract interface for an object which collects the errors that occur
// during parsing. A typical implementation might simply print the errors
// to stdout.
@@ -62,13 +69,14 @@
// Indicates that there was an error in the input at the given line and
// column numbers. The numbers are zero-based, so you may want to add
// 1 to each before printing them.
- virtual void AddError(int line, int column, const string& message) = 0;
+ virtual void AddError(int line, ColumnNumber column,
+ const string& message) = 0;
// Indicates that there was a warning in the input at the given line and
// column numbers. The numbers are zero-based, so you may want to add
// 1 to each before printing them.
- virtual void AddWarning(int /* line */, int /* column */,
- const string& /* message */) { }
+ virtual void AddWarning(int line, ColumnNumber column,
+ const string& message) { }
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ErrorCollector);
@@ -123,8 +131,8 @@
// "line" and "column" specify the position of the first character of
// the token within the input stream. They are zero-based.
int line;
- int column;
- int end_column;
+ ColumnNumber column;
+ ColumnNumber end_column;
};
// Get the current token. This is updated when Next() is called. Before
@@ -262,7 +270,7 @@
// Line and column number of current_char_ within the whole input stream.
int line_;
- int column_;
+ ColumnNumber column_;
// String to which text should be appended as we advance through it.
// Call RecordTo(&str) to start recording and StopRecording() to stop.
@@ -279,6 +287,7 @@
// Since we count columns we need to interpret tabs somehow. We'll take
// the standard 8-character definition for lack of any way to do better.
+ // This must match the documentation of ColumnNumber.
static const int kTabWidth = 8;
// -----------------------------------------------------------------
@@ -350,7 +359,7 @@
// -----------------------------------------------------------------
// These helper methods make the parsing code more readable. The
- // "character classes" refered to are defined at the top of the .cc file.
+ // "character classes" referred to are defined at the top of the .cc file.
// Basically it is a C++ class with one method:
// static bool InClass(char c);
// The method returns true if c is a member of this "class", like "Letter"
diff --git a/darwin-x86_64/protoc/include/google/protobuf/io/zero_copy_stream_impl_lite.h b/darwin-x86_64/protoc/include/google/protobuf/io/zero_copy_stream_impl_lite.h
index e18da72..9d81ccf 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/io/zero_copy_stream_impl_lite.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/io/zero_copy_stream_impl_lite.h
@@ -44,10 +44,16 @@
#ifndef GOOGLE_PROTOBUF_IO_ZERO_COPY_STREAM_IMPL_LITE_H__
#define GOOGLE_PROTOBUF_IO_ZERO_COPY_STREAM_IMPL_LITE_H__
+#include <memory>
+#ifndef _SHARED_PTR_H
+#include <google/protobuf/stubs/shared_ptr.h>
+#endif
#include <string>
#include <iosfwd>
#include <google/protobuf/io/zero_copy_stream.h>
+#include <google/protobuf/stubs/callback.h>
#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/scoped_ptr.h>
#include <google/protobuf/stubs/stl_util.h>
@@ -127,8 +133,10 @@
class LIBPROTOBUF_EXPORT StringOutputStream : public ZeroCopyOutputStream {
public:
// Create a StringOutputStream which appends bytes to the given string.
- // The string remains property of the caller, but it MUST NOT be accessed
- // in any way until the stream is destroyed.
+ // The string remains property of the caller, but it is mutated in arbitrary
+ // ways and MUST NOT be accessed in any way until you're done with the
+ // stream. Either be sure there's no further usage, or (safest) destroy the
+ // stream before using the contents.
//
// Hint: If you call target->reserve(n) before creating the stream,
// the first call to Next() will return at least n bytes of buffer
@@ -141,6 +149,9 @@
void BackUp(int count);
int64 ByteCount() const;
+ protected:
+ void SetString(string* target);
+
private:
static const int kMinimumSize = 16;
@@ -149,6 +160,27 @@
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(StringOutputStream);
};
+// LazyStringOutputStream is a StringOutputStream with lazy acquisition of
+// the output string from a callback. The string is owned externally, and not
+// deleted in the stream destructor.
+class LIBPROTOBUF_EXPORT LazyStringOutputStream : public StringOutputStream {
+ public:
+ // Callback should be permanent (non-self-deleting). Ownership is transferred
+ // to the LazyStringOutputStream.
+ explicit LazyStringOutputStream(ResultCallback<string*>* callback);
+ ~LazyStringOutputStream();
+
+ // implements ZeroCopyOutputStream, overriding StringOutputStream -----------
+ bool Next(void** data, int* size);
+ int64 ByteCount() const;
+
+ private:
+ const google::protobuf::scoped_ptr<ResultCallback<string*> > callback_;
+ bool string_is_set_;
+
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(LazyStringOutputStream);
+};
+
// Note: There is no StringInputStream. Instead, just create an
// ArrayInputStream as follows:
// ArrayInputStream input(str.data(), str.size());
@@ -232,7 +264,7 @@
// Data is read into this buffer. It may be NULL if no buffer is currently
// in use. Otherwise, it points to an array of size buffer_size_.
- scoped_array<uint8> buffer_;
+ google::protobuf::scoped_array<uint8> buffer_;
const int buffer_size_;
// Number of valid bytes currently in the buffer (i.e. the size last
@@ -321,7 +353,7 @@
// Data is written from this buffer. It may be NULL if no buffer is
// currently in use. Otherwise, it points to an array of size buffer_size_.
- scoped_array<uint8> buffer_;
+ google::protobuf::scoped_array<uint8> buffer_;
const int buffer_size_;
// Number of valid bytes currently in the buffer (i.e. the size last
@@ -334,6 +366,18 @@
// ===================================================================
+// mutable_string_data() and as_string_data() are workarounds to improve
+// the performance of writing new data to an existing string. Unfortunately
+// the methods provided by the string class are suboptimal, and using memcpy()
+// is mildly annoying because it requires its pointer args to be non-NULL even
+// if we ask it to copy 0 bytes. Furthermore, string_as_array() has the
+// property that it always returns NULL if its arg is the empty string, exactly
+// what we want to avoid if we're using it in conjunction with memcpy()!
+// With C++11, the desired memcpy() boils down to memcpy(..., &(*s)[0], size),
+// where s is a string*. Without C++11, &(*s)[0] is not guaranteed to be safe,
+// so we use string_as_array(), and live with the extra logic that tests whether
+// *s is empty.
+
// Return a pointer to mutable characters underlying the given string. The
// 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().
@@ -347,6 +391,19 @@
#endif
}
+// as_string_data(s) is equivalent to
+// ({ char* p = mutable_string_data(s); make_pair(p, p != NULL); })
+// Sometimes it's faster: in some scenarios p cannot be NULL, and then the
+// code can avoid that check.
+inline std::pair<char*, bool> as_string_data(string* s) {
+ char *p = mutable_string_data(s);
+#ifdef LANG_CXX11
+ return std::make_pair(p, true);
+#else
+ return make_pair(p, p != NULL);
+#endif
+}
+
} // namespace io
} // namespace protobuf
diff --git a/darwin-x86_64/protoc/include/google/protobuf/map.h b/darwin-x86_64/protoc/include/google/protobuf/map.h
new file mode 100644
index 0000000..31593c1
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/map.h
@@ -0,0 +1,1724 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_MAP_H__
+#define GOOGLE_PROTOBUF_MAP_H__
+
+#include <google/protobuf/stubs/hash.h>
+#include <iterator>
+#include <limits> // To support Visual Studio 2008
+#include <set>
+#include <utility>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/arena.h>
+#include <google/protobuf/generated_enum_util.h>
+#include <google/protobuf/map_type_handler.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/descriptor.h>
+#if __cpp_exceptions && LANG_CXX11
+#include <random>
+#endif
+
+namespace google {
+namespace protobuf {
+
+// The Map and MapIterator types are provided by this header file.
+// Please avoid using other types defined here, unless they are public
+// types within Map or MapIterator, such as Map::value_type.
+template <typename Key, typename T>
+class Map;
+
+class MapIterator;
+
+template <typename Enum> struct is_proto_enum;
+
+namespace internal {
+template <typename Key, typename T,
+ WireFormatLite::FieldType key_wire_type,
+ WireFormatLite::FieldType value_wire_type,
+ int default_enum_value>
+class MapFieldLite;
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType key_wire_type,
+ WireFormatLite::FieldType value_wire_type,
+ int default_enum_value>
+class MapField;
+
+template <typename Key, typename T>
+class TypeDefinedMapFieldBase;
+
+class DynamicMapField;
+
+class GeneratedMessageReflection;
+} // namespace internal
+
+#define TYPE_CHECK(EXPECTEDTYPE, METHOD) \
+ if (type() != EXPECTEDTYPE) { \
+ GOOGLE_LOG(FATAL) \
+ << "Protocol Buffer map usage error:\n" \
+ << METHOD << " type does not match\n" \
+ << " Expected : " \
+ << FieldDescriptor::CppTypeName(EXPECTEDTYPE) << "\n" \
+ << " Actual : " \
+ << FieldDescriptor::CppTypeName(type()); \
+ }
+
+// MapKey is an union type for representing any possible
+// map key.
+class LIBPROTOBUF_EXPORT MapKey {
+ public:
+ MapKey() : type_(0) {
+ }
+ MapKey(const MapKey& other) : type_(0) {
+ CopyFrom(other);
+ }
+
+ ~MapKey() {
+ if (type_ == FieldDescriptor::CPPTYPE_STRING) {
+ delete val_.string_value_;
+ }
+ }
+
+ FieldDescriptor::CppType type() const {
+ if (type_ == 0) {
+ GOOGLE_LOG(FATAL)
+ << "Protocol Buffer map usage error:\n"
+ << "MapKey::type MapKey is not initialized. "
+ << "Call set methods to initialize MapKey.";
+ }
+ return (FieldDescriptor::CppType)type_;
+ }
+
+ void SetInt64Value(int64 value) {
+ SetType(FieldDescriptor::CPPTYPE_INT64);
+ val_.int64_value_ = value;
+ }
+ void SetUInt64Value(uint64 value) {
+ SetType(FieldDescriptor::CPPTYPE_UINT64);
+ val_.uint64_value_ = value;
+ }
+ void SetInt32Value(int32 value) {
+ SetType(FieldDescriptor::CPPTYPE_INT32);
+ val_.int32_value_ = value;
+ }
+ void SetUInt32Value(uint32 value) {
+ SetType(FieldDescriptor::CPPTYPE_UINT32);
+ val_.uint32_value_ = value;
+ }
+ void SetBoolValue(bool value) {
+ SetType(FieldDescriptor::CPPTYPE_BOOL);
+ val_.bool_value_ = value;
+ }
+ void SetStringValue(const string& val) {
+ SetType(FieldDescriptor::CPPTYPE_STRING);
+ *val_.string_value_ = val;
+ }
+
+ int64 GetInt64Value() const {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_INT64,
+ "MapKey::GetInt64Value");
+ return val_.int64_value_;
+ }
+ uint64 GetUInt64Value() const {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_UINT64,
+ "MapKey::GetUInt64Value");
+ return val_.uint64_value_;
+ }
+ int32 GetInt32Value() const {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_INT32,
+ "MapKey::GetInt32Value");
+ return val_.int32_value_;
+ }
+ uint32 GetUInt32Value() const {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_UINT32,
+ "MapKey::GetUInt32Value");
+ return val_.uint32_value_;
+ }
+ bool GetBoolValue() const {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_BOOL,
+ "MapKey::GetBoolValue");
+ return val_.bool_value_;
+ }
+ const string& GetStringValue() const {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_STRING,
+ "MapKey::GetStringValue");
+ return *val_.string_value_;
+ }
+
+ bool operator<(const MapKey& other) const {
+ if (type_ != other.type_) {
+ // We could define a total order that handles this case, but
+ // there currently no need. So, for now, fail.
+ GOOGLE_LOG(FATAL) << "Unsupported: type mismatch";
+ }
+ switch (type()) {
+ case FieldDescriptor::CPPTYPE_DOUBLE:
+ case FieldDescriptor::CPPTYPE_FLOAT:
+ case FieldDescriptor::CPPTYPE_ENUM:
+ case FieldDescriptor::CPPTYPE_MESSAGE:
+ GOOGLE_LOG(FATAL) << "Unsupported";
+ return false;
+ case FieldDescriptor::CPPTYPE_STRING:
+ return *val_.string_value_ < *other.val_.string_value_;
+ case FieldDescriptor::CPPTYPE_INT64:
+ return val_.int64_value_ < other.val_.int64_value_;
+ case FieldDescriptor::CPPTYPE_INT32:
+ return val_.int32_value_ < other.val_.int32_value_;
+ case FieldDescriptor::CPPTYPE_UINT64:
+ return val_.uint64_value_ < other.val_.uint64_value_;
+ case FieldDescriptor::CPPTYPE_UINT32:
+ return val_.uint32_value_ < other.val_.uint32_value_;
+ case FieldDescriptor::CPPTYPE_BOOL:
+ return val_.bool_value_ < other.val_.bool_value_;
+ }
+ return false;
+ }
+
+ bool operator==(const MapKey& other) const {
+ if (type_ != other.type_) {
+ // To be consistent with operator<, we don't allow this either.
+ GOOGLE_LOG(FATAL) << "Unsupported: type mismatch";
+ }
+ switch (type()) {
+ case FieldDescriptor::CPPTYPE_DOUBLE:
+ case FieldDescriptor::CPPTYPE_FLOAT:
+ case FieldDescriptor::CPPTYPE_ENUM:
+ case FieldDescriptor::CPPTYPE_MESSAGE:
+ GOOGLE_LOG(FATAL) << "Unsupported";
+ break;
+ case FieldDescriptor::CPPTYPE_STRING:
+ return *val_.string_value_ == *other.val_.string_value_;
+ case FieldDescriptor::CPPTYPE_INT64:
+ return val_.int64_value_ == other.val_.int64_value_;
+ case FieldDescriptor::CPPTYPE_INT32:
+ return val_.int32_value_ == other.val_.int32_value_;
+ case FieldDescriptor::CPPTYPE_UINT64:
+ return val_.uint64_value_ == other.val_.uint64_value_;
+ case FieldDescriptor::CPPTYPE_UINT32:
+ return val_.uint32_value_ == other.val_.uint32_value_;
+ case FieldDescriptor::CPPTYPE_BOOL:
+ return val_.bool_value_ == other.val_.bool_value_;
+ }
+ GOOGLE_LOG(FATAL) << "Can't get here.";
+ return false;
+ }
+
+ void CopyFrom(const MapKey& other) {
+ SetType(other.type());
+ switch (type_) {
+ case FieldDescriptor::CPPTYPE_DOUBLE:
+ case FieldDescriptor::CPPTYPE_FLOAT:
+ case FieldDescriptor::CPPTYPE_ENUM:
+ case FieldDescriptor::CPPTYPE_MESSAGE:
+ GOOGLE_LOG(FATAL) << "Unsupported";
+ break;
+ case FieldDescriptor::CPPTYPE_STRING:
+ *val_.string_value_ = *other.val_.string_value_;
+ break;
+ case FieldDescriptor::CPPTYPE_INT64:
+ val_.int64_value_ = other.val_.int64_value_;
+ break;
+ case FieldDescriptor::CPPTYPE_INT32:
+ val_.int32_value_ = other.val_.int32_value_;
+ break;
+ case FieldDescriptor::CPPTYPE_UINT64:
+ val_.uint64_value_ = other.val_.uint64_value_;
+ break;
+ case FieldDescriptor::CPPTYPE_UINT32:
+ val_.uint32_value_ = other.val_.uint32_value_;
+ break;
+ case FieldDescriptor::CPPTYPE_BOOL:
+ val_.bool_value_ = other.val_.bool_value_;
+ break;
+ }
+ }
+
+ private:
+ template <typename K, typename V>
+ friend class internal::TypeDefinedMapFieldBase;
+ friend class MapIterator;
+ friend class internal::DynamicMapField;
+
+ union KeyValue {
+ KeyValue() {}
+ string* string_value_;
+ int64 int64_value_;
+ int32 int32_value_;
+ uint64 uint64_value_;
+ uint32 uint32_value_;
+ bool bool_value_;
+ } val_;
+
+ void SetType(FieldDescriptor::CppType type) {
+ if (type_ == type) return;
+ if (type_ == FieldDescriptor::CPPTYPE_STRING) {
+ delete val_.string_value_;
+ }
+ type_ = type;
+ if (type_ == FieldDescriptor::CPPTYPE_STRING) {
+ val_.string_value_ = new string;
+ }
+ }
+
+ // type_ is 0 or a valid FieldDescriptor::CppType.
+ int type_;
+};
+
+// MapValueRef points to a map value.
+class LIBPROTOBUF_EXPORT MapValueRef {
+ public:
+ MapValueRef() : data_(NULL), type_(0) {}
+
+ void SetInt64Value(int64 value) {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_INT64,
+ "MapValueRef::SetInt64Value");
+ *reinterpret_cast<int64*>(data_) = value;
+ }
+ void SetUInt64Value(uint64 value) {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_UINT64,
+ "MapValueRef::SetUInt64Value");
+ *reinterpret_cast<uint64*>(data_) = value;
+ }
+ void SetInt32Value(int32 value) {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_INT32,
+ "MapValueRef::SetInt32Value");
+ *reinterpret_cast<int32*>(data_) = value;
+ }
+ void SetUInt32Value(uint32 value) {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_UINT32,
+ "MapValueRef::SetUInt32Value");
+ *reinterpret_cast<uint32*>(data_) = value;
+ }
+ void SetBoolValue(bool value) {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_BOOL,
+ "MapValueRef::SetBoolValue");
+ *reinterpret_cast<bool*>(data_) = value;
+ }
+ // TODO(jieluo) - Checks that enum is member.
+ void SetEnumValue(int value) {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_ENUM,
+ "MapValueRef::SetEnumValue");
+ *reinterpret_cast<int*>(data_) = value;
+ }
+ void SetStringValue(const string& value) {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_STRING,
+ "MapValueRef::SetStringValue");
+ *reinterpret_cast<string*>(data_) = value;
+ }
+ void SetFloatValue(float value) {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_FLOAT,
+ "MapValueRef::SetFloatValue");
+ *reinterpret_cast<float*>(data_) = value;
+ }
+ void SetDoubleValue(double value) {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_DOUBLE,
+ "MapValueRef::SetDoubleValue");
+ *reinterpret_cast<double*>(data_) = value;
+ }
+
+ int64 GetInt64Value() const {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_INT64,
+ "MapValueRef::GetInt64Value");
+ return *reinterpret_cast<int64*>(data_);
+ }
+ uint64 GetUInt64Value() const {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_UINT64,
+ "MapValueRef::GetUInt64Value");
+ return *reinterpret_cast<uint64*>(data_);
+ }
+ int32 GetInt32Value() const {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_INT32,
+ "MapValueRef::GetInt32Value");
+ return *reinterpret_cast<int32*>(data_);
+ }
+ uint32 GetUInt32Value() const {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_UINT32,
+ "MapValueRef::GetUInt32Value");
+ return *reinterpret_cast<uint32*>(data_);
+ }
+ bool GetBoolValue() const {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_BOOL,
+ "MapValueRef::GetBoolValue");
+ return *reinterpret_cast<bool*>(data_);
+ }
+ int GetEnumValue() const {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_ENUM,
+ "MapValueRef::GetEnumValue");
+ return *reinterpret_cast<int*>(data_);
+ }
+ const string& GetStringValue() const {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_STRING,
+ "MapValueRef::GetStringValue");
+ return *reinterpret_cast<string*>(data_);
+ }
+ float GetFloatValue() const {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_FLOAT,
+ "MapValueRef::GetFloatValue");
+ return *reinterpret_cast<float*>(data_);
+ }
+ double GetDoubleValue() const {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_DOUBLE,
+ "MapValueRef::GetDoubleValue");
+ return *reinterpret_cast<double*>(data_);
+ }
+
+ const Message& GetMessageValue() const {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_MESSAGE,
+ "MapValueRef::GetMessageValue");
+ return *reinterpret_cast<Message*>(data_);
+ }
+
+ Message* MutableMessageValue() {
+ TYPE_CHECK(FieldDescriptor::CPPTYPE_MESSAGE,
+ "MapValueRef::MutableMessageValue");
+ return reinterpret_cast<Message*>(data_);
+ }
+
+ private:
+ template <typename K, typename V,
+ internal::WireFormatLite::FieldType key_wire_type,
+ internal::WireFormatLite::FieldType value_wire_type,
+ int default_enum_value>
+ friend class internal::MapField;
+ template <typename K, typename V>
+ friend class internal::TypeDefinedMapFieldBase;
+ friend class MapIterator;
+ friend class internal::GeneratedMessageReflection;
+ friend class internal::DynamicMapField;
+
+ void SetType(FieldDescriptor::CppType type) {
+ type_ = type;
+ }
+
+ FieldDescriptor::CppType type() const {
+ if (type_ == 0 || data_ == NULL) {
+ GOOGLE_LOG(FATAL)
+ << "Protocol Buffer map usage error:\n"
+ << "MapValueRef::type MapValueRef is not initialized.";
+ }
+ return (FieldDescriptor::CppType)type_;
+ }
+ void SetValue(const void* val) {
+ data_ = const_cast<void*>(val);
+ }
+ void CopyFrom(const MapValueRef& other) {
+ type_ = other.type_;
+ data_ = other.data_;
+ }
+ // Only used in DynamicMapField
+ void DeleteData() {
+ switch (type_) {
+#define HANDLE_TYPE(CPPTYPE, TYPE) \
+ case google::protobuf::FieldDescriptor::CPPTYPE_##CPPTYPE: { \
+ delete reinterpret_cast<TYPE*>(data_); \
+ break; \
+ }
+ HANDLE_TYPE(INT32, int32);
+ HANDLE_TYPE(INT64, int64);
+ HANDLE_TYPE(UINT32, uint32);
+ HANDLE_TYPE(UINT64, uint64);
+ HANDLE_TYPE(DOUBLE, double);
+ HANDLE_TYPE(FLOAT, float);
+ HANDLE_TYPE(BOOL, bool);
+ HANDLE_TYPE(STRING, string);
+ HANDLE_TYPE(ENUM, int32);
+ HANDLE_TYPE(MESSAGE, Message);
+#undef HANDLE_TYPE
+ }
+ }
+ // data_ point to a map value. MapValueRef does not
+ // own this value.
+ void* data_;
+ // type_ is 0 or a valid FieldDescriptor::CppType.
+ int type_;
+};
+
+#undef TYPE_CHECK
+
+// This is the class for google::protobuf::Map's internal value_type. Instead of using
+// std::pair as value_type, we use this class which provides us more control of
+// its process of construction and destruction.
+template <typename Key, typename T>
+class MapPair {
+ public:
+ typedef const Key first_type;
+ typedef T second_type;
+
+ MapPair(const Key& other_first, const T& other_second)
+ : first(other_first), second(other_second) {}
+ explicit MapPair(const Key& other_first) : first(other_first), second() {}
+ MapPair(const MapPair& other)
+ : first(other.first), second(other.second) {}
+
+ ~MapPair() {}
+
+ // Implicitly convertible to std::pair of compatible types.
+ template <typename T1, typename T2>
+ operator std::pair<T1, T2>() const {
+ return std::pair<T1, T2>(first, second);
+ }
+
+ const Key first;
+ T second;
+
+ private:
+ friend class ::google::protobuf::Arena;
+ friend class Map<Key, T>;
+};
+
+// google::protobuf::Map is an associative container type used to store protobuf map
+// fields. Each Map instance may or may not use a different hash function, a
+// different iteration order, and so on. E.g., please don't examine
+// implementation details to decide if the following would work:
+// Map<int, int> m0, m1;
+// m0[0] = m1[0] = m0[1] = m1[1] = 0;
+// assert(m0.begin()->first == m1.begin()->first); // Bug!
+//
+// Map's interface is similar to std::unordered_map, except that Map is not
+// designed to play well with exceptions.
+template <typename Key, typename T>
+class Map {
+ public:
+ typedef Key key_type;
+ typedef T mapped_type;
+ typedef MapPair<Key, T> value_type;
+
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+
+ typedef size_t size_type;
+ typedef hash<Key> hasher;
+
+ Map(bool old_style = true)
+ : arena_(NULL),
+ default_enum_value_(0),
+ old_style_(old_style) {
+ Init();
+ }
+ explicit Map(Arena* arena, bool old_style = true)
+ : arena_(arena),
+ default_enum_value_(0),
+ old_style_(old_style) {
+ Init();
+ }
+ Map(const Map& other)
+ : arena_(NULL),
+ default_enum_value_(other.default_enum_value_),
+ old_style_(other.old_style_) {
+ Init();
+ insert(other.begin(), other.end());
+ }
+ template <class InputIt>
+ Map(const InputIt& first, const InputIt& last, bool old_style = true)
+ : arena_(NULL),
+ default_enum_value_(0),
+ old_style_(old_style) {
+ Init();
+ insert(first, last);
+ }
+
+ ~Map() {
+ clear();
+ if (arena_ == NULL) {
+ if (old_style_)
+ delete deprecated_elements_;
+ else
+ delete elements_;
+ }
+ }
+
+ private:
+ void Init() {
+ if (old_style_)
+ deprecated_elements_ = Arena::Create<DeprecatedInnerMap>(
+ arena_, 0, hasher(), equal_to<Key>(),
+ MapAllocator<std::pair<const Key, MapPair<Key, T>*> >(arena_));
+ else
+ elements_ =
+ Arena::Create<InnerMap>(arena_, 0, hasher(), Allocator(arena_));
+ }
+
+ // re-implement std::allocator to use arena allocator for memory allocation.
+ // Used for google::protobuf::Map implementation. Users should not use this class
+ // directly.
+ template <typename U>
+ class MapAllocator {
+ public:
+ typedef U value_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+
+ MapAllocator() : arena_(NULL) {}
+ explicit MapAllocator(Arena* arena) : arena_(arena) {}
+ template <typename X>
+ MapAllocator(const MapAllocator<X>& allocator)
+ : arena_(allocator.arena()) {}
+
+ pointer allocate(size_type n, const_pointer hint = 0) {
+ // If arena is not given, malloc needs to be called which doesn't
+ // construct element object.
+ if (arena_ == NULL) {
+ return reinterpret_cast<pointer>(malloc(n * sizeof(value_type)));
+ } else {
+ return reinterpret_cast<pointer>(
+ Arena::CreateArray<uint8>(arena_, n * sizeof(value_type)));
+ }
+ }
+
+ void deallocate(pointer p, size_type n) {
+ if (arena_ == NULL) {
+ free(p);
+ }
+ }
+
+#if __cplusplus >= 201103L && !defined(GOOGLE_PROTOBUF_OS_APPLE) && \
+ !defined(GOOGLE_PROTOBUF_OS_NACL) && \
+ !defined(GOOGLE_PROTOBUF_OS_ANDROID) && \
+ !defined(GOOGLE_PROTOBUF_OS_EMSCRIPTEN)
+ template<class NodeType, class... Args>
+ void construct(NodeType* p, Args&&... args) {
+ // Clang 3.6 doesn't compile static casting to void* directly. (Issue
+ // #1266) According C++ standard 5.2.9/1: "The static_cast operator shall
+ // not cast away constness". So first the maybe const pointer is casted to
+ // const void* and after the const void* is const casted.
+ new (const_cast<void*>(static_cast<const void*>(p)))
+ NodeType(std::forward<Args>(args)...);
+ }
+
+ template<class NodeType>
+ void destroy(NodeType* p) {
+ p->~NodeType();
+ }
+#else
+ void construct(pointer p, const_reference t) { new (p) value_type(t); }
+
+ void destroy(pointer p) { p->~value_type(); }
+#endif
+
+ template <typename X>
+ struct rebind {
+ typedef MapAllocator<X> other;
+ };
+
+ template <typename X>
+ bool operator==(const MapAllocator<X>& other) const {
+ return arena_ == other.arena_;
+ }
+
+ template <typename X>
+ bool operator!=(const MapAllocator<X>& other) const {
+ return arena_ != other.arena_;
+ }
+
+ // To support Visual Studio 2008
+ size_type max_size() const {
+ return std::numeric_limits<size_type>::max();
+ }
+
+ // To support gcc-4.4, which does not properly
+ // support templated friend classes
+ Arena* arena() const {
+ return arena_;
+ }
+
+ private:
+ typedef void DestructorSkippable_;
+ Arena* const arena_;
+ };
+
+ // InnerMap's key type is Key and its value type is value_type*. We use a
+ // custom class here and for Node, below, to ensure that k_ is at offset 0,
+ // allowing safe conversion from pointer to Node to pointer to Key, and vice
+ // versa when appropriate.
+ class KeyValuePair {
+ public:
+ KeyValuePair(const Key& k, value_type* v) : k_(k), v_(v) {}
+
+ const Key& key() const { return k_; }
+ Key& key() { return k_; }
+ value_type* const value() const { return v_; }
+ value_type*& value() { return v_; }
+
+ private:
+ Key k_;
+ value_type* v_;
+ };
+
+ typedef MapAllocator<KeyValuePair> Allocator;
+
+ // InnerMap is a generic hash-based map. It doesn't contain any
+ // protocol-buffer-specific logic. It is a chaining hash map with the
+ // additional feature that some buckets can be converted to use an ordered
+ // container. This ensures O(lg n) bounds on find, insert, and erase, while
+ // avoiding the overheads of ordered containers most of the time.
+ //
+ // The implementation doesn't need the full generality of unordered_map,
+ // and it doesn't have it. More bells and whistles can be added as needed.
+ // Some implementation details:
+ // 1. The hash function has type hasher and the equality function
+ // equal_to<Key>. We inherit from hasher to save space
+ // (empty-base-class optimization).
+ // 2. The number of buckets is a power of two.
+ // 3. Buckets are converted to trees in pairs: if we convert bucket b then
+ // buckets b and b^1 will share a tree. Invariant: buckets b and b^1 have
+ // the same non-NULL value iff they are sharing a tree. (An alternative
+ // implementation strategy would be to have a tag bit per bucket.)
+ // 4. As is typical for hash_map and such, the Keys and Values are always
+ // stored in linked list nodes. Pointers to elements are never invalidated
+ // until the element is deleted.
+ // 5. The trees' payload type is pointer to linked-list node. Tree-converting
+ // a bucket doesn't copy Key-Value pairs.
+ // 6. Once we've tree-converted a bucket, it is never converted back. However,
+ // the items a tree contains may wind up assigned to trees or lists upon a
+ // rehash.
+ // 7. The code requires no C++ features from C++11 or later.
+ // 8. Mutations to a map do not invalidate the map's iterators, pointers to
+ // elements, or references to elements.
+ // 9. Except for erase(iterator), any non-const method can reorder iterators.
+ class InnerMap : private hasher {
+ public:
+ typedef value_type* Value;
+
+ InnerMap(size_type n, hasher h, Allocator alloc)
+ : hasher(h),
+ num_elements_(0),
+ seed_(Seed()),
+ table_(NULL),
+ alloc_(alloc) {
+ n = TableSize(n);
+ table_ = CreateEmptyTable(n);
+ num_buckets_ = index_of_first_non_null_ = n;
+ }
+
+ ~InnerMap() {
+ if (table_ != NULL) {
+ clear();
+ Dealloc<void*>(table_, num_buckets_);
+ }
+ }
+
+ private:
+ enum { kMinTableSize = 8 };
+
+ // Linked-list nodes, as one would expect for a chaining hash table.
+ struct Node {
+ KeyValuePair kv;
+ Node* next;
+ };
+
+ // This is safe only if the given pointer is known to point to a Key that is
+ // part of a Node.
+ static Node* NodePtrFromKeyPtr(Key* k) {
+ return reinterpret_cast<Node*>(k);
+ }
+
+ static Key* KeyPtrFromNodePtr(Node* node) { return &node->kv.key(); }
+
+ // Trees. The payload type is pointer to Key, so that we can query the tree
+ // with Keys that are not in any particular data structure. When we insert,
+ // though, the pointer is always pointing to a Key that is inside a Node.
+ struct KeyCompare {
+ bool operator()(const Key* n0, const Key* n1) const { return *n0 < *n1; }
+ };
+ typedef typename Allocator::template rebind<Key*>::other KeyPtrAllocator;
+ typedef std::set<Key*, KeyCompare, KeyPtrAllocator> Tree;
+
+ // iterator and const_iterator are instantiations of iterator_base.
+ template <typename KeyValueType>
+ class iterator_base {
+ public:
+ typedef KeyValueType& reference;
+ typedef KeyValueType* pointer;
+ typedef typename Tree::iterator TreeIterator;
+
+ // Invariants:
+ // node_ is always correct. This is handy because the most common
+ // operations are operator* and operator-> and they only use node_.
+ // When node_ is set to a non-NULL value, all the other non-const fields
+ // are updated to be correct also, but those fields can become stale
+ // if the underlying map is modified. When those fields are needed they
+ // are rechecked, and updated if necessary.
+ iterator_base() : node_(NULL) {}
+
+ explicit iterator_base(const InnerMap* m) : m_(m) {
+ SearchFrom(m->index_of_first_non_null_);
+ }
+
+ // Any iterator_base can convert to any other. This is overkill, and we
+ // rely on the enclosing class to use it wisely. The standard "iterator
+ // can convert to const_iterator" is OK but the reverse direction is not.
+ template <typename U>
+ explicit iterator_base(const iterator_base<U>& it)
+ : node_(it.node_),
+ m_(it.m_),
+ bucket_index_(it.bucket_index_),
+ tree_it_(it.tree_it_) {}
+
+ iterator_base(Node* n, const InnerMap* m, size_type index)
+ : node_(n),
+ m_(m),
+ bucket_index_(index) {}
+
+ iterator_base(TreeIterator tree_it, const InnerMap* m, size_type index)
+ : node_(NodePtrFromKeyPtr(*tree_it)),
+ m_(m),
+ bucket_index_(index),
+ tree_it_(tree_it) {
+ // Invariant: iterators that use tree_it_ have an even bucket_index_.
+ GOOGLE_DCHECK_EQ(bucket_index_ % 2, 0);
+ }
+
+ // Advance through buckets, looking for the first that isn't empty.
+ // If nothing non-empty is found then leave node_ == NULL.
+ void SearchFrom(size_type start_bucket) {
+ GOOGLE_DCHECK(m_->index_of_first_non_null_ == m_->num_buckets_ ||
+ m_->table_[m_->index_of_first_non_null_] != NULL);
+ node_ = NULL;
+ for (bucket_index_ = start_bucket; bucket_index_ < m_->num_buckets_;
+ bucket_index_++) {
+ if (m_->TableEntryIsNonEmptyList(bucket_index_)) {
+ node_ = static_cast<Node*>(m_->table_[bucket_index_]);
+ break;
+ } else if (m_->TableEntryIsTree(bucket_index_)) {
+ Tree* tree = static_cast<Tree*>(m_->table_[bucket_index_]);
+ GOOGLE_DCHECK(!tree->empty());
+ tree_it_ = tree->begin();
+ node_ = NodePtrFromKeyPtr(*tree_it_);
+ break;
+ }
+ }
+ }
+
+ reference operator*() const { return node_->kv; }
+ pointer operator->() const { return &(operator*()); }
+
+ friend bool operator==(const iterator_base& a, const iterator_base& b) {
+ return a.node_ == b.node_;
+ }
+ friend bool operator!=(const iterator_base& a, const iterator_base& b) {
+ return a.node_ != b.node_;
+ }
+
+ iterator_base& operator++() {
+ if (node_->next == NULL) {
+ const bool is_list = revalidate_if_necessary();
+ if (is_list) {
+ SearchFrom(bucket_index_ + 1);
+ } else {
+ GOOGLE_DCHECK_EQ(bucket_index_ & 1, 0);
+ Tree* tree = static_cast<Tree*>(m_->table_[bucket_index_]);
+ if (++tree_it_ == tree->end()) {
+ SearchFrom(bucket_index_ + 2);
+ } else {
+ node_ = NodePtrFromKeyPtr(*tree_it_);
+ }
+ }
+ } else {
+ node_ = node_->next;
+ }
+ return *this;
+ }
+
+ iterator_base operator++(int /* unused */) {
+ iterator_base tmp = *this;
+ ++*this;
+ return tmp;
+ }
+
+ // Assumes node_ and m_ are correct and non-NULL, but other fields may be
+ // stale. Fix them as needed. Then return true iff node_ points to a
+ // Node in a list.
+ bool revalidate_if_necessary() {
+ GOOGLE_DCHECK(node_ != NULL && m_ != NULL);
+ // Force bucket_index_ to be in range.
+ bucket_index_ &= (m_->num_buckets_ - 1);
+ // Common case: the bucket we think is relevant points to node_.
+ if (m_->table_[bucket_index_] == static_cast<void*>(node_))
+ return true;
+ // Less common: the bucket is a linked list with node_ somewhere in it,
+ // but not at the head.
+ if (m_->TableEntryIsNonEmptyList(bucket_index_)) {
+ Node* l = static_cast<Node*>(m_->table_[bucket_index_]);
+ while ((l = l->next) != NULL) {
+ if (l == node_) {
+ return true;
+ }
+ }
+ }
+ // Well, bucket_index_ still might be correct, but probably
+ // not. Revalidate just to be sure. This case is rare enough that we
+ // don't worry about potential optimizations, such as having a custom
+ // find-like method that compares Node* instead of const Key&.
+ iterator_base i(m_->find(*KeyPtrFromNodePtr(node_)));
+ bucket_index_ = i.bucket_index_;
+ tree_it_ = i.tree_it_;
+ return m_->TableEntryIsList(bucket_index_);
+ }
+
+ Node* node_;
+ const InnerMap* m_;
+ size_type bucket_index_;
+ TreeIterator tree_it_;
+ };
+
+ public:
+ typedef iterator_base<KeyValuePair> iterator;
+ typedef iterator_base<const KeyValuePair> const_iterator;
+
+ iterator begin() { return iterator(this); }
+ iterator end() { return iterator(); }
+ const_iterator begin() const { return const_iterator(this); }
+ const_iterator end() const { return const_iterator(); }
+
+ void clear() {
+ for (size_type b = 0; b < num_buckets_; b++) {
+ if (TableEntryIsNonEmptyList(b)) {
+ Node* node = static_cast<Node*>(table_[b]);
+ table_[b] = NULL;
+ do {
+ Node* next = node->next;
+ DestroyNode(node);
+ node = next;
+ } while (node != NULL);
+ } else if (TableEntryIsTree(b)) {
+ Tree* tree = static_cast<Tree*>(table_[b]);
+ GOOGLE_DCHECK(table_[b] == table_[b + 1] && (b & 1) == 0);
+ table_[b] = table_[b + 1] = NULL;
+ typename Tree::iterator tree_it = tree->begin();
+ do {
+ Node* node = NodePtrFromKeyPtr(*tree_it);
+ typename Tree::iterator next = tree_it;
+ ++next;
+ tree->erase(tree_it);
+ DestroyNode(node);
+ tree_it = next;
+ } while (tree_it != tree->end());
+ DestroyTree(tree);
+ b++;
+ }
+ }
+ num_elements_ = 0;
+ index_of_first_non_null_ = num_buckets_;
+ }
+
+ const hasher& hash_function() const { return *this; }
+
+ static size_type max_size() {
+ return static_cast<size_type>(1) << (sizeof(void**) >= 8 ? 60 : 28);
+ }
+ size_type size() const { return num_elements_; }
+ bool empty() const { return size() == 0; }
+
+ iterator find(const Key& k) { return iterator(FindHelper(k).first); }
+ const_iterator find(const Key& k) const { return FindHelper(k).first; }
+
+ // In traditional C++ style, this performs "insert if not present."
+ std::pair<iterator, bool> insert(const KeyValuePair& kv) {
+ std::pair<const_iterator, size_type> p = FindHelper(kv.key());
+ // Case 1: key was already present.
+ if (p.first.node_ != NULL)
+ return std::make_pair(iterator(p.first), false);
+ // Case 2: insert.
+ if (ResizeIfLoadIsOutOfRange(num_elements_ + 1)) {
+ p = FindHelper(kv.key());
+ }
+ const size_type b = p.second; // bucket number
+ Node* node = Alloc<Node>(1);
+ alloc_.construct(&node->kv, kv);
+ iterator result = InsertUnique(b, node);
+ ++num_elements_;
+ return std::make_pair(result, true);
+ }
+
+ // The same, but if an insertion is necessary then the value portion of the
+ // inserted key-value pair is left uninitialized.
+ std::pair<iterator, bool> insert(const Key& k) {
+ std::pair<const_iterator, size_type> p = FindHelper(k);
+ // Case 1: key was already present.
+ if (p.first.node_ != NULL)
+ return std::make_pair(iterator(p.first), false);
+ // Case 2: insert.
+ if (ResizeIfLoadIsOutOfRange(num_elements_ + 1)) {
+ p = FindHelper(k);
+ }
+ const size_type b = p.second; // bucket number
+ Node* node = Alloc<Node>(1);
+ typedef typename Allocator::template rebind<Key>::other KeyAllocator;
+ KeyAllocator(alloc_).construct(&node->kv.key(), k);
+ iterator result = InsertUnique(b, node);
+ ++num_elements_;
+ return std::make_pair(result, true);
+ }
+
+ Value& operator[](const Key& k) {
+ KeyValuePair kv(k, Value());
+ return insert(kv).first->value();
+ }
+
+ void erase(iterator it) {
+ GOOGLE_DCHECK_EQ(it.m_, this);
+ const bool is_list = it.revalidate_if_necessary();
+ size_type b = it.bucket_index_;
+ Node* const item = it.node_;
+ if (is_list) {
+ GOOGLE_DCHECK(TableEntryIsNonEmptyList(b));
+ Node* head = static_cast<Node*>(table_[b]);
+ head = EraseFromLinkedList(item, head);
+ table_[b] = static_cast<void*>(head);
+ } else {
+ GOOGLE_DCHECK(TableEntryIsTree(b));
+ Tree* tree = static_cast<Tree*>(table_[b]);
+ tree->erase(it.tree_it_);
+ if (tree->empty()) {
+ // Force b to be the minimum of b and b ^ 1. This is important
+ // only because we want index_of_first_non_null_ to be correct.
+ b &= ~static_cast<size_type>(1);
+ DestroyTree(tree);
+ table_[b] = table_[b + 1] = NULL;
+ }
+ }
+ DestroyNode(item);
+ --num_elements_;
+ if (GOOGLE_PREDICT_FALSE(b == index_of_first_non_null_)) {
+ while (index_of_first_non_null_ < num_buckets_ &&
+ table_[index_of_first_non_null_] == NULL) {
+ ++index_of_first_non_null_;
+ }
+ }
+ }
+
+ private:
+ std::pair<const_iterator, size_type> FindHelper(const Key& k) const {
+ size_type b = BucketNumber(k);
+ if (TableEntryIsNonEmptyList(b)) {
+ Node* node = static_cast<Node*>(table_[b]);
+ do {
+ if (IsMatch(*KeyPtrFromNodePtr(node), k)) {
+ return std::make_pair(const_iterator(node, this, b), b);
+ } else {
+ node = node->next;
+ }
+ } while (node != NULL);
+ } else if (TableEntryIsTree(b)) {
+ GOOGLE_DCHECK_EQ(table_[b], table_[b ^ 1]);
+ b &= ~static_cast<size_t>(1);
+ Tree* tree = static_cast<Tree*>(table_[b]);
+ Key* key = const_cast<Key*>(&k);
+ typename Tree::iterator tree_it = tree->find(key);
+ if (tree_it != tree->end()) {
+ return std::make_pair(const_iterator(tree_it, this, b), b);
+ }
+ }
+ return std::make_pair(end(), b);
+ }
+
+ // Insert the given Node in bucket b. If that would make bucket b too big,
+ // and bucket b is not a tree, create a tree for buckets b and b^1 to share.
+ // Requires count(*KeyPtrFromNodePtr(node)) == 0 and that b is the correct
+ // bucket. num_elements_ is not modified.
+ iterator InsertUnique(size_type b, Node* node) {
+ GOOGLE_DCHECK(index_of_first_non_null_ == num_buckets_ ||
+ table_[index_of_first_non_null_] != NULL);
+ // In practice, the code that led to this point may have already
+ // determined whether we are inserting into an empty list, a short list,
+ // or whatever. But it's probably cheap enough to recompute that here;
+ // it's likely that we're inserting into an empty or short list.
+ iterator result;
+ GOOGLE_DCHECK(find(*KeyPtrFromNodePtr(node)) == end());
+ if (TableEntryIsEmpty(b)) {
+ result = InsertUniqueInList(b, node);
+ } else if (TableEntryIsNonEmptyList(b)) {
+ if (GOOGLE_PREDICT_FALSE(TableEntryIsTooLong(b))) {
+ TreeConvert(b);
+ result = InsertUniqueInTree(b, node);
+ GOOGLE_DCHECK_EQ(result.bucket_index_, b & ~static_cast<size_type>(1));
+ } else {
+ // Insert into a pre-existing list. This case cannot modify
+ // index_of_first_non_null_, so we skip the code to update it.
+ return InsertUniqueInList(b, node);
+ }
+ } else {
+ // Insert into a pre-existing tree. This case cannot modify
+ // index_of_first_non_null_, so we skip the code to update it.
+ return InsertUniqueInTree(b, node);
+ }
+ index_of_first_non_null_ =
+ std::min(index_of_first_non_null_, result.bucket_index_);
+ return result;
+ }
+
+ // Helper for InsertUnique. Handles the case where bucket b is a
+ // not-too-long linked list.
+ iterator InsertUniqueInList(size_type b, Node* node) {
+ node->next = static_cast<Node*>(table_[b]);
+ table_[b] = static_cast<void*>(node);
+ return iterator(node, this, b);
+ }
+
+ // Helper for InsertUnique. Handles the case where bucket b points to a
+ // Tree.
+ iterator InsertUniqueInTree(size_type b, Node* node) {
+ GOOGLE_DCHECK_EQ(table_[b], table_[b ^ 1]);
+ // Maintain the invariant that node->next is NULL for all Nodes in Trees.
+ node->next = NULL;
+ return iterator(static_cast<Tree*>(table_[b])
+ ->insert(KeyPtrFromNodePtr(node))
+ .first,
+ this, b & ~static_cast<size_t>(1));
+ }
+
+ // Returns whether it did resize. Currently this is only used when
+ // num_elements_ increases, though it could be used in other situations.
+ // It checks for load too low as well as load too high: because any number
+ // of erases can occur between inserts, the load could be as low as 0 here.
+ // Resizing to a lower size is not always helpful, but failing to do so can
+ // destroy the expected big-O bounds for some operations. By having the
+ // policy that sometimes we resize down as well as up, clients can easily
+ // keep O(size()) = O(number of buckets) if they want that.
+ bool ResizeIfLoadIsOutOfRange(size_type new_size) {
+ const size_type kMaxMapLoadTimes16 = 12; // controls RAM vs CPU tradeoff
+ const size_type hi_cutoff = num_buckets_ * kMaxMapLoadTimes16 / 16;
+ const size_type lo_cutoff = hi_cutoff / 4;
+ // We don't care how many elements are in trees. If a lot are,
+ // we may resize even though there are many empty buckets. In
+ // practice, this seems fine.
+ if (GOOGLE_PREDICT_FALSE(new_size >= hi_cutoff)) {
+ if (num_buckets_ <= max_size() / 2) {
+ Resize(num_buckets_ * 2);
+ return true;
+ }
+ } else if (GOOGLE_PREDICT_FALSE(new_size <= lo_cutoff &&
+ num_buckets_ > kMinTableSize)) {
+ size_type lg2_of_size_reduction_factor = 1;
+ // It's possible we want to shrink a lot here... size() could even be 0.
+ // So, estimate how much to shrink by making sure we don't shrink so
+ // much that we would need to grow the table after a few inserts.
+ const size_type hypothetical_size = new_size * 5 / 4 + 1;
+ while ((hypothetical_size << lg2_of_size_reduction_factor) <
+ hi_cutoff) {
+ ++lg2_of_size_reduction_factor;
+ }
+ size_type new_num_buckets = std::max<size_type>(
+ kMinTableSize, num_buckets_ >> lg2_of_size_reduction_factor);
+ if (new_num_buckets != num_buckets_) {
+ Resize(new_num_buckets);
+ return true;
+ }
+ }
+ return false;
+ }
+
+ // Resize to the given number of buckets.
+ void Resize(size_t new_num_buckets) {
+ GOOGLE_DCHECK_GE(new_num_buckets, kMinTableSize);
+ void** const old_table = table_;
+ const size_type old_table_size = num_buckets_;
+ num_buckets_ = new_num_buckets;
+ table_ = CreateEmptyTable(num_buckets_);
+ const size_type start = index_of_first_non_null_;
+ index_of_first_non_null_ = num_buckets_;
+ for (size_type i = start; i < old_table_size; i++) {
+ if (TableEntryIsNonEmptyList(old_table, i)) {
+ TransferList(old_table, i);
+ } else if (TableEntryIsTree(old_table, i)) {
+ TransferTree(old_table, i++);
+ }
+ }
+ Dealloc<void*>(old_table, old_table_size);
+ }
+
+ void TransferList(void* const* table, size_type index) {
+ Node* node = static_cast<Node*>(table[index]);
+ do {
+ Node* next = node->next;
+ InsertUnique(BucketNumber(*KeyPtrFromNodePtr(node)), node);
+ node = next;
+ } while (node != NULL);
+ }
+
+ void TransferTree(void* const* table, size_type index) {
+ Tree* tree = static_cast<Tree*>(table[index]);
+ typename Tree::iterator tree_it = tree->begin();
+ do {
+ Node* node = NodePtrFromKeyPtr(*tree_it);
+ InsertUnique(BucketNumber(**tree_it), node);
+ } while (++tree_it != tree->end());
+ DestroyTree(tree);
+ }
+
+ Node* EraseFromLinkedList(Node* item, Node* head) {
+ if (head == item) {
+ return head->next;
+ } else {
+ head->next = EraseFromLinkedList(item, head->next);
+ return head;
+ }
+ }
+
+ bool TableEntryIsEmpty(size_type b) const {
+ return TableEntryIsEmpty(table_, b);
+ }
+ bool TableEntryIsNonEmptyList(size_type b) const {
+ return TableEntryIsNonEmptyList(table_, b);
+ }
+ bool TableEntryIsTree(size_type b) const {
+ return TableEntryIsTree(table_, b);
+ }
+ bool TableEntryIsList(size_type b) const {
+ return TableEntryIsList(table_, b);
+ }
+ static bool TableEntryIsEmpty(void* const* table, size_type b) {
+ return table[b] == NULL;
+ }
+ static bool TableEntryIsNonEmptyList(void* const* table, size_type b) {
+ return table[b] != NULL && table[b] != table[b ^ 1];
+ }
+ static bool TableEntryIsTree(void* const* table, size_type b) {
+ return !TableEntryIsEmpty(table, b) &&
+ !TableEntryIsNonEmptyList(table, b);
+ }
+ static bool TableEntryIsList(void* const* table, size_type b) {
+ return !TableEntryIsTree(table, b);
+ }
+
+ void TreeConvert(size_type b) {
+ GOOGLE_DCHECK(!TableEntryIsTree(b) && !TableEntryIsTree(b ^ 1));
+ typename Allocator::template rebind<Tree>::other tree_allocator(alloc_);
+ Tree* tree = tree_allocator.allocate(1);
+ // We want to use the three-arg form of construct, if it exists, but we
+ // create a temporary and use the two-arg construct that's known to exist.
+ // It's clunky, but the compiler should be able to generate more-or-less
+ // the same code.
+ tree_allocator.construct(tree,
+ Tree(KeyCompare(), KeyPtrAllocator(alloc_)));
+ // Now the tree is ready to use.
+ size_type count = CopyListToTree(b, tree) + CopyListToTree(b ^ 1, tree);
+ GOOGLE_DCHECK_EQ(count, tree->size());
+ table_[b] = table_[b ^ 1] = static_cast<void*>(tree);
+ }
+
+ // Copy a linked list in the given bucket to a tree.
+ // Returns the number of things it copied.
+ size_type CopyListToTree(size_type b, Tree* tree) {
+ size_type count = 0;
+ Node* node = static_cast<Node*>(table_[b]);
+ while (node != NULL) {
+ tree->insert(KeyPtrFromNodePtr(node));
+ ++count;
+ Node* next = node->next;
+ node->next = NULL;
+ node = next;
+ }
+ return count;
+ }
+
+ // Return whether table_[b] is a linked list that seems awfully long.
+ // Requires table_[b] to point to a non-empty linked list.
+ bool TableEntryIsTooLong(size_type b) {
+ const int kMaxLength = 8;
+ size_type count = 0;
+ Node* node = static_cast<Node*>(table_[b]);
+ do {
+ ++count;
+ node = node->next;
+ } while (node != NULL);
+ // Invariant: no linked list ever is more than kMaxLength in length.
+ GOOGLE_DCHECK_LE(count, kMaxLength);
+ return count >= kMaxLength;
+ }
+
+ size_type BucketNumber(const Key& k) const {
+ // We inherit from hasher, so one-arg operator() provides a hash function.
+ size_type h = (*const_cast<InnerMap*>(this))(k);
+ // To help prevent people from making assumptions about the hash function,
+ // we use the seed differently depending on NDEBUG. The default hash
+ // function, the seeding, etc., are all likely to change in the future.
+#ifndef NDEBUG
+ return (h * (seed_ | 1)) & (num_buckets_ - 1);
+#else
+ return (h + seed_) & (num_buckets_ - 1);
+#endif
+ }
+
+ bool IsMatch(const Key& k0, const Key& k1) const {
+ return std::equal_to<Key>()(k0, k1);
+ }
+
+ // Return a power of two no less than max(kMinTableSize, n).
+ // Assumes either n < kMinTableSize or n is a power of two.
+ size_type TableSize(size_type n) {
+ return n < kMinTableSize ? kMinTableSize : n;
+ }
+
+ // Use alloc_ to allocate an array of n objects of type U.
+ template <typename U>
+ U* Alloc(size_type n) {
+ typedef typename Allocator::template rebind<U>::other alloc_type;
+ return alloc_type(alloc_).allocate(n);
+ }
+
+ // Use alloc_ to deallocate an array of n objects of type U.
+ template <typename U>
+ void Dealloc(U* t, size_type n) {
+ typedef typename Allocator::template rebind<U>::other alloc_type;
+ alloc_type(alloc_).deallocate(t, n);
+ }
+
+ void DestroyNode(Node* node) {
+ alloc_.destroy(&node->kv);
+ Dealloc<Node>(node, 1);
+ }
+
+ void DestroyTree(Tree* tree) {
+ typename Allocator::template rebind<Tree>::other tree_allocator(alloc_);
+ tree_allocator.destroy(tree);
+ tree_allocator.deallocate(tree, 1);
+ }
+
+ void** CreateEmptyTable(size_type n) {
+ GOOGLE_DCHECK(n >= kMinTableSize);
+ GOOGLE_DCHECK_EQ(n & (n - 1), 0);
+ void** result = Alloc<void*>(n);
+ memset(result, 0, n * sizeof(result[0]));
+ return result;
+ }
+
+ // Return a randomish value.
+ size_type Seed() const {
+ // random_device can throw, so avoid it unless we are compiling with
+ // exceptions enabled.
+#if __cpp_exceptions && LANG_CXX11
+ try {
+ std::random_device rd;
+ std::knuth_b knuth(rd());
+ std::uniform_int_distribution<size_type> u;
+ return u(knuth);
+ } catch (...) { }
+#endif
+ size_type s = static_cast<size_type>(reinterpret_cast<uintptr_t>(this));
+#if defined(__x86_64__) && defined(__GNUC__)
+ uint32 hi, lo;
+ asm("rdtsc" : "=a" (lo), "=d" (hi));
+ s += ((static_cast<uint64>(hi) << 32) | lo);
+#endif
+ return s;
+ }
+
+ size_type num_elements_;
+ size_type num_buckets_;
+ size_type seed_;
+ size_type index_of_first_non_null_;
+ void** table_; // an array with num_buckets_ entries
+ Allocator alloc_;
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(InnerMap);
+ }; // end of class InnerMap
+
+ typedef hash_map<Key, value_type*, hash<Key>, equal_to<Key>,
+ MapAllocator<std::pair<const Key, MapPair<Key, T>*> > >
+ DeprecatedInnerMap;
+
+ public:
+ // Iterators
+ class iterator_base {
+ public:
+ // We support "old style" and "new style" iterators for now. This is
+ // temporary. Also, for "iterator()" we have an unknown category.
+ // TODO(gpike): get rid of this.
+ enum IteratorStyle { kUnknown, kOld, kNew };
+ explicit iterator_base(IteratorStyle style) : iterator_style_(style) {}
+
+ bool OldStyle() const {
+ GOOGLE_DCHECK_NE(iterator_style_, kUnknown);
+ return iterator_style_ == kOld;
+ }
+ bool UnknownStyle() const {
+ return iterator_style_ == kUnknown;
+ }
+ bool SameStyle(const iterator_base& other) const {
+ return iterator_style_ == other.iterator_style_;
+ }
+
+ private:
+ IteratorStyle iterator_style_;
+ };
+
+ class const_iterator
+ : private iterator_base,
+ public std::iterator<std::forward_iterator_tag, value_type, ptrdiff_t,
+ const value_type*, const value_type&> {
+ typedef typename InnerMap::const_iterator InnerIt;
+ typedef typename DeprecatedInnerMap::const_iterator DeprecatedInnerIt;
+
+ public:
+ const_iterator() : iterator_base(iterator_base::kUnknown) {}
+ explicit const_iterator(const DeprecatedInnerIt& dit)
+ : iterator_base(iterator_base::kOld), dit_(dit) {}
+ explicit const_iterator(const InnerIt& it)
+ : iterator_base(iterator_base::kNew), it_(it) {}
+
+ const_iterator(const const_iterator& other)
+ : iterator_base(other), it_(other.it_), dit_(other.dit_) {}
+
+ const_reference operator*() const {
+ return this->OldStyle() ? *dit_->second : *it_->value();
+ }
+ const_pointer operator->() const { return &(operator*()); }
+
+ const_iterator& operator++() {
+ if (this->OldStyle())
+ ++dit_;
+ else
+ ++it_;
+ return *this;
+ }
+ const_iterator operator++(int) {
+ return this->OldStyle() ? const_iterator(dit_++) : const_iterator(it_++);
+ }
+
+ friend bool operator==(const const_iterator& a, const const_iterator& b) {
+ if (!a.SameStyle(b)) return false;
+ if (a.UnknownStyle()) return true;
+ return a.OldStyle() ? (a.dit_ == b.dit_) : (a.it_ == b.it_);
+ }
+ friend bool operator!=(const const_iterator& a, const const_iterator& b) {
+ return !(a == b);
+ }
+
+ private:
+ InnerIt it_;
+ DeprecatedInnerIt dit_;
+ };
+
+ class iterator : private iterator_base,
+ public std::iterator<std::forward_iterator_tag, value_type> {
+ typedef typename InnerMap::iterator InnerIt;
+ typedef typename DeprecatedInnerMap::iterator DeprecatedInnerIt;
+
+ public:
+ iterator() : iterator_base(iterator_base::kUnknown) {}
+ explicit iterator(const DeprecatedInnerIt& dit)
+ : iterator_base(iterator_base::kOld), dit_(dit) {}
+ explicit iterator(const InnerIt& it)
+ : iterator_base(iterator_base::kNew), it_(it) {}
+
+ reference operator*() const {
+ return this->OldStyle() ? *dit_->second : *it_->value();
+ }
+ pointer operator->() const { return &(operator*()); }
+
+ iterator& operator++() {
+ if (this->OldStyle())
+ ++dit_;
+ else
+ ++it_;
+ return *this;
+ }
+ iterator operator++(int) {
+ return this->OldStyle() ? iterator(dit_++) : iterator(it_++);
+ }
+
+ // Allow implicit conversion to const_iterator.
+ operator const_iterator() const {
+ return this->OldStyle() ?
+ const_iterator(typename DeprecatedInnerMap::const_iterator(dit_)) :
+ const_iterator(typename InnerMap::const_iterator(it_));
+ }
+
+ friend bool operator==(const iterator& a, const iterator& b) {
+ if (!a.SameStyle(b)) return false;
+ if (a.UnknownStyle()) return true;
+ return a.OldStyle() ? a.dit_ == b.dit_ : a.it_ == b.it_;
+ }
+ friend bool operator!=(const iterator& a, const iterator& b) {
+ return !(a == b);
+ }
+
+ private:
+ friend class Map;
+
+ InnerIt it_;
+ DeprecatedInnerIt dit_;
+ };
+
+ iterator begin() {
+ return old_style_ ? iterator(deprecated_elements_->begin())
+ : iterator(elements_->begin());
+ }
+ iterator end() {
+ return old_style_ ? iterator(deprecated_elements_->end())
+ : iterator(elements_->end());
+ }
+ const_iterator begin() const {
+ return old_style_ ? const_iterator(deprecated_elements_->begin())
+ : const_iterator(iterator(elements_->begin()));
+ }
+ const_iterator end() const {
+ return old_style_ ? const_iterator(deprecated_elements_->end())
+ : const_iterator(iterator(elements_->end()));
+ }
+ const_iterator cbegin() const { return begin(); }
+ const_iterator cend() const { return end(); }
+
+ // Capacity
+ size_type size() const {
+ return old_style_ ? deprecated_elements_->size() : elements_->size();
+ }
+ bool empty() const { return size() == 0; }
+
+ // Element access
+ T& operator[](const key_type& key) {
+ value_type** value =
+ old_style_ ? &(*deprecated_elements_)[key] : &(*elements_)[key];
+ if (*value == NULL) {
+ *value = CreateValueTypeInternal(key);
+ internal::MapValueInitializer<google::protobuf::is_proto_enum<T>::value,
+ T>::Initialize((*value)->second,
+ default_enum_value_);
+ }
+ return (*value)->second;
+ }
+ const T& at(const key_type& key) const {
+ const_iterator it = find(key);
+ GOOGLE_CHECK(it != end());
+ return it->second;
+ }
+ T& at(const key_type& key) {
+ iterator it = find(key);
+ GOOGLE_CHECK(it != end());
+ return it->second;
+ }
+
+ // Lookup
+ size_type count(const key_type& key) const {
+ if (find(key) != end()) assert(key == find(key)->first);
+ return find(key) == end() ? 0 : 1;
+ }
+ const_iterator find(const key_type& key) const {
+ return old_style_ ? const_iterator(deprecated_elements_->find(key))
+ : const_iterator(iterator(elements_->find(key)));
+ }
+ iterator find(const key_type& key) {
+ return old_style_ ? iterator(deprecated_elements_->find(key))
+ : iterator(elements_->find(key));
+ }
+ std::pair<const_iterator, const_iterator> equal_range(
+ const key_type& key) const {
+ const_iterator it = find(key);
+ if (it == end()) {
+ return std::pair<const_iterator, const_iterator>(it, it);
+ } else {
+ const_iterator begin = it++;
+ return std::pair<const_iterator, const_iterator>(begin, it);
+ }
+ }
+ std::pair<iterator, iterator> equal_range(const key_type& key) {
+ iterator it = find(key);
+ if (it == end()) {
+ return std::pair<iterator, iterator>(it, it);
+ } else {
+ iterator begin = it++;
+ return std::pair<iterator, iterator>(begin, it);
+ }
+ }
+
+ // insert
+ std::pair<iterator, bool> insert(const value_type& value) {
+ if (old_style_) {
+ iterator it = find(value.first);
+ if (it != end()) {
+ return std::pair<iterator, bool>(it, false);
+ } else {
+ return std::pair<iterator, bool>(
+ iterator(deprecated_elements_->insert(std::pair<Key, value_type*>(
+ value.first, CreateValueTypeInternal(value))).first), true);
+ }
+ } else {
+ std::pair<typename InnerMap::iterator, bool> p =
+ elements_->insert(value.first);
+ if (p.second) {
+ p.first->value() = CreateValueTypeInternal(value);
+ }
+ return std::pair<iterator, bool>(iterator(p.first), p.second);
+ }
+ }
+ template <class InputIt>
+ void insert(InputIt first, InputIt last) {
+ for (InputIt it = first; it != last; ++it) {
+ iterator exist_it = find(it->first);
+ if (exist_it == end()) {
+ operator[](it->first) = it->second;
+ }
+ }
+ }
+
+ // Erase and clear
+ size_type erase(const key_type& key) {
+ iterator it = find(key);
+ if (it == end()) {
+ return 0;
+ } else {
+ erase(it);
+ return 1;
+ }
+ }
+ iterator erase(iterator pos) {
+ if (arena_ == NULL) delete pos.operator->();
+ iterator i = pos++;
+ if (old_style_)
+ deprecated_elements_->erase(i.dit_);
+ else
+ elements_->erase(i.it_);
+ return pos;
+ }
+ void erase(iterator first, iterator last) {
+ while (first != last) {
+ first = erase(first);
+ }
+ }
+ void clear() { erase(begin(), end()); }
+
+ // Assign
+ Map& operator=(const Map& other) {
+ if (this != &other) {
+ clear();
+ insert(other.begin(), other.end());
+ }
+ return *this;
+ }
+
+ // Access to hasher. Currently this returns a copy, but it may
+ // be modified to return a const reference in the future.
+ hasher hash_function() const {
+ return old_style_ ? deprecated_elements_->hash_function()
+ : elements_->hash_function();
+ }
+
+ private:
+ // Set default enum value only for proto2 map field whose value is enum type.
+ void SetDefaultEnumValue(int default_enum_value) {
+ default_enum_value_ = default_enum_value;
+ }
+
+ value_type* CreateValueTypeInternal(const Key& key) {
+ if (arena_ == NULL) {
+ return new value_type(key);
+ } else {
+ value_type* value = reinterpret_cast<value_type*>(
+ Arena::CreateArray<uint8>(arena_, sizeof(value_type)));
+ Arena::CreateInArenaStorage(const_cast<Key*>(&value->first), arena_);
+ Arena::CreateInArenaStorage(&value->second, arena_);
+ const_cast<Key&>(value->first) = key;
+ return value;
+ }
+ }
+
+ value_type* CreateValueTypeInternal(const value_type& value) {
+ if (arena_ == NULL) {
+ return new value_type(value);
+ } else {
+ value_type* p = reinterpret_cast<value_type*>(
+ Arena::CreateArray<uint8>(arena_, sizeof(value_type)));
+ Arena::CreateInArenaStorage(const_cast<Key*>(&p->first), arena_);
+ Arena::CreateInArenaStorage(&p->second, arena_);
+ const_cast<Key&>(p->first) = value.first;
+ p->second = value.second;
+ return p;
+ }
+ }
+
+ Arena* arena_;
+ int default_enum_value_;
+ // The following is a tagged union because we support two map styles
+ // for now.
+ // TODO(gpike): get rid of the old style.
+ const bool old_style_;
+ union {
+ InnerMap* elements_;
+ DeprecatedInnerMap* deprecated_elements_;
+ };
+
+ friend class ::google::protobuf::Arena;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
+ template <typename K, typename V,
+ internal::WireFormatLite::FieldType key_wire_type,
+ internal::WireFormatLite::FieldType value_wire_type,
+ int default_enum_value>
+ friend class internal::MapFieldLite;
+};
+
+} // namespace protobuf
+} // namespace google
+
+GOOGLE_PROTOBUF_HASH_NAMESPACE_DECLARATION_START
+template<>
+struct hash<google::protobuf::MapKey> {
+ size_t
+ operator()(const google::protobuf::MapKey& map_key) const {
+ switch (map_key.type()) {
+ case google::protobuf::FieldDescriptor::CPPTYPE_DOUBLE:
+ case google::protobuf::FieldDescriptor::CPPTYPE_FLOAT:
+ case google::protobuf::FieldDescriptor::CPPTYPE_ENUM:
+ case google::protobuf::FieldDescriptor::CPPTYPE_MESSAGE:
+ GOOGLE_LOG(FATAL) << "Unsupported";
+ break;
+ case google::protobuf::FieldDescriptor::CPPTYPE_STRING:
+ return hash<string>()(map_key.GetStringValue());
+ case google::protobuf::FieldDescriptor::CPPTYPE_INT64:
+ return hash< ::google::protobuf::int64>()(map_key.GetInt64Value());
+ case google::protobuf::FieldDescriptor::CPPTYPE_INT32:
+ return hash< ::google::protobuf::int32>()(map_key.GetInt32Value());
+ case google::protobuf::FieldDescriptor::CPPTYPE_UINT64:
+ return hash< ::google::protobuf::uint64>()(map_key.GetUInt64Value());
+ case google::protobuf::FieldDescriptor::CPPTYPE_UINT32:
+ return hash< ::google::protobuf::uint32>()(map_key.GetUInt32Value());
+ case google::protobuf::FieldDescriptor::CPPTYPE_BOOL:
+ return hash<bool>()(map_key.GetBoolValue());
+ }
+ GOOGLE_LOG(FATAL) << "Can't get here.";
+ return 0;
+ }
+ bool
+ operator()(const google::protobuf::MapKey& map_key1,
+ const google::protobuf::MapKey& map_key2) const {
+ return map_key1 < map_key2;
+ }
+};
+GOOGLE_PROTOBUF_HASH_NAMESPACE_DECLARATION_END
+
+#endif // GOOGLE_PROTOBUF_MAP_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/map_entry.h b/darwin-x86_64/protoc/include/google/protobuf/map_entry.h
new file mode 100644
index 0000000..987c4e2
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/map_entry.h
@@ -0,0 +1,308 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_MAP_ENTRY_H__
+#define GOOGLE_PROTOBUF_MAP_ENTRY_H__
+
+#include <google/protobuf/generated_message_reflection.h>
+#include <google/protobuf/map_entry_lite.h>
+#include <google/protobuf/map_type_handler.h>
+#include <google/protobuf/metadata.h>
+#include <google/protobuf/reflection_ops.h>
+#include <google/protobuf/unknown_field_set.h>
+#include <google/protobuf/wire_format_lite_inl.h>
+
+namespace google {
+namespace protobuf {
+class Arena;
+namespace internal {
+template <typename Key, typename Value,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+class MapField;
+}
+}
+
+namespace protobuf {
+namespace internal {
+
+// Register all MapEntry default instances so we can delete them in
+// ShutdownProtobufLibrary().
+void LIBPROTOBUF_EXPORT RegisterMapEntryDefaultInstance(
+ MessageLite* default_instance);
+
+// This is the common base class for MapEntry. It is used by MapFieldBase in
+// reflection api, in which the static type of key and value is unknown.
+class LIBPROTOBUF_EXPORT MapEntryBase : public Message {
+ public:
+ ::google::protobuf::Metadata GetMetadata() const {
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = descriptor_;
+ metadata.reflection = reflection_;
+ return metadata;
+ }
+
+ protected:
+ MapEntryBase() : descriptor_(NULL), reflection_(NULL) { }
+ virtual ~MapEntryBase() {}
+
+ const Descriptor* descriptor_;
+ const Reflection* reflection_;
+};
+
+// MapEntry is the returned google::protobuf::Message when calling AddMessage of
+// google::protobuf::Reflection. In order to let it work with generated message
+// reflection, its in-memory type is the same as generated message with the same
+// fields. However, in order to decide the in-memory type of key/value, we need
+// to know both their cpp type in generated api and proto type. In
+// implmentation, all in-memory types have related wire format functions to
+// support except ArenaStringPtr. Therefore, we need to define another type with
+// supporting wire format functions. Since this type is only used as return type
+// of MapEntry accessors, it's named MapEntry accessor type.
+//
+// cpp type: the type visible to users in public API.
+// proto type: WireFormatLite::FieldType of the field.
+// in-memory type: type of the data member used to stored this field.
+// MapEntry accessor type: type used in MapEntry getters/mutators to access the
+// field.
+//
+// cpp type | proto type | in-memory type | MapEntry accessor type
+// int32 TYPE_INT32 int32 int32
+// int32 TYPE_FIXED32 int32 int32
+// string TYPE_STRING ArenaStringPtr string
+// FooEnum TYPE_ENUM int int
+// FooMessage TYPE_MESSAGE FooMessage* FooMessage
+//
+// The in-memory types of primitive types can be inferred from its proto type,
+// while we need to explicitly specify the cpp type if proto type is
+// TYPE_MESSAGE to infer the in-memory type. Moreover, default_enum_value is
+// used to initialize enum field in proto2.
+template <typename Key, typename Value,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+class MapEntry : public MapEntryBase {
+ // Provide utilities to parse/serialize key/value. Provide utilities to
+ // manipulate internal stored type.
+ typedef MapTypeHandler<kKeyFieldType, Key> KeyTypeHandler;
+ typedef MapTypeHandler<kValueFieldType, Value> ValueTypeHandler;
+
+ // Enum type cannot be used for MapTypeHandler::Read. Define a type
+ // which will replace Enum with int.
+ typedef typename KeyTypeHandler::MapEntryAccessorType KeyMapEntryAccessorType;
+ typedef typename ValueTypeHandler::MapEntryAccessorType
+ ValueMapEntryAccessorType;
+
+ // Abbreviation for MapEntry
+ typedef typename google::protobuf::internal::MapEntry<
+ Key, Value, kKeyFieldType, kValueFieldType, default_enum_value> EntryType;
+
+ // Abbreviation for MapEntryLite
+ typedef typename google::protobuf::internal::MapEntryLite<
+ Key, Value, kKeyFieldType, kValueFieldType, default_enum_value>
+ EntryLiteType;
+
+ public:
+ ~MapEntry() {
+ if (this == default_instance_) {
+ delete reflection_;
+ }
+ }
+
+ // accessors ======================================================
+
+ virtual inline const KeyMapEntryAccessorType& key() const {
+ return entry_lite_.key();
+ }
+ inline KeyMapEntryAccessorType* mutable_key() {
+ return entry_lite_.mutable_key();
+ }
+ virtual inline const ValueMapEntryAccessorType& value() const {
+ return entry_lite_.value();
+ }
+ inline ValueMapEntryAccessorType* mutable_value() {
+ return entry_lite_.mutable_value();
+ }
+
+ // implements Message =============================================
+
+ bool MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream* input) {
+ return entry_lite_.MergePartialFromCodedStream(input);
+ }
+
+ int ByteSize() const {
+ return entry_lite_.ByteSize();
+ }
+
+ void SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream* output) const {
+ entry_lite_.SerializeWithCachedSizes(output);
+ }
+
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
+ return entry_lite_.SerializeWithCachedSizesToArray(output);
+ }
+
+ int GetCachedSize() const {
+ return entry_lite_.GetCachedSize();
+ }
+
+ bool IsInitialized() const {
+ return entry_lite_.IsInitialized();
+ }
+
+ Message* New() const {
+ MapEntry* entry = new MapEntry;
+ entry->descriptor_ = descriptor_;
+ entry->reflection_ = reflection_;
+ entry->set_default_instance(default_instance_);
+ return entry;
+ }
+
+ Message* New(Arena* arena) const {
+ MapEntry* entry = Arena::CreateMessage<MapEntry>(arena);
+ entry->descriptor_ = descriptor_;
+ entry->reflection_ = reflection_;
+ entry->set_default_instance(default_instance_);
+ return entry;
+ }
+
+ int SpaceUsed() const {
+ int size = sizeof(MapEntry);
+ size += entry_lite_.SpaceUsed();
+ return size;
+ }
+
+ void CopyFrom(const ::google::protobuf::Message& from) {
+ Clear();
+ MergeFrom(from);
+ }
+
+ void MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const MapEntry* source = dynamic_cast_if_available<const MapEntry*>(&from);
+ if (source == NULL) {
+ ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+ }
+
+ void CopyFrom(const MapEntry& from) {
+ Clear();
+ MergeFrom(from);
+ }
+
+ void MergeFrom(const MapEntry& from) {
+ entry_lite_.MergeFrom(from.entry_lite_);
+ }
+
+ void Clear() {
+ entry_lite_.Clear();
+ }
+
+ void InitAsDefaultInstance() {
+ entry_lite_.InitAsDefaultInstance();
+ }
+
+ Arena* GetArena() const {
+ return entry_lite_.GetArena();
+ }
+
+ // Create default MapEntry instance for given descriptor. Descriptor has to be
+ // given when creating default MapEntry instance because different map field
+ // may have the same type and MapEntry class. The given descriptor is needed
+ // to distinguish instances of the same MapEntry class.
+ static MapEntry* CreateDefaultInstance(const Descriptor* descriptor) {
+ MapEntry* entry = new MapEntry;
+ const Reflection* reflection = new GeneratedMessageReflection(
+ descriptor, entry, offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MapEntry, entry_lite_._has_bits_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MapEntry, _unknown_fields_), -1,
+ DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(MapEntry),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MapEntry, _internal_metadata_));
+ entry->descriptor_ = descriptor;
+ entry->reflection_ = reflection;
+ entry->set_default_instance(entry);
+ entry->InitAsDefaultInstance();
+ RegisterMapEntryDefaultInstance(entry);
+ return entry;
+ }
+
+ private:
+ MapEntry()
+ : _internal_metadata_(NULL), default_instance_(NULL), entry_lite_() {}
+
+ explicit MapEntry(Arena* arena)
+ : _internal_metadata_(arena),
+ default_instance_(NULL),
+ entry_lite_(arena) {}
+
+ inline Arena* GetArenaNoVirtual() const {
+ return entry_lite_.GetArenaNoVirtual();
+ }
+
+ void set_default_instance(MapEntry* default_instance) {
+ default_instance_ = default_instance;
+ entry_lite_.set_default_instance(&default_instance->entry_lite_);
+ }
+
+ static int offsets_[2];
+ UnknownFieldSet _unknown_fields_;
+ InternalMetadataWithArena _internal_metadata_;
+ MapEntry* default_instance_;
+ EntryLiteType entry_lite_;
+
+ friend class ::google::protobuf::Arena;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
+ template <typename K, typename V, WireFormatLite::FieldType k_wire_type,
+ WireFormatLite::FieldType, int default_enum>
+ friend class internal::MapField;
+ friend class internal::GeneratedMessageReflection;
+
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapEntry);
+};
+
+template <typename Key, typename Value, WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType, int default_enum_value>
+int MapEntry<Key, Value, kKeyFieldType, kValueFieldType,
+ default_enum_value>::offsets_[2] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MapEntry, entry_lite_.key_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MapEntry, entry_lite_.value_),
+};
+
+} // namespace internal
+} // namespace protobuf
+
+} // namespace google
+#endif // GOOGLE_PROTOBUF_MAP_ENTRY_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/map_entry_lite.h b/darwin-x86_64/protoc/include/google/protobuf/map_entry_lite.h
new file mode 100644
index 0000000..7cdf1b9
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/map_entry_lite.h
@@ -0,0 +1,401 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_MAP_ENTRY_LITE_H__
+#define GOOGLE_PROTOBUF_MAP_ENTRY_LITE_H__
+
+#include <google/protobuf/map_type_handler.h>
+#include <google/protobuf/wire_format_lite_inl.h>
+
+namespace google {
+namespace protobuf {
+class Arena;
+namespace internal {
+template <typename Key, typename Value,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+class MapEntry;
+template <typename Key, typename Value,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+class MapFieldLite;
+} // namespace internal
+} // namespace protobuf
+
+namespace protobuf {
+namespace internal {
+
+// MapEntryLite is used to implement parsing and serialization of map for lite
+// runtime.
+template <typename Key, typename Value,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+class MapEntryLite : public MessageLite {
+ // Provide utilities to parse/serialize key/value. Provide utilities to
+ // manipulate internal stored type.
+ typedef MapTypeHandler<kKeyFieldType, Key> KeyTypeHandler;
+ typedef MapTypeHandler<kValueFieldType, Value> ValueTypeHandler;
+
+ // Define internal memory layout. Strings and messages are stored as
+ // pointers, while other types are stored as values.
+ typedef typename KeyTypeHandler::TypeOnMemory KeyOnMemory;
+ typedef typename ValueTypeHandler::TypeOnMemory ValueOnMemory;
+
+ // Enum type cannot be used for MapTypeHandler::Read. Define a type
+ // which will replace Enum with int.
+ typedef typename KeyTypeHandler::MapEntryAccessorType KeyMapEntryAccessorType;
+ typedef typename ValueTypeHandler::MapEntryAccessorType
+ ValueMapEntryAccessorType;
+
+ // Constants for field number.
+ static const int kKeyFieldNumber = 1;
+ static const int kValueFieldNumber = 2;
+
+ // Constants for field tag.
+ static const uint8 kKeyTag = GOOGLE_PROTOBUF_WIRE_FORMAT_MAKE_TAG(
+ kKeyFieldNumber, KeyTypeHandler::kWireType);
+ static const uint8 kValueTag = GOOGLE_PROTOBUF_WIRE_FORMAT_MAKE_TAG(
+ kValueFieldNumber, ValueTypeHandler::kWireType);
+ static const int kTagSize = 1;
+
+ public:
+ ~MapEntryLite() {
+ if (this != default_instance_) {
+ if (GetArenaNoVirtual() != NULL) return;
+ KeyTypeHandler::DeleteNoArena(key_);
+ ValueTypeHandler::DeleteNoArena(value_);
+ }
+ }
+
+ // accessors ======================================================
+
+ virtual inline const KeyMapEntryAccessorType& key() const {
+ return KeyTypeHandler::GetExternalReference(key_);
+ }
+ virtual inline const ValueMapEntryAccessorType& value() const {
+ GOOGLE_CHECK(default_instance_ != NULL);
+ return ValueTypeHandler::DefaultIfNotInitialized(value_,
+ default_instance_->value_);
+ }
+ inline KeyMapEntryAccessorType* mutable_key() {
+ set_has_key();
+ return KeyTypeHandler::EnsureMutable(&key_, GetArenaNoVirtual());
+ }
+ inline ValueMapEntryAccessorType* mutable_value() {
+ set_has_value();
+ return ValueTypeHandler::EnsureMutable(&value_, GetArenaNoVirtual());
+ }
+
+ // implements MessageLite =========================================
+
+ // MapEntryLite is for implementation only and this function isn't called
+ // anywhere. Just provide a fake implementation here for MessageLite.
+ string GetTypeName() const { return ""; }
+
+ void CheckTypeAndMergeFrom(const MessageLite& other) {
+ MergeFrom(*::google::protobuf::down_cast<const MapEntryLite*>(&other));
+ }
+
+ bool MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream* input) {
+ uint32 tag;
+
+ for (;;) {
+ // 1) corrupted data: return false;
+ // 2) unknown field: skip without putting into unknown field set;
+ // 3) unknown enum value: keep it in parsing. In proto2, caller should
+ // check the value and put this entry into containing message's unknown
+ // field set if the value is an unknown enum. In proto3, caller doesn't
+ // need to care whether the value is unknown enum;
+ // 4) missing key/value: missed key/value will have default value. caller
+ // should take this entry as if key/value is set to default value.
+ tag = input->ReadTag();
+ switch (tag) {
+ case kKeyTag:
+ if (!KeyTypeHandler::Read(input, mutable_key())) {
+ return false;
+ }
+ set_has_key();
+ if (!input->ExpectTag(kValueTag)) break;
+ GOOGLE_FALLTHROUGH_INTENDED;
+
+ case kValueTag:
+ if (!ValueTypeHandler::Read(input, mutable_value())) {
+ return false;
+ }
+ set_has_value();
+ if (input->ExpectAtEnd()) return true;
+ break;
+
+ default:
+ if (tag == 0 ||
+ WireFormatLite::GetTagWireType(tag) ==
+ WireFormatLite::WIRETYPE_END_GROUP) {
+ return true;
+ }
+ if (!WireFormatLite::SkipField(input, tag)) return false;
+ break;
+ }
+ }
+ }
+
+ int ByteSize() const {
+ int size = 0;
+ size += has_key() ? kTagSize + KeyTypeHandler::ByteSize(key()) : 0;
+ size += has_value() ? kTagSize + ValueTypeHandler::ByteSize(value()) : 0;
+ return size;
+ }
+
+ void SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream* output) const {
+ KeyTypeHandler::Write(kKeyFieldNumber, key(), output);
+ ValueTypeHandler::Write(kValueFieldNumber, value(), output);
+ }
+
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
+ output = KeyTypeHandler::WriteToArray(kKeyFieldNumber, key(), output);
+ output = ValueTypeHandler::WriteToArray(kValueFieldNumber, value(), output);
+ return output;
+ }
+
+ int GetCachedSize() const {
+ int size = 0;
+ size += has_key()
+ ? kTagSize + KeyTypeHandler::GetCachedSize(key())
+ : 0;
+ size += has_value()
+ ? kTagSize + ValueTypeHandler::GetCachedSize(
+ value())
+ : 0;
+ return size;
+ }
+
+ bool IsInitialized() const { return ValueTypeHandler::IsInitialized(value_); }
+
+ MessageLite* New() const {
+ MapEntryLite* entry = new MapEntryLite;
+ entry->default_instance_ = default_instance_;
+ return entry;
+ }
+
+ MessageLite* New(Arena* arena) const {
+ MapEntryLite* entry = Arena::CreateMessage<MapEntryLite>(arena);
+ entry->default_instance_ = default_instance_;
+ return entry;
+ }
+
+ int SpaceUsed() const {
+ int size = sizeof(MapEntryLite);
+ size += KeyTypeHandler::SpaceUsedInMapEntry(key_);
+ size += ValueTypeHandler::SpaceUsedInMapEntry(value_);
+ return size;
+ }
+
+ void MergeFrom(const MapEntryLite& from) {
+ if (from._has_bits_[0]) {
+ if (from.has_key()) {
+ KeyTypeHandler::EnsureMutable(&key_, GetArenaNoVirtual());
+ KeyTypeHandler::Merge(from.key(), &key_, GetArenaNoVirtual());
+ set_has_key();
+ }
+ if (from.has_value()) {
+ ValueTypeHandler::EnsureMutable(&value_, GetArenaNoVirtual());
+ ValueTypeHandler::Merge(from.value(), &value_, GetArenaNoVirtual());
+ set_has_value();
+ }
+ }
+ }
+
+ void Clear() {
+ KeyTypeHandler::Clear(&key_, GetArenaNoVirtual());
+ ValueTypeHandler::ClearMaybeByDefaultEnum(
+ &value_, GetArenaNoVirtual(), default_enum_value);
+ clear_has_key();
+ clear_has_value();
+ }
+
+ void InitAsDefaultInstance() {
+ KeyTypeHandler::AssignDefaultValue(&key_);
+ ValueTypeHandler::AssignDefaultValue(&value_);
+ }
+
+ Arena* GetArena() const {
+ return GetArenaNoVirtual();
+ }
+
+ // Create a MapEntryLite for given key and value from google::protobuf::Map in
+ // serialization. This function is only called when value is enum. Enum is
+ // treated differently because its type in MapEntry is int and its type in
+ // google::protobuf::Map is enum. We cannot create a reference to int from an enum.
+ static MapEntryLite* EnumWrap(const Key& key, const Value value,
+ Arena* arena) {
+ return Arena::CreateMessage<MapEnumEntryWrapper<
+ Key, Value, kKeyFieldType, kValueFieldType, default_enum_value> >(
+ arena, key, value);
+ }
+
+ // Like above, but for all the other types. This avoids value copy to create
+ // MapEntryLite from google::protobuf::Map in serialization.
+ static MapEntryLite* Wrap(const Key& key, const Value& value, Arena* arena) {
+ return Arena::CreateMessage<MapEntryWrapper<Key, Value, kKeyFieldType,
+ kValueFieldType,
+ default_enum_value> >(
+ arena, key, value);
+ }
+
+ protected:
+ void set_has_key() { _has_bits_[0] |= 0x00000001u; }
+ bool has_key() const { return (_has_bits_[0] & 0x00000001u) != 0; }
+ void clear_has_key() { _has_bits_[0] &= ~0x00000001u; }
+ void set_has_value() { _has_bits_[0] |= 0x00000002u; }
+ bool has_value() const { return (_has_bits_[0] & 0x00000002u) != 0; }
+ void clear_has_value() { _has_bits_[0] &= ~0x00000002u; }
+
+ private:
+ // Serializing a generated message containing map field involves serializing
+ // key-value pairs from google::protobuf::Map. The wire format of each key-value pair
+ // after serialization should be the same as that of a MapEntry message
+ // containing the same key and value inside it. However, google::protobuf::Map doesn't
+ // store key and value as MapEntry message, which disables us to use existing
+ // code to serialize message. In order to use existing code to serialize
+ // message, we need to construct a MapEntry from key-value pair. But it
+ // involves copy of key and value to construct a MapEntry. In order to avoid
+ // this copy in constructing a MapEntry, we need the following class which
+ // only takes references of given key and value.
+ template <typename K, typename V, WireFormatLite::FieldType k_wire_type,
+ WireFormatLite::FieldType v_wire_type, int default_enum>
+ class MapEntryWrapper
+ : public MapEntryLite<K, V, k_wire_type, v_wire_type, default_enum> {
+ typedef MapEntryLite<K, V, k_wire_type, v_wire_type, default_enum> Base;
+ typedef typename Base::KeyMapEntryAccessorType KeyMapEntryAccessorType;
+ typedef typename Base::ValueMapEntryAccessorType ValueMapEntryAccessorType;
+
+ public:
+ MapEntryWrapper(Arena* arena, const K& key, const V& value)
+ : MapEntryLite<K, V, k_wire_type, v_wire_type, default_enum>(arena),
+ key_(key),
+ value_(value) {
+ Base::set_has_key();
+ Base::set_has_value();
+ }
+ inline const KeyMapEntryAccessorType& key() const { return key_; }
+ inline const ValueMapEntryAccessorType& value() const { return value_; }
+
+ private:
+ const Key& key_;
+ const Value& value_;
+
+ friend class ::google::protobuf::Arena;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
+ };
+
+ // Like above, but for enum value only, which stores value instead of
+ // reference of value field inside. This is needed because the type of value
+ // field in constructor is an enum, while we need to store it as an int. If we
+ // initialize a reference to int with a reference to enum, compiler will
+ // generate a temporary int from enum and initialize the reference to int with
+ // the temporary.
+ template <typename K, typename V, WireFormatLite::FieldType k_wire_type,
+ WireFormatLite::FieldType v_wire_type, int default_enum>
+ class MapEnumEntryWrapper
+ : public MapEntryLite<K, V, k_wire_type, v_wire_type, default_enum> {
+ typedef MapEntryLite<K, V, k_wire_type, v_wire_type, default_enum> Base;
+ typedef typename Base::KeyMapEntryAccessorType KeyMapEntryAccessorType;
+ typedef typename Base::ValueMapEntryAccessorType ValueMapEntryAccessorType;
+
+ public:
+ MapEnumEntryWrapper(Arena* arena, const K& key, const V& value)
+ : MapEntryLite<K, V, k_wire_type, v_wire_type, default_enum>(arena),
+ key_(key),
+ value_(value) {
+ Base::set_has_key();
+ Base::set_has_value();
+ }
+ inline const KeyMapEntryAccessorType& key() const { return key_; }
+ inline const ValueMapEntryAccessorType& value() const { return value_; }
+
+ private:
+ const KeyMapEntryAccessorType& key_;
+ const ValueMapEntryAccessorType value_;
+
+ friend class google::protobuf::Arena;
+ typedef void DestructorSkippable_;
+ };
+
+ MapEntryLite() : default_instance_(NULL), arena_(NULL) {
+ KeyTypeHandler::Initialize(&key_, NULL);
+ ValueTypeHandler::InitializeMaybeByDefaultEnum(
+ &value_, default_enum_value, NULL);
+ _has_bits_[0] = 0;
+ }
+
+ explicit MapEntryLite(Arena* arena)
+ : default_instance_(NULL), arena_(arena) {
+ KeyTypeHandler::Initialize(&key_, arena);
+ ValueTypeHandler::InitializeMaybeByDefaultEnum(
+ &value_, default_enum_value, arena);
+ _has_bits_[0] = 0;
+ }
+
+ inline Arena* GetArenaNoVirtual() const {
+ return arena_;
+ }
+
+ void set_default_instance(MapEntryLite* default_instance) {
+ default_instance_ = default_instance;
+ }
+
+ MapEntryLite* default_instance_;
+
+ KeyOnMemory key_;
+ ValueOnMemory value_;
+ Arena* arena_;
+ uint32 _has_bits_[1];
+
+ friend class ::google::protobuf::Arena;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
+ template <typename K, typename V, WireFormatLite::FieldType,
+ WireFormatLite::FieldType, int>
+ friend class internal::MapEntry;
+ template <typename K, typename V, WireFormatLite::FieldType,
+ WireFormatLite::FieldType, int>
+ friend class internal::MapFieldLite;
+
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapEntryLite);
+};
+
+} // namespace internal
+} // namespace protobuf
+
+} // namespace google
+#endif // GOOGLE_PROTOBUF_MAP_ENTRY_LITE_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/map_field.h b/darwin-x86_64/protoc/include/google/protobuf/map_field.h
new file mode 100644
index 0000000..4b46f3a
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/map_field.h
@@ -0,0 +1,397 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_MAP_FIELD_H__
+#define GOOGLE_PROTOBUF_MAP_FIELD_H__
+
+#include <google/protobuf/stubs/atomicops.h>
+#include <google/protobuf/stubs/mutex.h>
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/generated_message_reflection.h>
+#include <google/protobuf/arena.h>
+#include <google/protobuf/map_entry.h>
+#include <google/protobuf/map_field_lite.h>
+#include <google/protobuf/map_type_handler.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/unknown_field_set.h>
+
+
+namespace google {
+namespace protobuf {
+class DynamicMessage;
+class MapKey;
+namespace internal {
+
+class ContendedMapCleanTest;
+class GeneratedMessageReflection;
+class MapFieldAccessor;
+
+// This class provides accesss to map field using reflection, which is the same
+// as those provided for RepeatedPtrField<Message>. It is used for internal
+// reflection implentation only. Users should never use this directly.
+class LIBPROTOBUF_EXPORT MapFieldBase {
+ public:
+ MapFieldBase()
+ : arena_(NULL),
+ repeated_field_(NULL),
+ entry_descriptor_(NULL),
+ assign_descriptor_callback_(NULL),
+ state_(STATE_MODIFIED_MAP) {}
+ explicit MapFieldBase(Arena* arena)
+ : arena_(arena),
+ repeated_field_(NULL),
+ entry_descriptor_(NULL),
+ assign_descriptor_callback_(NULL),
+ state_(STATE_MODIFIED_MAP) {
+ // Mutex's destructor needs to be called explicitly to release resources
+ // acquired in its constructor.
+ arena->OwnDestructor(&mutex_);
+ }
+ virtual ~MapFieldBase();
+
+ // Returns reference to internal repeated field. Data written using
+ // google::protobuf::Map's api prior to calling this function is guarantted to be
+ // included in repeated field.
+ const RepeatedPtrFieldBase& GetRepeatedField() const;
+
+ // Like above. Returns mutable pointer to the internal repeated field.
+ RepeatedPtrFieldBase* MutableRepeatedField();
+
+ // Pure virtual map APIs for Map Reflection.
+ virtual bool ContainsMapKey(const MapKey& map_key) const = 0;
+ virtual bool InsertOrLookupMapValue(
+ const MapKey& map_key, MapValueRef* val) = 0;
+ virtual bool DeleteMapValue(const MapKey& map_key) = 0;
+ virtual bool EqualIterator(const MapIterator& a,
+ const MapIterator& b) const = 0;
+ virtual void MapBegin(MapIterator* map_iter) const = 0;
+ virtual void MapEnd(MapIterator* map_iter) const = 0;
+ // Sync Map with repeated field and returns the size of map.
+ virtual int size() const = 0;
+
+ // Returns the number of bytes used by the repeated field, excluding
+ // sizeof(*this)
+ int SpaceUsedExcludingSelf() const;
+
+ protected:
+ // Gets the size of space used by map field.
+ virtual int SpaceUsedExcludingSelfNoLock() const;
+
+ // Synchronizes the content in Map to RepeatedPtrField if there is any change
+ // to Map after last synchronization.
+ void SyncRepeatedFieldWithMap() const;
+ virtual void SyncRepeatedFieldWithMapNoLock() const;
+
+ // Synchronizes the content in RepeatedPtrField to Map if there is any change
+ // to RepeatedPtrField after last synchronization.
+ void SyncMapWithRepeatedField() const;
+ virtual void SyncMapWithRepeatedFieldNoLock() const {}
+
+ // Tells MapFieldBase that there is new change to Map.
+ void SetMapDirty();
+
+ // Tells MapFieldBase that there is new change to RepeatedPTrField.
+ void SetRepeatedDirty();
+
+ // Provides derived class the access to repeated field.
+ void* MutableRepeatedPtrField() const;
+
+ // Creates descriptor for only one time.
+ void InitMetadataOnce() const;
+
+ enum State {
+ STATE_MODIFIED_MAP = 0, // map has newly added data that has not been
+ // synchronized to repeated field
+ STATE_MODIFIED_REPEATED = 1, // repeated field has newly added data that
+ // has not been synchronized to map
+ CLEAN = 2, // data in map and repeated field are same
+ };
+
+ Arena* arena_;
+ mutable RepeatedPtrField<Message>* repeated_field_;
+ // MapEntry can only be created from MapField. To create MapEntry, MapField
+ // needs to know its descriptor, because MapEntry is not generated class which
+ // cannot initialize its own descriptor by calling generated
+ // descriptor-assign-function. Thus, we need to register a callback to
+ // initialize MapEntry's descriptor.
+ const Descriptor** entry_descriptor_;
+ void (*assign_descriptor_callback_)();
+
+ mutable Mutex mutex_; // The thread to synchronize map and repeated field
+ // needs to get lock first;
+ mutable volatile Atomic32 state_; // 0: STATE_MODIFIED_MAP
+ // 1: STATE_MODIFIED_REPEATED
+ // 2: CLEAN
+
+ private:
+ friend class ContendedMapCleanTest;
+ friend class GeneratedMessageReflection;
+ friend class MapFieldAccessor;
+ friend class ::google::protobuf::DynamicMessage;
+
+ // Virtual helper methods for MapIterator. MapIterator doesn't have the
+ // type helper for key and value. Call these help methods to deal with
+ // different types. Real helper methods are implemented in
+ // TypeDefinedMapFieldBase.
+ friend class ::google::protobuf::MapIterator;
+ // Allocate map<...>::iterator for MapIterator.
+ virtual void InitializeIterator(MapIterator* map_iter) const = 0;
+
+ // DeleteIterator() is called by the destructor of MapIterator only.
+ // It deletes map<...>::iterator for MapIterator.
+ virtual void DeleteIterator(MapIterator* map_iter) const = 0;
+
+ // Copy the map<...>::iterator from other_iterator to
+ // this_iterator.
+ virtual void CopyIterator(MapIterator* this_iterator,
+ const MapIterator& other_iterator) const = 0;
+
+ // IncreaseIterator() is called by operator++() of MapIterator only.
+ // It implements the ++ operator of MapIterator.
+ virtual void IncreaseIterator(MapIterator* map_iter) const = 0;
+};
+
+// This class provides common Map Reflection implementations for generated
+// message and dynamic message.
+template<typename Key, typename T>
+class TypeDefinedMapFieldBase : public MapFieldBase {
+ public:
+ TypeDefinedMapFieldBase() {}
+ explicit TypeDefinedMapFieldBase(Arena* arena) : MapFieldBase(arena) {}
+ ~TypeDefinedMapFieldBase() {}
+ void MapBegin(MapIterator* map_iter) const;
+ void MapEnd(MapIterator* map_iter) const;
+ bool EqualIterator(const MapIterator& a, const MapIterator& b) const;
+
+ virtual const Map<Key, T>& GetMap() const = 0;
+ virtual Map<Key, T>* MutableMap() = 0;
+
+ protected:
+ typename Map<Key, T>::const_iterator& InternalGetIterator(
+ const MapIterator* map_iter) const;
+
+ private:
+ void InitializeIterator(MapIterator* map_iter) const;
+ void DeleteIterator(MapIterator* map_iter) const;
+ void CopyIterator(MapIterator* this_iteratorm,
+ const MapIterator& that_iterator) const;
+ void IncreaseIterator(MapIterator* map_iter) const;
+
+ virtual void SetMapIteratorValue(MapIterator* map_iter) const = 0;
+};
+
+// This class provides accesss to map field using generated api. It is used for
+// internal generated message implentation only. Users should never use this
+// directly.
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value = 0>
+class MapField : public TypeDefinedMapFieldBase<Key, T>,
+ public MapFieldLite<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value> {
+ // Provide utilities to parse/serialize key/value. Provide utilities to
+ // manipulate internal stored type.
+ typedef MapTypeHandler<kKeyFieldType, Key> KeyTypeHandler;
+ typedef MapTypeHandler<kValueFieldType, T> ValueTypeHandler;
+
+ // Define message type for internal repeated field.
+ typedef MapEntry<Key, T, kKeyFieldType, kValueFieldType, default_enum_value>
+ EntryType;
+ typedef MapEntryLite<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value> EntryLiteType;
+
+ // Define abbreviation for parent MapFieldLite
+ typedef MapFieldLite<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value> MapFieldLiteType;
+
+ // Enum needs to be handled differently from other types because it has
+ // different exposed type in google::protobuf::Map's api and repeated field's api. For
+ // details see the comment in the implementation of
+ // SyncMapWithRepeatedFieldNoLock.
+ static const bool kIsValueEnum = ValueTypeHandler::kIsEnum;
+ typedef typename MapIf<kIsValueEnum, T, const T&>::type CastValueType;
+
+ public:
+ MapField();
+ explicit MapField(Arena* arena);
+ // MapField doesn't own the default_entry, which means default_entry must
+ // outlive the lifetime of MapField.
+ MapField(const Message* default_entry);
+ // For tests only.
+ MapField(Arena* arena, const Message* default_entry);
+ ~MapField();
+
+ // Implement MapFieldBase
+ bool ContainsMapKey(const MapKey& map_key) const;
+ bool InsertOrLookupMapValue(const MapKey& map_key, MapValueRef* val);
+ bool DeleteMapValue(const MapKey& map_key);
+
+ // Accessors
+ const Map<Key, T>& GetMap() const;
+ Map<Key, T>* MutableMap();
+
+ // Convenient methods for generated message implementation.
+ int size() const;
+ void Clear();
+ void MergeFrom(const MapFieldLiteType& other);
+ void Swap(MapFieldLiteType* other);
+
+ // Allocates metadata only if this MapField is part of a generated message.
+ void SetEntryDescriptor(const Descriptor** descriptor);
+ void SetAssignDescriptorCallback(void (*callback)());
+
+ private:
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
+
+ // MapField needs MapEntry's default instance to create new MapEntry.
+ void InitDefaultEntryOnce() const;
+
+ // Manually set default entry instance. For test only.
+ void SetDefaultEntryOnce(const EntryType* default_entry) const;
+
+ // Convenient methods to get internal google::protobuf::Map
+ const Map<Key, T>& GetInternalMap() const;
+ Map<Key, T>* MutableInternalMap();
+
+ // Implements MapFieldBase
+ void SyncRepeatedFieldWithMapNoLock() const;
+ void SyncMapWithRepeatedFieldNoLock() const;
+ int SpaceUsedExcludingSelfNoLock() const;
+
+ void SetMapIteratorValue(MapIterator* map_iter) const;
+
+ mutable const EntryType* default_entry_;
+
+ friend class ::google::protobuf::Arena;
+};
+
+class LIBPROTOBUF_EXPORT DynamicMapField: public TypeDefinedMapFieldBase<MapKey, MapValueRef> {
+ public:
+ explicit DynamicMapField(const Message* default_entry);
+ DynamicMapField(const Message* default_entry, Arena* arena);
+ ~DynamicMapField();
+
+ // Implement MapFieldBase
+ bool ContainsMapKey(const MapKey& map_key) const;
+ bool InsertOrLookupMapValue(const MapKey& map_key, MapValueRef* val);
+ bool DeleteMapValue(const MapKey& map_key);
+
+ const Map<MapKey, MapValueRef>& GetMap() const;
+ Map<MapKey, MapValueRef>* MutableMap();
+
+ int size() const;
+
+ private:
+ Map<MapKey, MapValueRef> map_;
+ const Message* default_entry_;
+
+ // Implements MapFieldBase
+ void SyncRepeatedFieldWithMapNoLock() const;
+ void SyncMapWithRepeatedFieldNoLock() const;
+ int SpaceUsedExcludingSelfNoLock() const;
+ void SetMapIteratorValue(MapIterator* map_iter) const;
+};
+
+} // namespace internal
+
+class LIBPROTOBUF_EXPORT MapIterator {
+ public:
+ MapIterator(Message* message, const FieldDescriptor* field) {
+ const Reflection* reflection = message->GetReflection();
+ map_ = reflection->MapData(message, field);
+ key_.SetType(field->message_type()->FindFieldByName("key")->cpp_type());
+ value_.SetType(field->message_type()->FindFieldByName("value")->cpp_type());
+ map_->InitializeIterator(this);
+ }
+ MapIterator(const MapIterator& other) {
+ map_ = other.map_;
+ map_->InitializeIterator(this);
+ map_->CopyIterator(this, other);
+ }
+ ~MapIterator() {
+ map_->DeleteIterator(this);
+ }
+ friend bool operator==(const MapIterator& a, const MapIterator& b) {
+ return a.map_->EqualIterator(a, b);
+ }
+ friend bool operator!=(const MapIterator& a, const MapIterator& b) {
+ return !a.map_->EqualIterator(a, b);
+ }
+ MapIterator& operator++() {
+ map_->IncreaseIterator(this);
+ return *this;
+ }
+ MapIterator operator++(int) {
+ // iter_ is copied from Map<...>::iterator, no need to
+ // copy from its self again. Use the same implementation
+ // with operator++()
+ map_->IncreaseIterator(this);
+ return *this;
+ }
+ const MapKey& GetKey() {
+ return key_;
+ }
+ const MapValueRef& GetValueRef() {
+ return value_;
+ }
+ MapValueRef* MutableValueRef() {
+ map_->SetMapDirty();
+ return &value_;
+ }
+
+ private:
+ template <typename Key, typename T>
+ friend class internal::TypeDefinedMapFieldBase;
+ friend class internal::DynamicMapField;
+ template <typename Key, typename T,
+ internal::WireFormatLite::FieldType kKeyFieldType,
+ internal::WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+ friend class internal::MapField;
+
+ // reinterpret_cast from heap-allocated Map<...>::iterator*. MapIterator owns
+ // the iterator. It is allocated by MapField<...>::InitializeIterator() called
+ // in constructor and deleted by MapField<...>::DeleteIterator() called in
+ // destructor.
+ void* iter_;
+ // Point to a MapField to call helper methods implemented in MapField.
+ // MapIterator does not own this object.
+ internal::MapFieldBase* map_;
+ MapKey key_;
+ MapValueRef value_;
+};
+
+} // namespace protobuf
+
+} // namespace google
+#endif // GOOGLE_PROTOBUF_MAP_FIELD_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/map_field_inl.h b/darwin-x86_64/protoc/include/google/protobuf/map_field_inl.h
new file mode 100644
index 0000000..01c9b89
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/map_field_inl.h
@@ -0,0 +1,489 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_MAP_FIELD_INL_H__
+#define GOOGLE_PROTOBUF_MAP_FIELD_INL_H__
+
+#include <memory>
+#ifndef _SHARED_PTR_H
+#include <google/protobuf/stubs/shared_ptr.h>
+#endif
+
+#include <google/protobuf/map.h>
+#include <google/protobuf/map_field.h>
+#include <google/protobuf/map_type_handler.h>
+
+namespace google {
+namespace protobuf {
+namespace internal {
+// UnwrapMapKey template
+template<typename T>
+T UnwrapMapKey(const MapKey& map_key);
+template<>
+inline int32 UnwrapMapKey<int32>(const MapKey& map_key) {
+ return map_key.GetInt32Value();
+}
+template<>
+inline uint32 UnwrapMapKey<uint32>(const MapKey& map_key) {
+ return map_key.GetUInt32Value();
+}
+template<>
+inline int64 UnwrapMapKey<int64>(const MapKey& map_key) {
+ return map_key.GetInt64Value();
+}
+template<>
+inline uint64 UnwrapMapKey<uint64>(const MapKey& map_key) {
+ return map_key.GetUInt64Value();
+}
+template<>
+inline bool UnwrapMapKey<bool>(const MapKey& map_key) {
+ return map_key.GetBoolValue();
+}
+template<>
+inline string UnwrapMapKey<string>(const MapKey& map_key) {
+ return map_key.GetStringValue();
+}
+
+// SetMapKey template
+template<typename T>
+inline void SetMapKey(MapKey* map_key, const T& value);
+template<>
+inline void SetMapKey<int32>(MapKey* map_key, const int32& value) {
+ map_key->SetInt32Value(value);
+}
+template<>
+inline void SetMapKey<uint32>(MapKey* map_key, const uint32& value) {
+ map_key->SetUInt32Value(value);
+}
+template<>
+inline void SetMapKey<int64>(MapKey* map_key, const int64& value) {
+ map_key->SetInt64Value(value);
+}
+template<>
+inline void SetMapKey<uint64>(MapKey* map_key, const uint64& value) {
+ map_key->SetUInt64Value(value);
+}
+template<>
+inline void SetMapKey<bool>(MapKey* map_key, const bool& value) {
+ map_key->SetBoolValue(value);
+}
+template<>
+inline void SetMapKey<string>(MapKey* map_key, const string& value) {
+ map_key->SetStringValue(value);
+}
+
+// ------------------------TypeDefinedMapFieldBase---------------
+template <typename Key, typename T>
+typename Map<Key, T>::const_iterator&
+TypeDefinedMapFieldBase<Key, T>::InternalGetIterator(
+ const MapIterator* map_iter) const {
+ return *reinterpret_cast<typename Map<Key, T>::const_iterator *>(
+ map_iter->iter_);
+}
+
+template <typename Key, typename T>
+void TypeDefinedMapFieldBase<Key, T>::MapBegin(MapIterator* map_iter) const {
+ InternalGetIterator(map_iter) = GetMap().begin();
+ SetMapIteratorValue(map_iter);
+}
+
+template <typename Key, typename T>
+void TypeDefinedMapFieldBase<Key, T>::MapEnd(MapIterator* map_iter) const {
+ InternalGetIterator(map_iter) = GetMap().end();
+}
+
+template <typename Key, typename T>
+bool TypeDefinedMapFieldBase<Key, T>::EqualIterator(const MapIterator& a,
+ const MapIterator& b)
+ const {
+ return InternalGetIterator(&a) == InternalGetIterator(&b);
+}
+
+template <typename Key, typename T>
+void TypeDefinedMapFieldBase<Key, T>::IncreaseIterator(MapIterator* map_iter)
+ const {
+ ++InternalGetIterator(map_iter);
+ SetMapIteratorValue(map_iter);
+}
+
+template <typename Key, typename T>
+void TypeDefinedMapFieldBase<Key, T>::InitializeIterator(
+ MapIterator* map_iter) const {
+ map_iter->iter_ = new typename Map<Key, T>::const_iterator;
+ GOOGLE_CHECK(map_iter->iter_ != NULL);
+}
+
+template <typename Key, typename T>
+void TypeDefinedMapFieldBase<Key, T>::DeleteIterator(MapIterator* map_iter)
+ const {
+ delete reinterpret_cast<typename Map<Key, T>::const_iterator *>(
+ map_iter->iter_);
+}
+
+template <typename Key, typename T>
+void TypeDefinedMapFieldBase<Key, T>::CopyIterator(
+ MapIterator* this_iter,
+ const MapIterator& that_iter) const {
+ InternalGetIterator(this_iter) = InternalGetIterator(&that_iter);
+ this_iter->key_.SetType(that_iter.key_.type());
+ // MapValueRef::type() fails when containing data is null. However, if
+ // this_iter points to MapEnd, data can be null.
+ this_iter->value_.SetType(
+ static_cast<FieldDescriptor::CppType>(that_iter.value_.type_));
+ SetMapIteratorValue(this_iter);
+}
+
+// ----------------------------------------------------------------------
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+MapField<Key, T, kKeyFieldType, kValueFieldType, default_enum_value>::MapField()
+ : default_entry_(NULL) {}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+MapField<Key, T, kKeyFieldType, kValueFieldType, default_enum_value>::MapField(
+ Arena* arena)
+ : TypeDefinedMapFieldBase<Key, T>(arena),
+ MapFieldLite<Key, T, kKeyFieldType, kValueFieldType, default_enum_value>(
+ arena),
+ default_entry_(NULL) {}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+MapField<Key, T, kKeyFieldType, kValueFieldType, default_enum_value>::MapField(
+ const Message* default_entry)
+ : default_entry_(down_cast<const EntryType*>(default_entry)) {}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+MapField<Key, T, kKeyFieldType, kValueFieldType, default_enum_value>::MapField(
+ Arena* arena, const Message* default_entry)
+ : TypeDefinedMapFieldBase<Key, T>(arena),
+ MapFieldLite<Key, T, kKeyFieldType, kValueFieldType, default_enum_value>(
+ arena),
+ default_entry_(down_cast<const EntryType*>(default_entry)) {}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+MapField<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value>::~MapField() {}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+int
+MapField<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value>::size() const {
+ MapFieldBase::SyncMapWithRepeatedField();
+ return MapFieldLiteType::GetInternalMap().size();
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+void
+MapField<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value>::Clear() {
+ MapFieldBase::SyncMapWithRepeatedField();
+ MapFieldLiteType::MutableInternalMap()->clear();
+ MapFieldBase::SetMapDirty();
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+void MapField<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value>::SetMapIteratorValue(
+ MapIterator* map_iter) const {
+ const Map<Key, T>& map = GetMap();
+ typename Map<Key, T>::const_iterator iter =
+ TypeDefinedMapFieldBase<Key, T>::InternalGetIterator(map_iter);
+ if (iter == map.end()) return;
+ SetMapKey(&map_iter->key_, iter->first);
+ map_iter->value_.SetValue(&iter->second);
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+bool MapField<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value>::ContainsMapKey(
+ const MapKey& map_key) const {
+ const Map<Key, T>& map = GetMap();
+ const Key& key = UnwrapMapKey<Key>(map_key);
+ typename Map<Key, T>::const_iterator iter = map.find(key);
+ return iter != map.end();
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+bool MapField<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value>::InsertOrLookupMapValue(
+ const MapKey& map_key,
+ MapValueRef* val) {
+ // Always use mutable map because users may change the map value by
+ // MapValueRef.
+ Map<Key, T>* map = MutableMap();
+ const Key& key = UnwrapMapKey<Key>(map_key);
+ typename Map<Key, T>::iterator iter = map->find(key);
+ if (map->end() == iter) {
+ val->SetValue(&((*map)[key]));
+ return true;
+ }
+ // Key is already in the map. Make sure (*map)[key] is not called.
+ // [] may reorder the map and iterators.
+ val->SetValue(&(iter->second));
+ return false;
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+bool MapField<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value>::DeleteMapValue(
+ const MapKey& map_key) {
+ const Key& key = UnwrapMapKey<Key>(map_key);
+ return MutableMap()->erase(key);
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+const Map<Key, T>&
+MapField<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value>::GetMap() const {
+ MapFieldBase::SyncMapWithRepeatedField();
+ return MapFieldLiteType::GetInternalMap();
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+Map<Key, T>*
+MapField<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value>::MutableMap() {
+ MapFieldBase::SyncMapWithRepeatedField();
+ Map<Key, T>* result = MapFieldLiteType::MutableInternalMap();
+ MapFieldBase::SetMapDirty();
+ return result;
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+void
+MapField<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value>::MergeFrom(
+ const MapFieldLiteType& other) {
+ const MapField& down_other = down_cast<const MapField&>(other);
+ MapFieldBase::SyncMapWithRepeatedField();
+ down_other.SyncMapWithRepeatedField();
+ MapFieldLiteType::MergeFrom(other);
+ MapFieldBase::SetMapDirty();
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+void
+MapField<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value>::Swap(
+ MapFieldLiteType* other) {
+ MapField* down_other = down_cast<MapField*>(other);
+ std::swap(MapFieldBase::repeated_field_, down_other->repeated_field_);
+ MapFieldLiteType::Swap(other);
+ std::swap(MapFieldBase::state_, down_other->state_);
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+void
+MapField<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value>::SetEntryDescriptor(
+ const Descriptor** descriptor) {
+ MapFieldBase::entry_descriptor_ = descriptor;
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+void
+MapField<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value>::SetAssignDescriptorCallback(void (*callback)()) {
+ MapFieldBase::assign_descriptor_callback_ = callback;
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+const Map<Key, T>&
+MapField<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value>::GetInternalMap() const {
+ return MapFieldLiteType::GetInternalMap();
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+Map<Key, T>*
+MapField<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value>::MutableInternalMap() {
+ return MapFieldLiteType::MutableInternalMap();
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+void
+MapField<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value>::SyncRepeatedFieldWithMapNoLock() const {
+ if (MapFieldBase::repeated_field_ == NULL) {
+ if (MapFieldBase::arena_ == NULL) {
+ MapFieldBase::repeated_field_ = new RepeatedPtrField<Message>();
+ } else {
+ MapFieldBase::repeated_field_ =
+ Arena::CreateMessage<RepeatedPtrField<Message> >(
+ MapFieldBase::arena_);
+ }
+ }
+ const Map<Key, T>& map = GetInternalMap();
+ RepeatedPtrField<EntryType>* repeated_field =
+ reinterpret_cast<RepeatedPtrField<EntryType>*>(
+ MapFieldBase::repeated_field_);
+
+ repeated_field->Clear();
+
+ for (typename Map<Key, T>::const_iterator it = map.begin();
+ it != map.end(); ++it) {
+ InitDefaultEntryOnce();
+ GOOGLE_CHECK(default_entry_ != NULL);
+ EntryType* new_entry =
+ down_cast<EntryType*>(default_entry_->New(MapFieldBase::arena_));
+ repeated_field->AddAllocated(new_entry);
+ (*new_entry->mutable_key()) = it->first;
+ (*new_entry->mutable_value()) = it->second;
+ }
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+void
+MapField<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value>::SyncMapWithRepeatedFieldNoLock() const {
+ Map<Key, T>* map = const_cast<MapField*>(this)->MutableInternalMap();
+ RepeatedPtrField<EntryType>* repeated_field =
+ reinterpret_cast<RepeatedPtrField<EntryType>*>(
+ MapFieldBase::repeated_field_);
+ GOOGLE_CHECK(MapFieldBase::repeated_field_ != NULL);
+ map->clear();
+ for (typename RepeatedPtrField<EntryType>::iterator it =
+ repeated_field->begin(); it != repeated_field->end(); ++it) {
+ // Cast is needed because Map's api and internal storage is different when
+ // value is enum. For enum, we cannot cast an int to enum. Thus, we have to
+ // copy value. For other types, they have same exposed api type and internal
+ // stored type. We should not introduce value copy for them. We achieve this
+ // by casting to value for enum while casting to reference for other types.
+ (*map)[it->key()] = static_cast<CastValueType>(it->value());
+ }
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+int
+MapField<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value>::SpaceUsedExcludingSelfNoLock() const {
+ int size = 0;
+ if (MapFieldBase::repeated_field_ != NULL) {
+ size += MapFieldBase::repeated_field_->SpaceUsedExcludingSelf();
+ }
+ Map<Key, T>* map = const_cast<MapField*>(this)->MutableInternalMap();
+ size += sizeof(*map);
+ for (typename Map<Key, T>::iterator it = map->begin();
+ it != map->end(); ++it) {
+ size += KeyTypeHandler::SpaceUsedInMap(it->first);
+ size += ValueTypeHandler::SpaceUsedInMap(it->second);
+ }
+ return size;
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType kKeyFieldType,
+ WireFormatLite::FieldType kValueFieldType,
+ int default_enum_value>
+void
+MapField<Key, T, kKeyFieldType, kValueFieldType,
+ default_enum_value>::InitDefaultEntryOnce()
+ const {
+ if (default_entry_ == NULL) {
+ MapFieldBase::InitMetadataOnce();
+ GOOGLE_CHECK(*MapFieldBase::entry_descriptor_ != NULL);
+ default_entry_ = down_cast<const EntryType*>(
+ MessageFactory::generated_factory()->GetPrototype(
+ *MapFieldBase::entry_descriptor_));
+ }
+}
+
+} // namespace internal
+} // namespace protobuf
+
+} // namespace google
+#endif // GOOGLE_PROTOBUF_MAP_FIELD_INL_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/map_field_lite.h b/darwin-x86_64/protoc/include/google/protobuf/map_field_lite.h
new file mode 100644
index 0000000..860dae5
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/map_field_lite.h
@@ -0,0 +1,278 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_MAP_FIELD_LITE_H__
+#define GOOGLE_PROTOBUF_MAP_FIELD_LITE_H__
+
+#include <google/protobuf/map.h>
+#include <google/protobuf/map_entry_lite.h>
+
+namespace google {
+namespace protobuf {
+namespace internal {
+
+// This class provides accesss to map field using generated api. It is used for
+// internal generated message implentation only. Users should never use this
+// directly.
+template <typename Key, typename T,
+ WireFormatLite::FieldType key_wire_type,
+ WireFormatLite::FieldType value_wire_type,
+ int default_enum_value = 0>
+class MapFieldLite {
+ // Define message type for internal repeated field.
+ typedef MapEntryLite<Key, T, key_wire_type, value_wire_type,
+ default_enum_value> EntryType;
+
+ public:
+ MapFieldLite();
+ explicit MapFieldLite(Arena* arena);
+ virtual ~MapFieldLite();
+
+ // Accessors
+ virtual const Map<Key, T>& GetMap() const;
+ virtual Map<Key, T>* MutableMap();
+
+ // Convenient methods for generated message implementation.
+ virtual int size() const;
+ virtual void Clear();
+ virtual void MergeFrom(const MapFieldLite& other);
+ virtual void Swap(MapFieldLite* other);
+
+ // Set default enum value only for proto2 map field whose value is enum type.
+ void SetDefaultEnumValue();
+
+ // Used in the implementation of parsing. Caller should take the ownership.
+ EntryType* NewEntry() const;
+ // Used in the implementation of serializing enum value type. Caller should
+ // take the ownership.
+ EntryType* NewEnumEntryWrapper(const Key& key, const T t) const;
+ // Used in the implementation of serializing other value types. Caller should
+ // take the ownership.
+ EntryType* NewEntryWrapper(const Key& key, const T& t) const;
+
+ protected:
+ // Convenient methods to get internal google::protobuf::Map
+ virtual const Map<Key, T>& GetInternalMap() const;
+ virtual Map<Key, T>* MutableInternalMap();
+
+ private:
+ typedef void DestructorSkippable_;
+
+ Arena* arena_;
+ Map<Key, T>* map_;
+
+ friend class ::google::protobuf::Arena;
+};
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType key_wire_type,
+ WireFormatLite::FieldType value_wire_type,
+ int default_enum_value>
+MapFieldLite<Key, T, key_wire_type, value_wire_type,
+ default_enum_value>::MapFieldLite()
+ : arena_(NULL) {
+ map_ = new Map<Key, T>;
+ SetDefaultEnumValue();
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType key_wire_type,
+ WireFormatLite::FieldType value_wire_type,
+ int default_enum_value>
+MapFieldLite<Key, T, key_wire_type, value_wire_type,
+ default_enum_value>::MapFieldLite(Arena* arena)
+ : arena_(arena) {
+ map_ = Arena::CreateMessage<Map<Key, T> >(arena);
+ SetDefaultEnumValue();
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType key_wire_type,
+ WireFormatLite::FieldType value_wire_type,
+ int default_enum_value>
+MapFieldLite<Key, T, key_wire_type, value_wire_type,
+ default_enum_value>::~MapFieldLite() {
+ delete map_;
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType key_wire_type,
+ WireFormatLite::FieldType value_wire_type,
+ int default_enum_value>
+const Map<Key, T>&
+MapFieldLite<Key, T, key_wire_type, value_wire_type,
+ default_enum_value>::GetMap() const {
+ return *map_;
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType key_wire_type,
+ WireFormatLite::FieldType value_wire_type,
+ int default_enum_value>
+Map<Key, T>*
+MapFieldLite<Key, T, key_wire_type, value_wire_type,
+ default_enum_value>::MutableMap() {
+ return map_;
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType key_wire_type,
+ WireFormatLite::FieldType value_wire_type,
+ int default_enum_value>
+int
+MapFieldLite<Key, T, key_wire_type, value_wire_type,
+ default_enum_value>::size() const {
+ return map_->size();
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType key_wire_type,
+ WireFormatLite::FieldType value_wire_type,
+ int default_enum_value>
+void
+MapFieldLite<Key, T, key_wire_type, value_wire_type,
+ default_enum_value>::Clear() {
+ map_->clear();
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType key_wire_type,
+ WireFormatLite::FieldType value_wire_type,
+ int default_enum_value>
+void
+MapFieldLite<Key, T, key_wire_type, value_wire_type,
+ default_enum_value>::MergeFrom(
+ const MapFieldLite& other) {
+ for (typename Map<Key, T>::const_iterator it = other.map_->begin();
+ it != other.map_->end(); ++it) {
+ (*map_)[it->first] = it->second;
+ }
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType key_wire_type,
+ WireFormatLite::FieldType value_wire_type,
+ int default_enum_value>
+void
+MapFieldLite<Key, T, key_wire_type, value_wire_type,
+ default_enum_value>::Swap(
+ MapFieldLite* other) {
+ std::swap(map_, other->map_);
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType key_wire_type,
+ WireFormatLite::FieldType value_wire_type,
+ int default_enum_value>
+void
+MapFieldLite<Key, T, key_wire_type, value_wire_type,
+ default_enum_value>::SetDefaultEnumValue() {
+ MutableInternalMap()->SetDefaultEnumValue(default_enum_value);
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType key_wire_type,
+ WireFormatLite::FieldType value_wire_type,
+ int default_enum_value>
+const Map<Key, T>&
+MapFieldLite<Key, T, key_wire_type, value_wire_type,
+ default_enum_value>::GetInternalMap() const {
+ return *map_;
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType key_wire_type,
+ WireFormatLite::FieldType value_wire_type,
+ int default_enum_value>
+Map<Key, T>*
+MapFieldLite<Key, T, key_wire_type, value_wire_type,
+ default_enum_value>::MutableInternalMap() {
+ return map_;
+}
+
+#define EntryType \
+ MapEntryLite<Key, T, key_wire_type, value_wire_type, default_enum_value>
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType key_wire_type,
+ WireFormatLite::FieldType value_wire_type,
+ int default_enum_value>
+EntryType*
+MapFieldLite<Key, T, key_wire_type, value_wire_type,
+ default_enum_value>::NewEntry() const {
+ if (arena_ == NULL) {
+ return new EntryType();
+ } else {
+ return Arena::CreateMessage<EntryType>(arena_);
+ }
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType key_wire_type,
+ WireFormatLite::FieldType value_wire_type,
+ int default_enum_value>
+EntryType*
+MapFieldLite<Key, T, key_wire_type, value_wire_type,
+ default_enum_value>::NewEnumEntryWrapper(const Key& key,
+ const T t) const {
+ return EntryType::EnumWrap(key, t, arena_);
+}
+
+template <typename Key, typename T,
+ WireFormatLite::FieldType key_wire_type,
+ WireFormatLite::FieldType value_wire_type,
+ int default_enum_value>
+EntryType*
+MapFieldLite<Key, T, key_wire_type, value_wire_type,
+ default_enum_value>::NewEntryWrapper(const Key& key,
+ const T& t) const {
+ return EntryType::Wrap(key, t, arena_);
+}
+
+#undef EntryType
+
+// 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.
+// We want the C++ compiler to inline this or not as it sees fit.
+template <typename Key, typename T>
+bool AllAreInitialized(const Map<Key, T>& t) {
+ for (typename Map<Key, T>::const_iterator it = t.begin(); it != t.end();
+ ++it) {
+ if (!it->second.IsInitialized()) return false;
+ }
+ return true;
+}
+
+} // namespace internal
+} // namespace protobuf
+
+} // namespace google
+#endif // GOOGLE_PROTOBUF_MAP_FIELD_LITE_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/map_type_handler.h b/darwin-x86_64/protoc/include/google/protobuf/map_type_handler.h
new file mode 100644
index 0000000..f8ad758
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/map_type_handler.h
@@ -0,0 +1,727 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_TYPE_HANDLER_H__
+#define GOOGLE_PROTOBUF_TYPE_HANDLER_H__
+
+#include <google/protobuf/arena.h>
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/wire_format_lite_inl.h>
+
+namespace google {
+namespace protobuf {
+namespace internal {
+
+// Used for compile time type selection. MapIf::type will be TrueType if Flag is
+// true and FalseType otherwise.
+template<bool Flag, typename TrueType, typename FalseType>
+struct MapIf;
+
+template<typename TrueType, typename FalseType>
+struct MapIf<true, TrueType, FalseType> {
+ typedef TrueType type;
+};
+
+template<typename TrueType, typename FalseType>
+struct MapIf<false, TrueType, FalseType> {
+ typedef FalseType type;
+};
+
+// In proto2 Map, enum needs to be initialized to given default value, while
+// other types' default value can be inferred from the type.
+template <bool IsEnum, typename Type>
+class MapValueInitializer {
+ public:
+ static inline void Initialize(Type& type, int default_enum_value);
+};
+
+template <typename Type>
+class MapValueInitializer<true, Type> {
+ public:
+ static inline void Initialize(Type& value, int default_enum_value) {
+ value = static_cast<Type>(default_enum_value);
+ }
+};
+
+template <typename Type>
+class MapValueInitializer<false, Type> {
+ public:
+ static inline void Initialize(Type& value, int default_enum_value) {}
+};
+
+template <typename Type, bool is_arena_constructable>
+class MapArenaMessageCreator {
+ public:
+ // Use arena to create message if Type is arena constructable. Otherwise,
+ // create the message on heap.
+ static inline Type* CreateMessage(Arena* arena);
+};
+template <typename Type>
+class MapArenaMessageCreator<Type, true> {
+ public:
+ static inline Type* CreateMessage(Arena* arena) {
+ return Arena::CreateMessage<Type>(arena);
+ }
+};
+template <typename Type>
+class MapArenaMessageCreator<Type, false> {
+ public:
+ static inline Type* CreateMessage(Arena* arena) {
+ return Arena::Create<Type>(arena);
+ }
+};
+
+// Define constants for given wire field type
+template <WireFormatLite::FieldType field_type, typename Type>
+class MapWireFieldTypeTraits {};
+
+#define TYPE_TRAITS(FieldType, CType, WireFormatType, IsMessage, IsEnum) \
+ template <typename Type> \
+ class MapWireFieldTypeTraits<WireFormatLite::TYPE_##FieldType, Type> { \
+ public: \
+ static const bool kIsMessage = IsMessage; \
+ static const bool kIsEnum = IsEnum; \
+ typedef typename MapIf<kIsMessage, Type*, CType>::type TypeOnMemory; \
+ typedef typename MapIf<kIsEnum, int, Type>::type MapEntryAccessorType; \
+ static const WireFormatLite::WireType kWireType = \
+ WireFormatLite::WIRETYPE_##WireFormatType; \
+ };
+
+TYPE_TRAITS(MESSAGE , Type, LENGTH_DELIMITED, true, false)
+TYPE_TRAITS(STRING , ArenaStringPtr, LENGTH_DELIMITED, false, false)
+TYPE_TRAITS(BYTES , ArenaStringPtr , LENGTH_DELIMITED, false, false)
+TYPE_TRAITS(INT64 , int64 , VARINT , false, false)
+TYPE_TRAITS(UINT64 , uint64 , VARINT , false, false)
+TYPE_TRAITS(INT32 , int32 , VARINT , false, false)
+TYPE_TRAITS(UINT32 , uint32 , VARINT , false, false)
+TYPE_TRAITS(SINT64 , int64 , VARINT , false, false)
+TYPE_TRAITS(SINT32 , int32 , VARINT , false, false)
+TYPE_TRAITS(ENUM , int , VARINT , false, true )
+TYPE_TRAITS(DOUBLE , double , FIXED64, false, false)
+TYPE_TRAITS(FLOAT , float , FIXED32, false, false)
+TYPE_TRAITS(FIXED64 , uint64 , FIXED64, false, false)
+TYPE_TRAITS(FIXED32 , uint32 , FIXED32, false, false)
+TYPE_TRAITS(SFIXED64, int64 , FIXED64, false, false)
+TYPE_TRAITS(SFIXED32, int32 , FIXED32, false, false)
+TYPE_TRAITS(BOOL , bool , VARINT , false, false)
+
+#undef TYPE_TRAITS
+
+template <WireFormatLite::FieldType field_type, typename Type>
+class MapTypeHandler {};
+
+template <typename Type>
+class MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type> {
+ public:
+ // Enum type cannot be used for MapTypeHandler::Read. Define a type which will
+ // replace Enum with int.
+ typedef typename MapWireFieldTypeTraits<WireFormatLite::TYPE_MESSAGE,
+ Type>::MapEntryAccessorType MapEntryAccessorType;
+ // Internal stored type in MapEntryLite for given wire field type.
+ typedef typename MapWireFieldTypeTraits<WireFormatLite::TYPE_MESSAGE,
+ Type>::TypeOnMemory TypeOnMemory;
+ // Corresponding wire type for field type.
+ static const WireFormatLite::WireType kWireType =
+ MapWireFieldTypeTraits<WireFormatLite::TYPE_MESSAGE, Type>::kWireType;
+ // Whether wire type is for message.
+ static const bool kIsMessage =
+ MapWireFieldTypeTraits<WireFormatLite::TYPE_MESSAGE, Type>::kIsMessage;
+ // Whether wire type is for enum.
+ static const bool kIsEnum =
+ MapWireFieldTypeTraits<WireFormatLite::TYPE_MESSAGE, Type>::kIsEnum;
+
+ // Functions used in parsing and serialization. ===================
+ static inline int ByteSize(const MapEntryAccessorType& value);
+ static inline int GetCachedSize(const MapEntryAccessorType& value);
+ static inline bool Read(io::CodedInputStream* input,
+ MapEntryAccessorType* value);
+ static inline void Write(int field, const MapEntryAccessorType& value,
+ io::CodedOutputStream* output);
+ static inline uint8* WriteToArray(int field,
+ const MapEntryAccessorType& value,
+ uint8* output);
+
+ // Functions to manipulate data on memory. ========================
+ static inline const Type& GetExternalReference(const Type* value);
+ static inline void DeleteNoArena(const Type* x);
+ static inline void Merge(const Type& from, Type** to, Arena* arena);
+ static inline void Clear(Type** value, Arena* arena);
+ static inline void ClearMaybeByDefaultEnum(Type** value, Arena* arena,
+ int default_enum_value);
+ static inline void Initialize(Type** x, Arena* arena);
+
+ static inline void InitializeMaybeByDefaultEnum(Type** x,
+ int default_enum_value,
+ Arena* arena);
+ static inline Type* EnsureMutable(Type** value, Arena* arena);
+ // SpaceUsedInMapEntry: Return bytes used by value in MapEntry, excluding
+ // those already calculate in sizeof(MapField).
+ static inline int SpaceUsedInMapEntry(const Type* value);
+ // Return bytes used by value in Map.
+ static inline int SpaceUsedInMap(const Type& value);
+ // Assign default value to given instance.
+ static inline void AssignDefaultValue(Type** value);
+ // Return default instance if value is not initialized when calling const
+ // reference accessor.
+ static inline const Type& DefaultIfNotInitialized(
+ const Type* value, const Type* default_value);
+ // Check if all required fields have values set.
+ static inline bool IsInitialized(Type* value);
+};
+
+#define MAP_HANDLER(FieldType) \
+ template <typename Type> \
+ class MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type> { \
+ public: \
+ typedef typename MapWireFieldTypeTraits<WireFormatLite::TYPE_##FieldType, \
+ Type>::MapEntryAccessorType \
+ MapEntryAccessorType; \
+ typedef typename MapWireFieldTypeTraits<WireFormatLite::TYPE_##FieldType, \
+ Type>::TypeOnMemory TypeOnMemory; \
+ static const WireFormatLite::WireType kWireType = \
+ MapWireFieldTypeTraits<WireFormatLite::TYPE_##FieldType, \
+ Type>::kWireType; \
+ static const bool kIsMessage = \
+ MapWireFieldTypeTraits<WireFormatLite::TYPE_##FieldType, \
+ Type>::kIsMessage; \
+ static const bool kIsEnum = \
+ MapWireFieldTypeTraits<WireFormatLite::TYPE_##FieldType, \
+ Type>::kIsEnum; \
+ static inline int ByteSize(const MapEntryAccessorType& value); \
+ static inline int GetCachedSize(const MapEntryAccessorType& value); \
+ static inline bool Read(io::CodedInputStream* input, \
+ MapEntryAccessorType* value); \
+ static inline void Write(int field, const MapEntryAccessorType& value, \
+ io::CodedOutputStream* output); \
+ static inline uint8* WriteToArray(int field, \
+ const MapEntryAccessorType& value, \
+ uint8* output); \
+ static inline const MapEntryAccessorType& GetExternalReference( \
+ const TypeOnMemory& value); \
+ static inline void DeleteNoArena(const TypeOnMemory& x); \
+ static inline void Merge(const MapEntryAccessorType& from, \
+ TypeOnMemory* to, Arena* arena); \
+ static inline void Clear(TypeOnMemory* value, Arena* arena); \
+ static inline void ClearMaybeByDefaultEnum(TypeOnMemory* value, \
+ Arena* arena, \
+ int default_enum); \
+ static inline int SpaceUsedInMapEntry(const TypeOnMemory& value); \
+ static inline int SpaceUsedInMap(const TypeOnMemory& value); \
+ static inline int SpaceUsedInMap(const string& value); \
+ static inline void AssignDefaultValue(TypeOnMemory* value); \
+ static inline const MapEntryAccessorType& DefaultIfNotInitialized( \
+ const TypeOnMemory& value, const TypeOnMemory& default_value); \
+ static inline bool IsInitialized(const TypeOnMemory& value); \
+ static void DeleteNoArena(TypeOnMemory& value); \
+ static inline void Initialize(TypeOnMemory* value, Arena* arena); \
+ static inline void InitializeMaybeByDefaultEnum(TypeOnMemory* value, \
+ int default_enum_value, \
+ Arena* arena); \
+ static inline MapEntryAccessorType* EnsureMutable(TypeOnMemory* value, \
+ Arena* arena); \
+ };
+MAP_HANDLER(STRING)
+MAP_HANDLER(BYTES)
+MAP_HANDLER(INT64)
+MAP_HANDLER(UINT64)
+MAP_HANDLER(INT32)
+MAP_HANDLER(UINT32)
+MAP_HANDLER(SINT64)
+MAP_HANDLER(SINT32)
+MAP_HANDLER(ENUM)
+MAP_HANDLER(DOUBLE)
+MAP_HANDLER(FLOAT)
+MAP_HANDLER(FIXED64)
+MAP_HANDLER(FIXED32)
+MAP_HANDLER(SFIXED64)
+MAP_HANDLER(SFIXED32)
+MAP_HANDLER(BOOL)
+#undef MAP_HANDLER
+
+template <typename Type>
+inline int
+MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type>::ByteSize(
+ const MapEntryAccessorType& value) {
+ return WireFormatLite::MessageSizeNoVirtual(value);
+}
+
+#define GOOGLE_PROTOBUF_BYTE_SIZE(FieldType, DeclaredType) \
+ template <typename Type> \
+ inline int MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::ByteSize( \
+ const MapEntryAccessorType& value) { \
+ return WireFormatLite::DeclaredType##Size(value); \
+ }
+
+GOOGLE_PROTOBUF_BYTE_SIZE(STRING, String)
+GOOGLE_PROTOBUF_BYTE_SIZE(BYTES , Bytes)
+GOOGLE_PROTOBUF_BYTE_SIZE(INT64 , Int64)
+GOOGLE_PROTOBUF_BYTE_SIZE(UINT64, UInt64)
+GOOGLE_PROTOBUF_BYTE_SIZE(INT32 , Int32)
+GOOGLE_PROTOBUF_BYTE_SIZE(UINT32, UInt32)
+GOOGLE_PROTOBUF_BYTE_SIZE(SINT64, SInt64)
+GOOGLE_PROTOBUF_BYTE_SIZE(SINT32, SInt32)
+GOOGLE_PROTOBUF_BYTE_SIZE(ENUM , Enum)
+
+#undef GOOGLE_PROTOBUF_BYTE_SIZE
+
+#define FIXED_BYTE_SIZE(FieldType, DeclaredType) \
+ template <typename Type> \
+ inline int MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::ByteSize( \
+ const MapEntryAccessorType& value) { \
+ return WireFormatLite::k##DeclaredType##Size; \
+ }
+
+FIXED_BYTE_SIZE(DOUBLE , Double)
+FIXED_BYTE_SIZE(FLOAT , Float)
+FIXED_BYTE_SIZE(FIXED64 , Fixed64)
+FIXED_BYTE_SIZE(FIXED32 , Fixed32)
+FIXED_BYTE_SIZE(SFIXED64, SFixed64)
+FIXED_BYTE_SIZE(SFIXED32, SFixed32)
+FIXED_BYTE_SIZE(BOOL , Bool)
+
+#undef FIXED_BYTE_SIZE
+
+template <typename Type>
+inline int
+MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type>::GetCachedSize(
+ const MapEntryAccessorType& value) {
+ return WireFormatLite::LengthDelimitedSize(value.GetCachedSize());
+}
+
+#define GET_CACHED_SIZE(FieldType, DeclaredType) \
+ template <typename Type> \
+ inline int \
+ MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::GetCachedSize( \
+ const MapEntryAccessorType& value) { \
+ return WireFormatLite::DeclaredType##Size(value); \
+ }
+
+GET_CACHED_SIZE(STRING, String)
+GET_CACHED_SIZE(BYTES , Bytes)
+GET_CACHED_SIZE(INT64 , Int64)
+GET_CACHED_SIZE(UINT64, UInt64)
+GET_CACHED_SIZE(INT32 , Int32)
+GET_CACHED_SIZE(UINT32, UInt32)
+GET_CACHED_SIZE(SINT64, SInt64)
+GET_CACHED_SIZE(SINT32, SInt32)
+GET_CACHED_SIZE(ENUM , Enum)
+
+#undef GET_CACHED_SIZE
+
+#define GET_FIXED_CACHED_SIZE(FieldType, DeclaredType) \
+ template <typename Type> \
+ inline int \
+ MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::GetCachedSize( \
+ const MapEntryAccessorType& value) { \
+ return WireFormatLite::k##DeclaredType##Size; \
+ }
+
+GET_FIXED_CACHED_SIZE(DOUBLE , Double)
+GET_FIXED_CACHED_SIZE(FLOAT , Float)
+GET_FIXED_CACHED_SIZE(FIXED64 , Fixed64)
+GET_FIXED_CACHED_SIZE(FIXED32 , Fixed32)
+GET_FIXED_CACHED_SIZE(SFIXED64, SFixed64)
+GET_FIXED_CACHED_SIZE(SFIXED32, SFixed32)
+GET_FIXED_CACHED_SIZE(BOOL , Bool)
+
+#undef GET_FIXED_CACHED_SIZE
+
+template <typename Type>
+inline void MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type>::Write(
+ int field, const MapEntryAccessorType& value,
+ io::CodedOutputStream* output) {
+ WireFormatLite::WriteMessageMaybeToArray(field, value, output);
+}
+
+template <typename Type>
+inline uint8*
+MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type>::WriteToArray(
+ int field, const MapEntryAccessorType& value, uint8* output) {
+ return WireFormatLite::WriteMessageToArray(field, value, output);
+}
+
+#define WRITE_METHOD(FieldType, DeclaredType) \
+ template <typename Type> \
+ inline void MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::Write( \
+ int field, const MapEntryAccessorType& value, \
+ io::CodedOutputStream* output) { \
+ return WireFormatLite::Write##DeclaredType(field, value, output); \
+ } \
+ template <typename Type> \
+ inline uint8* \
+ MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::WriteToArray( \
+ int field, const MapEntryAccessorType& value, uint8* output) { \
+ return WireFormatLite::Write##DeclaredType##ToArray(field, value, output); \
+ }
+
+WRITE_METHOD(STRING , String)
+WRITE_METHOD(BYTES , Bytes)
+WRITE_METHOD(INT64 , Int64)
+WRITE_METHOD(UINT64 , UInt64)
+WRITE_METHOD(INT32 , Int32)
+WRITE_METHOD(UINT32 , UInt32)
+WRITE_METHOD(SINT64 , SInt64)
+WRITE_METHOD(SINT32 , SInt32)
+WRITE_METHOD(ENUM , Enum)
+WRITE_METHOD(DOUBLE , Double)
+WRITE_METHOD(FLOAT , Float)
+WRITE_METHOD(FIXED64 , Fixed64)
+WRITE_METHOD(FIXED32 , Fixed32)
+WRITE_METHOD(SFIXED64, SFixed64)
+WRITE_METHOD(SFIXED32, SFixed32)
+WRITE_METHOD(BOOL , Bool)
+
+#undef WRITE_METHOD
+
+template <typename Type>
+inline bool MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type>::Read(
+ io::CodedInputStream* input, MapEntryAccessorType* value) {
+ return WireFormatLite::ReadMessageNoVirtual(input, value);
+}
+
+template <typename Type>
+inline bool MapTypeHandler<WireFormatLite::TYPE_STRING, Type>::Read(
+ io::CodedInputStream* input, MapEntryAccessorType* value) {
+ return WireFormatLite::ReadString(input, value);
+}
+
+template <typename Type>
+inline bool MapTypeHandler<WireFormatLite::TYPE_BYTES, Type>::Read(
+ io::CodedInputStream* input, MapEntryAccessorType* value) {
+ return WireFormatLite::ReadBytes(input, value);
+}
+
+#define READ_METHOD(FieldType) \
+ template <typename Type> \
+ inline bool MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::Read( \
+ io::CodedInputStream* input, MapEntryAccessorType* value) { \
+ return WireFormatLite::ReadPrimitive<TypeOnMemory, \
+ WireFormatLite::TYPE_##FieldType>( \
+ input, value); \
+ }
+
+READ_METHOD(INT64)
+READ_METHOD(UINT64)
+READ_METHOD(INT32)
+READ_METHOD(UINT32)
+READ_METHOD(SINT64)
+READ_METHOD(SINT32)
+READ_METHOD(ENUM)
+READ_METHOD(DOUBLE)
+READ_METHOD(FLOAT)
+READ_METHOD(FIXED64)
+READ_METHOD(FIXED32)
+READ_METHOD(SFIXED64)
+READ_METHOD(SFIXED32)
+READ_METHOD(BOOL)
+
+#undef READ_METHOD
+
+// Definition for message handler
+
+template <typename Type>
+inline const Type&
+MapTypeHandler<WireFormatLite::TYPE_MESSAGE,
+ Type>::GetExternalReference(const Type* value) {
+ return *value;
+}
+
+template <typename Type>
+inline int
+MapTypeHandler<WireFormatLite::TYPE_MESSAGE,
+ Type>::SpaceUsedInMapEntry(const Type* value) {
+ return value->SpaceUsed();
+}
+
+template <typename Type>
+int MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type>::SpaceUsedInMap(
+ const Type& value) {
+ return value.SpaceUsed();
+}
+
+template <typename Type>
+inline void MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type>::Clear(
+ Type** value, Arena* arena) {
+ if (*value != NULL) (*value)->Clear();
+}
+template <typename Type>
+inline void
+MapTypeHandler<WireFormatLite::TYPE_MESSAGE,
+ Type>::ClearMaybeByDefaultEnum(Type** value,
+ Arena* arena,
+ int default_enum_value) {
+ if (*value != NULL) (*value)->Clear();
+}
+template <typename Type>
+inline void MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type>::Merge(
+ const Type& from, Type** to, Arena* arena) {
+ (*to)->MergeFrom(from);
+}
+
+template <typename Type>
+void MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type>::DeleteNoArena(
+ const Type* ptr) {
+ delete ptr;
+}
+
+template <typename Type>
+inline void MapTypeHandler<WireFormatLite::TYPE_MESSAGE,
+ Type>::AssignDefaultValue(Type** value) {
+ *value = const_cast<Type*>(&Type::default_instance());
+}
+
+template <typename Type>
+inline void MapTypeHandler<WireFormatLite::TYPE_MESSAGE,
+ Type>::Initialize(Type** x,
+ Arena* arena) {
+ *x = NULL;
+}
+
+template <typename Type>
+inline void MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type>::
+ InitializeMaybeByDefaultEnum(Type** x, int default_enum_value,
+ Arena* arena) {
+ *x = NULL;
+}
+
+template <typename Type>
+inline Type* MapTypeHandler<WireFormatLite::TYPE_MESSAGE,
+ Type>::EnsureMutable(Type** value,
+ Arena* arena) {
+ if (*value == NULL) {
+ *value =
+ MapArenaMessageCreator<Type, Arena::is_arena_constructable<Type>::
+ type::value>::CreateMessage(arena);
+ }
+ return *value;
+}
+
+template <typename Type>
+inline const Type& MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type>::
+ DefaultIfNotInitialized(const Type* value, const Type* default_value) {
+ return value != NULL ? *value : *default_value;
+}
+
+template <typename Type>
+inline bool MapTypeHandler<WireFormatLite::TYPE_MESSAGE,
+ Type>::IsInitialized(Type* value) {
+ return value->IsInitialized();
+}
+
+// Definition for string/bytes handler
+
+#define STRING_OR_BYTES_HANDLER_FUNCTIONS(FieldType) \
+ template <typename Type> \
+ inline const typename MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::MapEntryAccessorType& \
+ MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::GetExternalReference(const TypeOnMemory& value) { \
+ return value.Get(&::google::protobuf::internal::GetEmptyString()); \
+ } \
+ template <typename Type> \
+ inline int \
+ MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::SpaceUsedInMapEntry( \
+ const TypeOnMemory& value) { \
+ return sizeof(value); \
+ } \
+ template <typename Type> \
+ inline int MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::SpaceUsedInMap(const TypeOnMemory& value) { \
+ return sizeof(value); \
+ } \
+ template <typename Type> \
+ inline int MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::SpaceUsedInMap(const string& value) { \
+ return sizeof(value); \
+ } \
+ template <typename Type> \
+ inline void MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::Clear( \
+ TypeOnMemory* value, Arena* arena) { \
+ value->ClearToEmpty(&::google::protobuf::internal::GetEmptyString(), arena); \
+ } \
+ template <typename Type> \
+ inline void \
+ MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::ClearMaybeByDefaultEnum(TypeOnMemory* value, \
+ Arena* arena, \
+ int default_enum) { \
+ Clear(value, arena); \
+ } \
+ template <typename Type> \
+ inline void MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::Merge( \
+ const MapEntryAccessorType& from, TypeOnMemory* to, Arena* arena) { \
+ to->Set(&::google::protobuf::internal::GetEmptyString(), from, arena); \
+ } \
+ template <typename Type> \
+ void MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::DeleteNoArena( \
+ TypeOnMemory& value) { \
+ value.DestroyNoArena(&::google::protobuf::internal::GetEmptyString()); \
+ } \
+ template <typename Type> \
+ inline void MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::AssignDefaultValue(TypeOnMemory* value) {} \
+ template <typename Type> \
+ inline void \
+ MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::Initialize( \
+ TypeOnMemory* value, Arena* arena) { \
+ value->UnsafeSetDefault(&::google::protobuf::internal::GetEmptyString()); \
+ } \
+ template <typename Type> \
+ inline void \
+ MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::InitializeMaybeByDefaultEnum(TypeOnMemory* value, \
+ int default_enum_value, \
+ Arena* arena) { \
+ Initialize(value, arena); \
+ } \
+ template <typename Type> \
+ inline typename MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::MapEntryAccessorType* \
+ MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::EnsureMutable( \
+ TypeOnMemory* value, Arena* arena) { \
+ return value->Mutable(&::google::protobuf::internal::GetEmptyString(), arena); \
+ } \
+ template <typename Type> \
+ inline const typename MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::MapEntryAccessorType& \
+ MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::DefaultIfNotInitialized(const TypeOnMemory& value, \
+ const TypeOnMemory& \
+ default_value) { \
+ return value.Get(&::google::protobuf::internal::GetEmptyString()); \
+ } \
+ template <typename Type> \
+ inline bool MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::IsInitialized(const TypeOnMemory& value) { \
+ return true; \
+ }
+STRING_OR_BYTES_HANDLER_FUNCTIONS(STRING)
+STRING_OR_BYTES_HANDLER_FUNCTIONS(BYTES)
+#undef STRING_OR_BYTES_HANDLER_FUNCTIONS
+
+#define PRIMITIVE_HANDLER_FUNCTIONS(FieldType) \
+ template <typename Type> \
+ inline const typename MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::MapEntryAccessorType& \
+ MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::GetExternalReference(const TypeOnMemory& value) { \
+ return value; \
+ } \
+ template <typename Type> \
+ inline int \
+ MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::SpaceUsedInMapEntry( \
+ const TypeOnMemory& value) { \
+ return 0; \
+ } \
+ template <typename Type> \
+ inline int MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::SpaceUsedInMap(const TypeOnMemory& value) { \
+ return sizeof(Type); \
+ } \
+ template <typename Type> \
+ inline void MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::Clear( \
+ TypeOnMemory* value, Arena* arena) { \
+ *value = 0; \
+ } \
+ template <typename Type> \
+ inline void \
+ MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::ClearMaybeByDefaultEnum(TypeOnMemory* value, \
+ Arena* arena, \
+ int default_enum_value) { \
+ *value = static_cast<TypeOnMemory>(default_enum_value); \
+ } \
+ template <typename Type> \
+ inline void MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::Merge( \
+ const MapEntryAccessorType& from, TypeOnMemory* to, Arena* arena) { \
+ *to = from; \
+ } \
+ template <typename Type> \
+ inline void MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::DeleteNoArena(TypeOnMemory& x) {} \
+ template <typename Type> \
+ inline void MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::AssignDefaultValue(TypeOnMemory* value) {} \
+ template <typename Type> \
+ inline void \
+ MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::Initialize( \
+ TypeOnMemory* value, Arena* arena) { \
+ *value = 0; \
+ } \
+ template <typename Type> \
+ inline void \
+ MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::InitializeMaybeByDefaultEnum(TypeOnMemory* value, \
+ int default_enum_value, \
+ Arena* arena) { \
+ *value = static_cast<TypeOnMemory>(default_enum_value); \
+ } \
+ template <typename Type> \
+ inline typename MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::MapEntryAccessorType* \
+ MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::EnsureMutable( \
+ TypeOnMemory* value, Arena* arena) { \
+ return value; \
+ } \
+ template <typename Type> \
+ inline const typename MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::MapEntryAccessorType& \
+ MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::DefaultIfNotInitialized(const TypeOnMemory& value, \
+ const TypeOnMemory& \
+ default_value) { \
+ return value; \
+ } \
+ template <typename Type> \
+ inline bool MapTypeHandler<WireFormatLite::TYPE_##FieldType, \
+ Type>::IsInitialized(const TypeOnMemory& value) { \
+ return true; \
+ }
+PRIMITIVE_HANDLER_FUNCTIONS(INT64)
+PRIMITIVE_HANDLER_FUNCTIONS(UINT64)
+PRIMITIVE_HANDLER_FUNCTIONS(INT32)
+PRIMITIVE_HANDLER_FUNCTIONS(UINT32)
+PRIMITIVE_HANDLER_FUNCTIONS(SINT64)
+PRIMITIVE_HANDLER_FUNCTIONS(SINT32)
+PRIMITIVE_HANDLER_FUNCTIONS(ENUM)
+PRIMITIVE_HANDLER_FUNCTIONS(DOUBLE)
+PRIMITIVE_HANDLER_FUNCTIONS(FLOAT)
+PRIMITIVE_HANDLER_FUNCTIONS(FIXED64)
+PRIMITIVE_HANDLER_FUNCTIONS(FIXED32)
+PRIMITIVE_HANDLER_FUNCTIONS(SFIXED64)
+PRIMITIVE_HANDLER_FUNCTIONS(SFIXED32)
+PRIMITIVE_HANDLER_FUNCTIONS(BOOL)
+#undef PRIMITIVE_HANDLER_FUNCTIONS
+
+} // namespace internal
+} // namespace protobuf
+
+} // namespace google
+#endif // GOOGLE_PROTOBUF_TYPE_HANDLER_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/message.h b/darwin-x86_64/protoc/include/google/protobuf/message.h
index 9593560..a4d9277 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/message.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/message.h
@@ -98,11 +98,11 @@
//
// // Use the reflection interface to examine the contents.
// const Reflection* reflection = foo->GetReflection();
-// assert(reflection->GetString(foo, text_field) == "Hello World!");
-// assert(reflection->FieldSize(foo, numbers_field) == 3);
-// assert(reflection->GetRepeatedInt32(foo, numbers_field, 0) == 1);
-// assert(reflection->GetRepeatedInt32(foo, numbers_field, 1) == 5);
-// assert(reflection->GetRepeatedInt32(foo, numbers_field, 2) == 42);
+// assert(reflection->GetString(*foo, text_field) == "Hello World!");
+// assert(reflection->FieldSize(*foo, numbers_field) == 3);
+// assert(reflection->GetRepeatedInt32(*foo, numbers_field, 0) == 1);
+// assert(reflection->GetRepeatedInt32(*foo, numbers_field, 1) == 5);
+// assert(reflection->GetRepeatedInt32(*foo, numbers_field, 2) == 42);
//
// delete foo;
// }
@@ -112,8 +112,10 @@
#include <iosfwd>
#include <string>
+#include <google/protobuf/stubs/type_traits.h>
#include <vector>
+#include <google/protobuf/arena.h>
#include <google/protobuf/message_lite.h>
#include <google/protobuf/stubs/common.h>
@@ -121,6 +123,7 @@
#define GOOGLE_PROTOBUF_HAS_ONEOF
+#define GOOGLE_PROTOBUF_HAS_ARENAS
namespace google {
namespace protobuf {
@@ -131,12 +134,23 @@
class MessageFactory;
// Defined in other files.
+class MapKey;
+class MapValueRef;
+class MapIterator;
+class MapReflectionTester;
+
+namespace internal {
+class MapFieldBase;
+}
class UnknownFieldSet; // unknown_field_set.h
namespace io {
- class ZeroCopyInputStream; // zero_copy_stream.h
- class ZeroCopyOutputStream; // zero_copy_stream.h
- class CodedInputStream; // coded_stream.h
- class CodedOutputStream; // coded_stream.h
+class ZeroCopyInputStream; // zero_copy_stream.h
+class ZeroCopyOutputStream; // zero_copy_stream.h
+class CodedInputStream; // coded_stream.h
+class CodedOutputStream; // coded_stream.h
+}
+namespace python {
+class MapReflectionFriend; // scalar_map_container.h
}
@@ -174,6 +188,17 @@
// for return-type covariance.)
virtual Message* New() const = 0;
+ // Construct a new instance on the arena. Ownership is passed to the caller
+ // if arena is a NULL. Default implementation allows for API compatibility
+ // during the Arena transition.
+ virtual Message* New(::google::protobuf::Arena* arena) const {
+ Message* message = New();
+ if (arena != NULL) {
+ arena->Own(message);
+ }
+ return message;
+ }
+
// Make this message into a copy of the given message. The given message
// must have the same descriptor, but need not necessarily be the same class.
// By default this is just implemented as "Clear(); MergeFrom(from);".
@@ -194,7 +219,7 @@
// This is much, much slower than IsInitialized() as it is implemented
// purely via reflection. Generally, you should not call this unless you
// have already determined that an error exists by calling IsInitialized().
- void FindInitializationErrors(vector<string>* errors) const;
+ void FindInitializationErrors(std::vector<string>* errors) const;
// Like FindInitializationErrors, but joins all the strings, delimited by
// commas, and returns them.
@@ -215,6 +240,11 @@
// Computes (an estimate of) the total number of bytes currently used for
// storing the message in memory. The default implementation calls the
// Reflection object's SpaceUsed() method.
+ //
+ // SpaceUsed() is noticeably slower than ByteSize(), as it is implemented
+ // using reflection (rather than the generated code implementation for
+ // ByteSize()). Like ByteSize(), its CPU time is linear in the number of
+ // fields defined for the proto.
virtual int SpaceUsed() const;
// Debugging & Testing----------------------------------------------
@@ -313,6 +343,20 @@
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Message);
};
+namespace internal {
+// Forward-declare interfaces used to implement RepeatedFieldRef.
+// These are protobuf internals that users shouldn't care about.
+class RepeatedFieldAccessor;
+} // namespace internal
+
+// Forward-declare RepeatedFieldRef templates. The second type parameter is
+// used for SFINAE tricks. Users should ignore it.
+template<typename T, typename Enable = void>
+class RepeatedFieldRef;
+
+template<typename T, typename Enable = void>
+class MutableRepeatedFieldRef;
+
// This interface contains methods that can be used to dynamically access
// and modify the fields of a protocol message. Their semantics are
// similar to the accessors the protocol compiler generates.
@@ -361,12 +405,15 @@
// Get the UnknownFieldSet for the message. This contains fields which
// were seen when the Message was parsed but were not recognized according
- // to the Message's definition.
+ // to the Message's definition. For proto3 protos, this method will always
+ // return an empty UnknownFieldSet.
virtual const UnknownFieldSet& GetUnknownFields(
const Message& message) const = 0;
// Get a mutable pointer to the UnknownFieldSet for the message. This
// contains fields which were seen when the Message was parsed but were not
- // recognized according to the Message's definition.
+ // recognized according to the Message's definition. For proto3 protos, this
+ // method will return a valid mutable UnknownFieldSet pointer but modifying
+ // it won't affect the serialized bytes of the message.
virtual UnknownFieldSet* MutableUnknownFields(Message* message) const = 0;
// Estimate the amount of memory used by the message object.
@@ -385,23 +432,23 @@
virtual void ClearField(Message* message,
const FieldDescriptor* field) const = 0;
- // Check if the oneof is set. Returns ture if any field in oneof
+ // Check if the oneof is set. Returns true if any field in oneof
// is set, false otherwise.
// TODO(jieluo) - make it pure virtual after updating all
// the subclasses.
- virtual bool HasOneof(const Message& message,
- const OneofDescriptor* oneof_descriptor) const {
+ virtual bool HasOneof(const Message& /*message*/,
+ const OneofDescriptor* /*oneof_descriptor*/) const {
return false;
}
- virtual void ClearOneof(Message* message,
- const OneofDescriptor* oneof_descriptor) const {}
+ virtual void ClearOneof(Message* /*message*/,
+ const OneofDescriptor* /*oneof_descriptor*/) const {}
// Returns the field descriptor if the oneof is set. NULL otherwise.
// TODO(jieluo) - make it pure virtual.
virtual const FieldDescriptor* GetOneofFieldDescriptor(
- const Message& message,
- const OneofDescriptor* oneof_descriptor) const {
+ const Message& /*message*/,
+ const OneofDescriptor* /*oneof_descriptor*/) const {
return NULL;
}
@@ -425,7 +472,7 @@
// Swap fields listed in fields vector of two messages.
virtual void SwapFields(Message* message1,
Message* message2,
- const vector<const FieldDescriptor*>& fields)
+ const std::vector<const FieldDescriptor*>& fields)
const = 0;
// Swap two elements of a repeated field.
@@ -439,8 +486,9 @@
// return true and repeated fields will only be listed if FieldSize(field)
// would return non-zero. Fields (both normal fields and extension fields)
// will be listed ordered by field number.
- virtual void ListFields(const Message& message,
- vector<const FieldDescriptor*>* output) const = 0;
+ virtual void ListFields(
+ const Message& message,
+ std::vector<const FieldDescriptor*>* output) const = 0;
// Singular field getters ------------------------------------------
// These get the value of a non-repeated field. They return the default
@@ -464,6 +512,15 @@
const FieldDescriptor* field) const = 0;
virtual const EnumValueDescriptor* GetEnum(
const Message& message, const FieldDescriptor* field) const = 0;
+
+ // GetEnumValue() returns an enum field's value as an integer rather than
+ // an EnumValueDescriptor*. If the integer value does not correspond to a
+ // known value descriptor, a new value descriptor is created. (Such a value
+ // will only be present when the new unknown-enum-value semantics are enabled
+ // for a message.)
+ virtual int GetEnumValue(
+ const Message& message, const FieldDescriptor* field) const;
+
// See MutableMessage() for the meaning of the "factory" parameter.
virtual const Message& GetMessage(const Message& message,
const FieldDescriptor* field,
@@ -483,7 +540,7 @@
// 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(field);
+ // string str = reflection->GetString(message, field);
virtual const string& GetStringReference(const Message& message,
const FieldDescriptor* field,
string* scratch) const = 0;
@@ -512,6 +569,14 @@
virtual void SetEnum (Message* message,
const FieldDescriptor* field,
const EnumValueDescriptor* value) const = 0;
+ // Set an enum field's value with an integer rather than EnumValueDescriptor.
+ // If the value does not correspond to a known enum value, either behavior is
+ // undefined (for proto2 messages), or the value is accepted silently for
+ // messages with new unknown-enum-value semantics.
+ virtual void SetEnumValue(Message* message,
+ const FieldDescriptor* field,
+ int value) const;
+
// Get a mutable pointer to a field with a message type. If a MessageFactory
// is provided, it will be used to construct instances of the sub-message;
// otherwise, the default factory is used. If the field is an extension that
@@ -574,6 +639,14 @@
virtual const EnumValueDescriptor* GetRepeatedEnum(
const Message& message,
const FieldDescriptor* field, int index) const = 0;
+ // GetRepeatedEnumValue() returns an enum field's value as an integer rather
+ // than an EnumValueDescriptor*. If the integer value does not correspond to a
+ // known value descriptor, a new value descriptor is created. (Such a value
+ // will only be present when the new unknown-enum-value semantics are enabled
+ // for a message.)
+ virtual int GetRepeatedEnumValue(
+ const Message& message,
+ const FieldDescriptor* field, int index) const;
virtual const Message& GetRepeatedMessage(
const Message& message,
const FieldDescriptor* field, int index) const = 0;
@@ -614,6 +687,13 @@
virtual void SetRepeatedEnum(Message* message,
const FieldDescriptor* field, int index,
const EnumValueDescriptor* value) const = 0;
+ // Set an enum field's value with an integer rather than EnumValueDescriptor.
+ // If the value does not correspond to a known enum value, either behavior is
+ // undefined (for proto2 messages), or the value is accepted silently for
+ // messages with new unknown-enum-value semantics.
+ virtual void SetRepeatedEnumValue(Message* message,
+ const FieldDescriptor* field, int index,
+ int value) const;
// Get a mutable pointer to an element of a repeated field with a message
// type.
virtual Message* MutableRepeatedMessage(
@@ -643,12 +723,65 @@
virtual void AddEnum (Message* message,
const FieldDescriptor* field,
const EnumValueDescriptor* value) const = 0;
+ // Set an enum field's value with an integer rather than EnumValueDescriptor.
+ // If the value does not correspond to a known enum value, either behavior is
+ // undefined (for proto2 messages), or the value is accepted silently for
+ // messages with new unknown-enum-value semantics.
+ virtual void AddEnumValue(Message* message,
+ const FieldDescriptor* field,
+ int value) const;
// See MutableMessage() for comments on the "factory" parameter.
virtual Message* AddMessage(Message* message,
const FieldDescriptor* field,
MessageFactory* factory = NULL) const = 0;
+ // Appends an already-allocated object 'new_entry' to the repeated field
+ // specifyed by 'field' passing ownership to the message.
+ // TODO(tmarek): Make virtual after all subclasses have been
+ // updated.
+ virtual void AddAllocatedMessage(Message* /* message */,
+ const FieldDescriptor* /*field */,
+ Message* /* new_entry */) const {}
+
+ // Get a RepeatedFieldRef object that can be used to read the underlying
+ // repeated field. The type parameter T must be set according to the
+ // field's cpp type. The following table shows the mapping from cpp type
+ // to acceptable T.
+ //
+ // field->cpp_type() T
+ // CPPTYPE_INT32 int32
+ // CPPTYPE_UINT32 uint32
+ // CPPTYPE_INT64 int64
+ // CPPTYPE_UINT64 uint64
+ // CPPTYPE_DOUBLE double
+ // CPPTYPE_FLOAT float
+ // CPPTYPE_BOOL bool
+ // CPPTYPE_ENUM generated enum type or int32
+ // CPPTYPE_STRING string
+ // CPPTYPE_MESSAGE generated message type or google::protobuf::Message
+ //
+ // A RepeatedFieldRef object can be copied and the resulted object will point
+ // to the same repeated field in the same message. The object can be used as
+ // long as the message is not destroyed.
+ //
+ // Note that to use this method users need to include the header file
+ // "google/protobuf/reflection.h" (which defines the RepeatedFieldRef
+ // class templates).
+ template<typename T>
+ RepeatedFieldRef<T> GetRepeatedFieldRef(
+ const Message& message, const FieldDescriptor* field) const;
+
+ // Like GetRepeatedFieldRef() but return an object that can also be used
+ // manipulate the underlying repeated field.
+ template<typename T>
+ MutableRepeatedFieldRef<T> GetMutableRepeatedFieldRef(
+ Message* message, const FieldDescriptor* field) const;
+
+ // DEPRECATED. Please use Get(Mutable)RepeatedFieldRef() for repeated field
+ // access. The following repeated field accesors will be removed in the
+ // future.
+ //
// Repeated field accessors -------------------------------------------------
// The methods above, e.g. GetRepeatedInt32(msg, fd, index), provide singular
// access to the data in a RepeatedField. The methods below provide aggregate
@@ -659,22 +792,30 @@
//
// Usage example: my_doubs = refl->GetRepeatedField<double>(msg, fd);
+ // DEPRECATED. Please use GetRepeatedFieldRef().
+ //
// for T = Cord and all protobuf scalar types except enums.
template<typename T>
const RepeatedField<T>& GetRepeatedField(
const Message&, const FieldDescriptor*) const;
+ // DEPRECATED. Please use GetMutableRepeatedFieldRef().
+ //
// for T = Cord and all protobuf scalar types except enums.
template<typename T>
RepeatedField<T>* MutableRepeatedField(
Message*, const FieldDescriptor*) const;
+ // DEPRECATED. Please use GetRepeatedFieldRef().
+ //
// for T = string, google::protobuf::internal::StringPieceField
// google::protobuf::Message & descendants.
template<typename T>
const RepeatedPtrField<T>& GetRepeatedPtrField(
const Message&, const FieldDescriptor*) const;
+ // DEPRECATED. Please use GetMutableRepeatedFieldRef().
+ //
// for T = string, google::protobuf::internal::StringPieceField
// google::protobuf::Message & descendants.
template<typename T>
@@ -693,6 +834,52 @@
virtual const FieldDescriptor* FindKnownExtensionByNumber(
int number) const = 0;
+ // Feature Flags -------------------------------------------------------------
+
+ // Does this message support storing arbitrary integer values in enum fields?
+ // If |true|, GetEnumValue/SetEnumValue and associated repeated-field versions
+ // take arbitrary integer values, and the legacy GetEnum() getter will
+ // dynamically create an EnumValueDescriptor for any integer value without
+ // one. If |false|, setting an unknown enum value via the integer-based
+ // setters results in undefined behavior (in practice, GOOGLE_DCHECK-fails).
+ //
+ // Generic code that uses reflection to handle messages with enum fields
+ // should check this flag before using the integer-based setter, and either
+ // downgrade to a compatible value or use the UnknownFieldSet if not. For
+ // example:
+ //
+ // int new_value = GetValueFromApplicationLogic();
+ // if (reflection->SupportsUnknownEnumValues()) {
+ // reflection->SetEnumValue(message, field, new_value);
+ // } else {
+ // if (field_descriptor->enum_type()->
+ // FindValueByNumver(new_value) != NULL) {
+ // reflection->SetEnumValue(message, field, new_value);
+ // } else if (emit_unknown_enum_values) {
+ // reflection->MutableUnknownFields(message)->AddVarint(
+ // field->number(),
+ // new_value);
+ // } else {
+ // // convert value to a compatible/default value.
+ // new_value = CompatibleDowngrade(new_value);
+ // reflection->SetEnumValue(message, field, new_value);
+ // }
+ // }
+ virtual bool SupportsUnknownEnumValues() const { return false; }
+
+ // Returns the MessageFactory associated with this message. This can be
+ // useful for determining if a message is a generated message or not, for
+ // example:
+ //
+ // if (message->GetReflection()->GetMessageFactory() ==
+ // google::protobuf::MessageFactory::generated_factory()) {
+ // // This is a generated message.
+ // }
+ //
+ // It can also be used to create more messages of this type, though
+ // Message::New() is an easier way to accomplish this.
+ virtual MessageFactory* GetMessageFactory() const;
+
// ---------------------------------------------------------------------------
protected:
@@ -700,19 +887,118 @@
// on field->cpp_type(),
// on field->field_option().ctype() (if ctype >= 0)
// of field->message_type() (if message_type != NULL).
- // We use 1 routine rather than 4 (const vs mutable) x (scalar vs pointer).
+ // We use 2 routine rather than 4 (const vs mutable) x (scalar vs pointer).
virtual void* MutableRawRepeatedField(
Message* message, const FieldDescriptor* field, FieldDescriptor::CppType,
int ctype, const Descriptor* message_type) const = 0;
+ // TODO(jieluo) - make it pure virtual after updating all the subclasses.
+ virtual const void* GetRawRepeatedField(
+ const Message& message, const FieldDescriptor* field,
+ FieldDescriptor::CppType cpptype, int ctype,
+ const Descriptor* message_type) const {
+ return MutableRawRepeatedField(
+ const_cast<Message*>(&message), field, cpptype, ctype, message_type);
+ }
+
+ // The following methods are used to implement (Mutable)RepeatedFieldRef.
+ // A Ref object will store a raw pointer to the repeated field data (obtained
+ // from RepeatedFieldData()) and a pointer to a Accessor (obtained from
+ // RepeatedFieldAccessor) which will be used to access the raw data.
+ //
+ // TODO(xiaofeng): Make these methods pure-virtual.
+
+ // Returns a raw pointer to the repeated field
+ //
+ // "cpp_type" and "message_type" are decuded from the type parameter T passed
+ // to Get(Mutable)RepeatedFieldRef. If T is a generated message type,
+ // "message_type" should be set to its descriptor. Otherwise "message_type"
+ // should be set to NULL. Implementations of this method should check whether
+ // "cpp_type"/"message_type" is consistent with the actual type of the field.
+ // We use 1 routine rather than 2 (const vs mutable) because it is protected
+ // and it doesn't change the message.
+ virtual void* RepeatedFieldData(
+ Message* message, const FieldDescriptor* field,
+ FieldDescriptor::CppType cpp_type,
+ const Descriptor* message_type) const;
+
+ // The returned pointer should point to a singleton instance which implements
+ // the RepeatedFieldAccessor interface.
+ virtual const internal::RepeatedFieldAccessor* RepeatedFieldAccessor(
+ const FieldDescriptor* field) const;
+
private:
+ template<typename T, typename Enable>
+ friend class RepeatedFieldRef;
+ template<typename T, typename Enable>
+ friend class MutableRepeatedFieldRef;
+ friend class ::google::protobuf::python::MapReflectionFriend;
+
// 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
+ // and mutable a repeated string field doesn't change the message.
void* MutableRawRepeatedString(
Message* message, const FieldDescriptor* field, bool is_string) const;
+ friend class MapReflectionTester;
+ // TODO(jieluo) - make the map APIs pure virtual after updating
+ // all the subclasses.
+ // Returns true if key is in map. Returns false if key is not in map field.
+ virtual bool ContainsMapKey(const Message& /* message*/,
+ const FieldDescriptor* /* field */,
+ const MapKey& /* key */) const {
+ return false;
+ }
+
+ // If key is in map field: Saves the value pointer to val and returns
+ // false. If key in not in map field: Insert the key into map, saves
+ // value pointer to val and retuns true.
+ virtual bool InsertOrLookupMapValue(Message* /* message */,
+ const FieldDescriptor* /* field */,
+ const MapKey& /* key */,
+ MapValueRef* /* val */) const {
+ return false;
+ }
+
+ // Delete and returns true if key is in the map field. Returns false
+ // otherwise.
+ virtual bool DeleteMapValue(Message* /* mesage */,
+ const FieldDescriptor* /* field */,
+ const MapKey& /* key */) const {
+ return false;
+ }
+
+ // Returns a MapIterator referring to the first element in the map field.
+ // If the map field is empty, this function returns the same as
+ // reflection::MapEnd. Mutation to the field may invalidate the iterator.
+ virtual MapIterator MapBegin(
+ Message* message,
+ const FieldDescriptor* field) const;
+
+ // Returns a MapIterator referring to the theoretical element that would
+ // follow the last element in the map field. It does not point to any
+ // real element. Mutation to the field may invalidate the iterator.
+ virtual MapIterator MapEnd(
+ Message* message,
+ const FieldDescriptor* field) const;
+
+ // Get the number of <key, value> pair of a map field. The result may be
+ // different from FieldSize which can have duplicate keys.
+ virtual int MapSize(const Message& /* message */,
+ const FieldDescriptor* /* field */) const {
+ return 0;
+ }
+
+ // Help method for MapIterator.
+ friend class MapIterator;
+ virtual internal::MapFieldBase* MapData(
+ Message* /* message */, const FieldDescriptor* /* field */) const {
+ return NULL;
+ }
+
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Reflection);
};
@@ -787,6 +1073,7 @@
const Message& message, const FieldDescriptor* field) const; \
\
template<> \
+LIBPROTOBUF_EXPORT \
RepeatedField<TYPE>* Reflection::MutableRepeatedField<TYPE>( \
Message* message, const FieldDescriptor* field) const;
@@ -827,10 +1114,9 @@
template<>
inline const RepeatedPtrField<Message>& Reflection::GetRepeatedPtrField(
const Message& message, const FieldDescriptor* field) const {
- return *static_cast<RepeatedPtrField<Message>* >(
- MutableRawRepeatedField(const_cast<Message*>(&message), field,
- FieldDescriptor::CPPTYPE_MESSAGE, -1,
- NULL));
+ return *static_cast<const RepeatedPtrField<Message>* >(
+ GetRawRepeatedField(message, field, FieldDescriptor::CPPTYPE_MESSAGE,
+ -1, NULL));
}
template<>
@@ -845,10 +1131,9 @@
template<typename PB>
inline const RepeatedPtrField<PB>& Reflection::GetRepeatedPtrField(
const Message& message, const FieldDescriptor* field) const {
- return *static_cast<RepeatedPtrField<PB>* >(
- MutableRawRepeatedField(const_cast<Message*>(&message), field,
- FieldDescriptor::CPPTYPE_MESSAGE, -1,
- PB::default_instance().GetDescriptor()));
+ return *static_cast<const RepeatedPtrField<PB>* >(
+ GetRawRepeatedField(message, field, FieldDescriptor::CPPTYPE_MESSAGE,
+ -1, PB::default_instance().GetDescriptor()));
}
template<typename PB>
@@ -859,7 +1144,6 @@
FieldDescriptor::CPPTYPE_MESSAGE, -1,
PB::default_instance().GetDescriptor()));
}
-
} // namespace protobuf
} // namespace google
diff --git a/darwin-x86_64/protoc/include/google/protobuf/message_lite.h b/darwin-x86_64/protoc/include/google/protobuf/message_lite.h
index 027cabf..4c16f4c 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/message_lite.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/message_lite.h
@@ -41,9 +41,10 @@
#include <google/protobuf/stubs/common.h>
+
namespace google {
namespace protobuf {
-
+ class Arena;
namespace io {
class CodedInputStream;
class CodedOutputStream;
@@ -88,6 +89,27 @@
// caller.
virtual MessageLite* New() const = 0;
+ // Construct a new instance on the arena. Ownership is passed to the caller
+ // if arena is a NULL. Default implementation for backwards compatibility.
+ virtual MessageLite* New(::google::protobuf::Arena* arena) const;
+
+ // Get the arena, if any, associated with this message. Virtual method
+ // required for generic operations but most arena-related operations should
+ // use the GetArenaNoVirtual() generated-code method. Default implementation
+ // to reduce code size by avoiding the need for per-type implementations when
+ // types do not implement arena support.
+ virtual ::google::protobuf::Arena* GetArena() const { return NULL; }
+
+ // Get a pointer that may be equal to this message's arena, or may not be. If
+ // the value returned by this method is equal to some arena pointer, then this
+ // message is on that arena; however, if this message is on some arena, this
+ // method may or may not return that arena's pointer. As a tradeoff, this
+ // method may be more efficient than GetArena(). The intent is to allow
+ // underlying representations that use e.g. tagged pointers to sometimes store
+ // the arena pointer directly, and sometimes in a more indirect way, and allow
+ // a fastpath comparison against the arena pointer when it's easy to obtain.
+ virtual void* GetMaybeArenaPointer() const { return GetArena(); }
+
// Clear all fields of the message and set them to their default values.
// Clear() avoids freeing memory, assuming that any memory allocated
// to hold parts of the message will be needed again to hold the next
@@ -112,9 +134,10 @@
// just simple wrappers around MergeFromCodedStream(). Clear() will be called
// before merging the input.
- // Fill the message with a protocol buffer parsed from the given input
- // stream. Returns false on a read error or if the input is in the
- // wrong format.
+ // Fill the message with a protocol buffer parsed from the given input stream.
+ // Returns false on a read error or if the input is in the wrong format. A
+ // successful return does not indicate the entire input is consumed, ensure
+ // you call ConsumedEntireMessage() to check that if applicable.
bool ParseFromCodedStream(io::CodedInputStream* input);
// Like ParseFromCodedStream(), but accepts messages that are missing
// required fields.
@@ -133,7 +156,11 @@
// missing required fields.
bool ParsePartialFromBoundedZeroCopyStream(io::ZeroCopyInputStream* input,
int size);
- // Parse a protocol buffer contained in a string.
+ // Parses a protocol buffer contained in a string. Returns true on success.
+ // This function takes a string in the (non-human-readable) binary wire
+ // format, matching the encoding output by MessageLite::SerializeToString().
+ // If you'd like to convert a human-readable string into a protocol buffer
+ // object, see google::protobuf::TextFormat::ParseFromString().
bool ParseFromString(const string& data);
// Like ParseFromString(), but accepts messages that are missing
// required fields.
@@ -211,6 +238,9 @@
// Computes the serialized size of the message. This recursively calls
// ByteSize() on all embedded messages. If a subclass does not override
// this, it MUST override SetCachedSize().
+ //
+ // ByteSize() is generally linear in the number of fields defined for the
+ // proto.
virtual int ByteSize() const = 0;
// Serializes the message without recomputing the size. The message must
diff --git a/darwin-x86_64/protoc/include/google/protobuf/metadata.h b/darwin-x86_64/protoc/include/google/protobuf/metadata.h
new file mode 100644
index 0000000..fdee150
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/metadata.h
@@ -0,0 +1,163 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// This header file defines an internal class that encapsulates internal message
+// metadata (Unknown-field set, Arena pointer, ...) and allows its
+// representation to be made more space-efficient via various optimizations.
+//
+// Note that this is distinct from google::protobuf::Metadata, which encapsulates
+// Descriptor and Reflection pointers.
+
+#ifndef GOOGLE_PROTOBUF_METADATA_H__
+#define GOOGLE_PROTOBUF_METADATA_H__
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/arena.h>
+#include <google/protobuf/unknown_field_set.h>
+
+namespace google {
+namespace protobuf {
+namespace internal {
+
+// This is the representation for messages that support arena allocation. It
+// uses a tagged pointer to either store the Arena pointer, if there are no
+// unknown fields, or a pointer to a block of memory with both the Arena pointer
+// and the UnknownFieldSet, if there are unknown fields. This optimization
+// allows for "zero-overhead" storage of the Arena pointer, relative to the
+// above baseline implementation.
+//
+// The tagged pointer uses the LSB to disambiguate cases, and uses bit 0 == 0 to
+// indicate an arena pointer and bit 0 == 1 to indicate a UFS+Arena-container
+// pointer.
+class LIBPROTOBUF_EXPORT InternalMetadataWithArena {
+ public:
+ InternalMetadataWithArena() : ptr_(NULL) {}
+ explicit InternalMetadataWithArena(Arena* arena)
+ : ptr_ (arena) {}
+
+ ~InternalMetadataWithArena() {
+ if (have_unknown_fields() && arena() == NULL) {
+ delete PtrValue<Container>();
+ }
+ ptr_ = NULL;
+ }
+
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE const UnknownFieldSet& unknown_fields() const {
+ if (GOOGLE_PREDICT_FALSE(have_unknown_fields())) {
+ return PtrValue<Container>()->unknown_fields_;
+ } else {
+ return *UnknownFieldSet::default_instance();
+ }
+ }
+
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE UnknownFieldSet* mutable_unknown_fields() {
+ if (GOOGLE_PREDICT_TRUE(have_unknown_fields())) {
+ return &PtrValue<Container>()->unknown_fields_;
+ } else {
+ return mutable_unknown_fields_slow();
+ }
+ }
+
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE Arena* arena() const {
+ if (GOOGLE_PREDICT_FALSE(have_unknown_fields())) {
+ return PtrValue<Container>()->arena_;
+ } else {
+ return PtrValue<Arena>();
+ }
+ }
+
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE bool have_unknown_fields() const {
+ return PtrTag() == kTagContainer;
+ }
+
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE void Swap(InternalMetadataWithArena* other) {
+ // Semantics here are that we swap only the unknown fields, not the arena
+ // pointer. We cannot simply swap ptr_ with other->ptr_ because we need to
+ // maintain our own arena ptr. Also, our ptr_ and other's ptr_ may be in
+ // different states (direct arena pointer vs. container with UFS) so we
+ // cannot simply swap ptr_ and then restore the arena pointers. We reuse
+ // UFS's swap implementation instead.
+ if (have_unknown_fields() || other->have_unknown_fields()) {
+ mutable_unknown_fields()->Swap(other->mutable_unknown_fields());
+ }
+ }
+
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE void* raw_arena_ptr() const {
+ return ptr_;
+ }
+
+ private:
+ void* ptr_;
+
+ // Tagged pointer implementation.
+ enum {
+ // ptr_ is an Arena*.
+ kTagArena = 0,
+ // ptr_ is a Container*.
+ kTagContainer = 1,
+ };
+ static const intptr_t kPtrTagMask = 1;
+ static const intptr_t kPtrValueMask = ~kPtrTagMask;
+
+ // Accessors for pointer tag and pointer value.
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE int PtrTag() const {
+ return reinterpret_cast<intptr_t>(ptr_) & kPtrTagMask;
+ }
+
+ template<typename T> T* PtrValue() const {
+ return reinterpret_cast<T*>(
+ reinterpret_cast<intptr_t>(ptr_) & kPtrValueMask);
+ }
+
+ // If ptr_'s tag is kTagContainer, it points to an instance of this struct.
+ struct Container {
+ UnknownFieldSet unknown_fields_;
+ Arena* arena_;
+ };
+
+ GOOGLE_ATTRIBUTE_NOINLINE UnknownFieldSet* mutable_unknown_fields_slow() {
+ Arena* my_arena = arena();
+ Container* container = Arena::Create<Container>(my_arena);
+ ptr_ = reinterpret_cast<void*>(
+ reinterpret_cast<intptr_t>(container) | kTagContainer);
+ container->arena_ = my_arena;
+ return &(container->unknown_fields_);
+ }
+};
+
+// Temporary compatibility typedef. Remove once this is released in components
+// and upb CL is submitted.
+typedef InternalMetadataWithArena InternalMetadata;
+
+} // namespace internal
+} // namespace protobuf
+
+} // namespace google
+#endif // GOOGLE_PROTOBUF_METADATA_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/reflection.h b/darwin-x86_64/protoc/include/google/protobuf/reflection.h
new file mode 100644
index 0000000..671aafd
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/reflection.h
@@ -0,0 +1,600 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// This header defines the RepeatedFieldRef class template used to access
+// repeated fields with protobuf reflection API.
+#ifndef GOOGLE_PROTOBUF_REFLECTION_H__
+#define GOOGLE_PROTOBUF_REFLECTION_H__
+
+#include <memory>
+#ifndef _SHARED_PTR_H
+#include <google/protobuf/stubs/shared_ptr.h>
+#endif
+
+#include <google/protobuf/message.h>
+#include <google/protobuf/generated_enum_util.h>
+
+namespace google {
+namespace protobuf {
+namespace internal {
+template<typename T, typename Enable = void>
+struct RefTypeTraits;
+} // namespace internal
+
+template<typename T>
+RepeatedFieldRef<T> Reflection::GetRepeatedFieldRef(
+ const Message& message, const FieldDescriptor* field) const {
+ return RepeatedFieldRef<T>(message, field);
+}
+
+template<typename T>
+MutableRepeatedFieldRef<T> Reflection::GetMutableRepeatedFieldRef(
+ Message* message, const FieldDescriptor* field) const {
+ return MutableRepeatedFieldRef<T>(message, field);
+}
+
+// RepeatedFieldRef definition for non-message types.
+template<typename T>
+class RepeatedFieldRef<
+ T, typename internal::enable_if<!internal::is_base_of<Message, T>::value>::type> {
+ typedef typename internal::RefTypeTraits<T>::iterator IteratorType;
+ typedef typename internal::RefTypeTraits<T>::AccessorType AccessorType;
+
+ public:
+ bool empty() const {
+ return accessor_->IsEmpty(data_);
+ }
+ int size() const {
+ return accessor_->Size(data_);
+ }
+ T Get(int index) const {
+ return accessor_->template Get<T>(data_, index);
+ }
+
+ typedef IteratorType iterator;
+ typedef IteratorType const_iterator;
+ iterator begin() const {
+ return iterator(data_, accessor_, true);
+ }
+ iterator end() const {
+ return iterator(data_, accessor_, false);
+ }
+
+ private:
+ friend class Reflection;
+ RepeatedFieldRef(
+ const Message& message,
+ const FieldDescriptor* field) {
+ const Reflection* reflection = message.GetReflection();
+ data_ = reflection->RepeatedFieldData(
+ const_cast<Message*>(&message), field,
+ internal::RefTypeTraits<T>::cpp_type, NULL);
+ accessor_ = reflection->RepeatedFieldAccessor(field);
+ }
+
+ const void* data_;
+ const AccessorType* accessor_;
+};
+
+// MutableRepeatedFieldRef definition for non-message types.
+template<typename T>
+class MutableRepeatedFieldRef<
+ T, typename internal::enable_if<!internal::is_base_of<Message, T>::value>::type> {
+ typedef typename internal::RefTypeTraits<T>::AccessorType AccessorType;
+
+ public:
+ bool empty() const {
+ return accessor_->IsEmpty(data_);
+ }
+ int size() const {
+ return accessor_->Size(data_);
+ }
+ T Get(int index) const {
+ return accessor_->template Get<T>(data_, index);
+ }
+
+ void Set(int index, const T& value) const {
+ accessor_->template Set<T>(data_, index, value);
+ }
+ void Add(const T& value) const {
+ accessor_->template Add<T>(data_, value);
+ }
+ void RemoveLast() const {
+ accessor_->RemoveLast(data_);
+ }
+ void SwapElements(int index1, int index2) const {
+ accessor_->SwapElements(data_, index1, index2);
+ }
+ void Clear() const {
+ accessor_->Clear(data_);
+ }
+
+ void Swap(const MutableRepeatedFieldRef& other) const {
+ accessor_->Swap(data_, other.accessor_, other.data_);
+ }
+
+ template<typename Container>
+ void MergeFrom(const Container& container) const {
+ typedef typename Container::const_iterator Iterator;
+ for (Iterator it = container.begin(); it != container.end(); ++it) {
+ Add(*it);
+ }
+ }
+ template<typename Container>
+ void CopyFrom(const Container& container) const {
+ Clear();
+ MergeFrom(container);
+ }
+
+ private:
+ friend class Reflection;
+ MutableRepeatedFieldRef(
+ Message* message,
+ const FieldDescriptor* field) {
+ const Reflection* reflection = message->GetReflection();
+ data_ = reflection->RepeatedFieldData(
+ message, field, internal::RefTypeTraits<T>::cpp_type, NULL);
+ accessor_ = reflection->RepeatedFieldAccessor(field);
+ }
+
+ void* data_;
+ const AccessorType* accessor_;
+};
+
+// RepeatedFieldRef definition for message types.
+template<typename T>
+class RepeatedFieldRef<
+ T, typename internal::enable_if<internal::is_base_of<Message, T>::value>::type> {
+ typedef typename internal::RefTypeTraits<T>::iterator IteratorType;
+ typedef typename internal::RefTypeTraits<T>::AccessorType AccessorType;
+
+ public:
+ bool empty() const {
+ return accessor_->IsEmpty(data_);
+ }
+ int size() const {
+ return accessor_->Size(data_);
+ }
+ // This method returns a reference to the underlying message object if it
+ // exists. If a message object doesn't exist (e.g., data stored in serialized
+ // form), scratch_space will be filled with the data and a reference to it
+ // will be returned.
+ //
+ // Example:
+ // RepeatedFieldRef<Message> h = ...
+ // unique_ptr<Message> scratch_space(h.NewMessage());
+ // const Message& item = h.Get(index, scratch_space.get());
+ const T& Get(int index, T* scratch_space) const {
+ return *static_cast<const T*>(accessor_->Get(data_, index, scratch_space));
+ }
+ // Create a new message of the same type as the messages stored in this
+ // repeated field. Caller takes ownership of the returned object.
+ T* NewMessage() const {
+ return static_cast<T*>(default_instance_->New());
+ }
+
+ typedef IteratorType iterator;
+ typedef IteratorType const_iterator;
+ iterator begin() const {
+ return iterator(data_, accessor_, true, NewMessage());
+ }
+ iterator end() const {
+ return iterator(data_, accessor_, false, NewMessage());
+ }
+
+ private:
+ friend class Reflection;
+ RepeatedFieldRef(
+ const Message& message,
+ const FieldDescriptor* field) {
+ const Reflection* reflection = message.GetReflection();
+ data_ = reflection->RepeatedFieldData(
+ const_cast<Message*>(&message), field,
+ internal::RefTypeTraits<T>::cpp_type,
+ internal::RefTypeTraits<T>::GetMessageFieldDescriptor());
+ accessor_ = reflection->RepeatedFieldAccessor(field);
+ default_instance_ =
+ reflection->GetMessageFactory()->GetPrototype(field->message_type());
+ }
+
+ const void* data_;
+ const AccessorType* accessor_;
+ const Message* default_instance_;
+};
+
+// MutableRepeatedFieldRef definition for message types.
+template<typename T>
+class MutableRepeatedFieldRef<
+ T, typename internal::enable_if<internal::is_base_of<Message, T>::value>::type> {
+ typedef typename internal::RefTypeTraits<T>::AccessorType AccessorType;
+
+ public:
+ bool empty() const {
+ return accessor_->IsEmpty(data_);
+ }
+ int size() const {
+ return accessor_->Size(data_);
+ }
+ // See comments for RepeatedFieldRef<Message>::Get()
+ const T& Get(int index, T* scratch_space) const {
+ return *static_cast<const T*>(accessor_->Get(data_, index, scratch_space));
+ }
+ // Create a new message of the same type as the messages stored in this
+ // repeated field. Caller takes ownership of the returned object.
+ T* NewMessage() const {
+ return static_cast<T*>(default_instance_->New());
+ }
+
+ void Set(int index, const T& value) const {
+ accessor_->Set(data_, index, &value);
+ }
+ void Add(const T& value) const {
+ accessor_->Add(data_, &value);
+ }
+ void RemoveLast() const {
+ accessor_->RemoveLast(data_);
+ }
+ void SwapElements(int index1, int index2) const {
+ accessor_->SwapElements(data_, index1, index2);
+ }
+ void Clear() const {
+ accessor_->Clear(data_);
+ }
+
+ void Swap(const MutableRepeatedFieldRef& other) const {
+ accessor_->Swap(data_, other.accessor_, other.data_);
+ }
+
+ template<typename Container>
+ void MergeFrom(const Container& container) const {
+ typedef typename Container::const_iterator Iterator;
+ for (Iterator it = container.begin(); it != container.end(); ++it) {
+ Add(*it);
+ }
+ }
+ template<typename Container>
+ void CopyFrom(const Container& container) const {
+ Clear();
+ MergeFrom(container);
+ }
+
+ private:
+ friend class Reflection;
+ MutableRepeatedFieldRef(
+ Message* message,
+ const FieldDescriptor* field) {
+ const Reflection* reflection = message->GetReflection();
+ data_ = reflection->RepeatedFieldData(
+ message, field, internal::RefTypeTraits<T>::cpp_type,
+ internal::RefTypeTraits<T>::GetMessageFieldDescriptor());
+ accessor_ = reflection->RepeatedFieldAccessor(field);
+ default_instance_ =
+ reflection->GetMessageFactory()->GetPrototype(field->message_type());
+ }
+
+ void* data_;
+ const AccessorType* accessor_;
+ const Message* default_instance_;
+};
+
+namespace internal {
+// Interfaces used to implement reflection RepeatedFieldRef API.
+// Reflection::GetRepeatedAccessor() should return a pointer to an singleton
+// object that implements the below interface.
+//
+// This interface passes/returns values using void pointers. The actual type
+// of the value depends on the field's cpp_type. Following is a mapping from
+// cpp_type to the type that should be used in this interface:
+//
+// field->cpp_type() T Actual type of void*
+// CPPTYPE_INT32 int32 int32
+// CPPTYPE_UINT32 uint32 uint32
+// CPPTYPE_INT64 int64 int64
+// CPPTYPE_UINT64 uint64 uint64
+// CPPTYPE_DOUBLE double double
+// CPPTYPE_FLOAT float float
+// CPPTYPE_BOOL bool bool
+// CPPTYPE_ENUM generated enum type int32
+// CPPTYPE_STRING string string
+// CPPTYPE_MESSAGE generated message type google::protobuf::Message
+// or google::protobuf::Message
+//
+// Note that for enums we use int32 in the interface.
+//
+// You can map from T to the actual type using RefTypeTraits:
+// typedef RefTypeTraits<T>::AccessorValueType ActualType;
+class LIBPROTOBUF_EXPORT RepeatedFieldAccessor {
+ public:
+ // Typedefs for clarity.
+ typedef void Field;
+ typedef void Value;
+ typedef void Iterator;
+
+ virtual ~RepeatedFieldAccessor();
+ virtual bool IsEmpty(const Field* data) const = 0;
+ virtual int Size(const Field* data) const = 0;
+ // Depends on the underlying representation of the repeated field, this
+ // method can return a pointer to the underlying object if such an object
+ // exists, or fill the data into scratch_space and return scratch_space.
+ // Callers of this method must ensure scratch_space is a valid pointer
+ // to a mutable object of the correct type.
+ virtual const Value* Get(
+ const Field* data, int index, Value* scratch_space) const = 0;
+
+ virtual void Clear(Field* data) const = 0;
+ virtual void Set(Field* data, int index, const Value* value) const = 0;
+ virtual void Add(Field* data, const Value* value) const = 0;
+ virtual void RemoveLast(Field* data) const = 0;
+ virtual void SwapElements(Field* data, int index1, int index2) const = 0;
+ virtual void Swap(Field* data, const RepeatedFieldAccessor* other_mutator,
+ Field* other_data) const = 0;
+
+ // Create an iterator that points at the begining of the repeated field.
+ virtual Iterator* BeginIterator(const Field* data) const = 0;
+ // Create an iterator that points at the end of the repeated field.
+ virtual Iterator* EndIterator(const Field* data) const = 0;
+ // Make a copy of an iterator and return the new copy.
+ virtual Iterator* CopyIterator(const Field* data,
+ const Iterator* iterator) const = 0;
+ // Move an iterator to point to the next element.
+ virtual Iterator* AdvanceIterator(const Field* data,
+ Iterator* iterator) const = 0;
+ // Compare whether two iterators point to the same element.
+ virtual bool EqualsIterator(const Field* data, const Iterator* a,
+ const Iterator* b) const = 0;
+ // Delete an iterator created by BeginIterator(), EndIterator() and
+ // CopyIterator().
+ virtual void DeleteIterator(const Field* data, Iterator* iterator) const = 0;
+ // Like Get() but for iterators.
+ virtual const Value* GetIteratorValue(const Field* data,
+ const Iterator* iterator,
+ Value* scratch_space) const = 0;
+
+ // Templated methods that make using this interface easier for non-message
+ // types.
+ template<typename T>
+ T Get(const Field* data, int index) const {
+ typedef typename RefTypeTraits<T>::AccessorValueType ActualType;
+ ActualType scratch_space;
+ return static_cast<T>(
+ *reinterpret_cast<const ActualType*>(
+ Get(data, index, static_cast<Value*>(&scratch_space))));
+ }
+
+ template<typename T, typename ValueType>
+ void Set(Field* data, int index, const ValueType& value) const {
+ typedef typename RefTypeTraits<T>::AccessorValueType ActualType;
+ // In this RepeatedFieldAccessor interface we pass/return data using
+ // raw pointers. Type of the data these raw pointers point to should
+ // be ActualType. Here we have a ValueType object and want a ActualType
+ // pointer. We can't cast a ValueType pointer to an ActualType pointer
+ // directly because their type might be different (for enums ValueType
+ // may be a generated enum type while ActualType is int32). To be safe
+ // we make a copy to get a temporary ActualType object and use it.
+ ActualType tmp = static_cast<ActualType>(value);
+ Set(data, index, static_cast<const Value*>(&tmp));
+ }
+
+ template<typename T, typename ValueType>
+ void Add(Field* data, const ValueType& value) const {
+ typedef typename RefTypeTraits<T>::AccessorValueType ActualType;
+ // In this RepeatedFieldAccessor interface we pass/return data using
+ // raw pointers. Type of the data these raw pointers point to should
+ // be ActualType. Here we have a ValueType object and want a ActualType
+ // pointer. We can't cast a ValueType pointer to an ActualType pointer
+ // directly because their type might be different (for enums ValueType
+ // may be a generated enum type while ActualType is int32). To be safe
+ // we make a copy to get a temporary ActualType object and use it.
+ ActualType tmp = static_cast<ActualType>(value);
+ Add(data, static_cast<const Value*>(&tmp));
+ }
+};
+
+// Implement (Mutable)RepeatedFieldRef::iterator
+template<typename T>
+class RepeatedFieldRefIterator
+ : public std::iterator<std::forward_iterator_tag, T> {
+ typedef typename RefTypeTraits<T>::AccessorValueType AccessorValueType;
+ typedef typename RefTypeTraits<T>::IteratorValueType IteratorValueType;
+ typedef typename RefTypeTraits<T>::IteratorPointerType IteratorPointerType;
+
+ public:
+ // Constructor for non-message fields.
+ RepeatedFieldRefIterator(const void* data,
+ const RepeatedFieldAccessor* accessor,
+ bool begin)
+ : data_(data), accessor_(accessor),
+ iterator_(begin ? accessor->BeginIterator(data) :
+ accessor->EndIterator(data)),
+ scratch_space_(new AccessorValueType) {
+ }
+ // Constructor for message fields.
+ RepeatedFieldRefIterator(const void* data,
+ const RepeatedFieldAccessor* accessor,
+ bool begin,
+ AccessorValueType* scratch_space)
+ : data_(data), accessor_(accessor),
+ iterator_(begin ? accessor->BeginIterator(data) :
+ accessor->EndIterator(data)),
+ scratch_space_(scratch_space) {
+ }
+ ~RepeatedFieldRefIterator() {
+ accessor_->DeleteIterator(data_, iterator_);
+ }
+ RepeatedFieldRefIterator operator++(int) {
+ RepeatedFieldRefIterator tmp(*this);
+ iterator_ = accessor_->AdvanceIterator(data_, iterator_);
+ return tmp;
+ }
+ RepeatedFieldRefIterator& operator++() {
+ iterator_ = accessor_->AdvanceIterator(data_, iterator_);
+ return *this;
+ }
+ IteratorValueType operator*() const {
+ return static_cast<IteratorValueType>(
+ *static_cast<const AccessorValueType*>(
+ accessor_->GetIteratorValue(
+ data_, iterator_, scratch_space_.get())));
+ }
+ IteratorPointerType operator->() const {
+ return static_cast<IteratorPointerType>(
+ accessor_->GetIteratorValue(
+ data_, iterator_, scratch_space_.get()));
+ }
+ bool operator!=(const RepeatedFieldRefIterator& other) const {
+ assert(data_ == other.data_);
+ assert(accessor_ == other.accessor_);
+ return !accessor_->EqualsIterator(data_, iterator_, other.iterator_);
+ }
+ bool operator==(const RepeatedFieldRefIterator& other) const {
+ return !this->operator!=(other);
+ }
+
+ RepeatedFieldRefIterator(const RepeatedFieldRefIterator& other)
+ : data_(other.data_), accessor_(other.accessor_),
+ iterator_(accessor_->CopyIterator(data_, other.iterator_)) {
+ }
+ RepeatedFieldRefIterator& operator=(const RepeatedFieldRefIterator& other) {
+ if (this != &other) {
+ accessor_->DeleteIterator(data_, iterator_);
+ data_ = other.data_;
+ accessor_ = other.accessor_;
+ iterator_ = accessor_->CopyIterator(data_, other.iterator_);
+ }
+ return *this;
+ }
+
+ protected:
+ const void* data_;
+ const RepeatedFieldAccessor* accessor_;
+ void* iterator_;
+ google::protobuf::scoped_ptr<AccessorValueType> scratch_space_;
+};
+
+// TypeTraits that maps the type parameter T of RepeatedFieldRef or
+// MutableRepeatedFieldRef to corresponding iterator type,
+// RepeatedFieldAccessor type, etc.
+template<typename T>
+struct PrimitiveTraits {
+ static const bool is_primitive = false;
+};
+#define DEFINE_PRIMITIVE(TYPE, type) \
+ template<> struct PrimitiveTraits<type> { \
+ static const bool is_primitive = true; \
+ static const FieldDescriptor::CppType cpp_type = \
+ FieldDescriptor::CPPTYPE_ ## TYPE; \
+ };
+DEFINE_PRIMITIVE(INT32, int32)
+DEFINE_PRIMITIVE(UINT32, uint32)
+DEFINE_PRIMITIVE(INT64, int64)
+DEFINE_PRIMITIVE(UINT64, uint64)
+DEFINE_PRIMITIVE(FLOAT, float)
+DEFINE_PRIMITIVE(DOUBLE, double)
+DEFINE_PRIMITIVE(BOOL, bool)
+#undef DEFINE_PRIMITIVE
+
+template<typename T>
+struct RefTypeTraits<
+ T, typename internal::enable_if<PrimitiveTraits<T>::is_primitive>::type> {
+ typedef RepeatedFieldRefIterator<T> iterator;
+ typedef RepeatedFieldAccessor AccessorType;
+ typedef T AccessorValueType;
+ typedef T IteratorValueType;
+ typedef T* IteratorPointerType;
+ static const FieldDescriptor::CppType cpp_type =
+ PrimitiveTraits<T>::cpp_type;
+ static const Descriptor* GetMessageFieldDescriptor() {
+ return NULL;
+ }
+};
+
+template<typename T>
+struct RefTypeTraits<
+ T, typename internal::enable_if<is_proto_enum<T>::value>::type> {
+ typedef RepeatedFieldRefIterator<T> iterator;
+ typedef RepeatedFieldAccessor AccessorType;
+ // We use int32 for repeated enums in RepeatedFieldAccessor.
+ typedef int32 AccessorValueType;
+ typedef T IteratorValueType;
+ typedef int32* IteratorPointerType;
+ static const FieldDescriptor::CppType cpp_type =
+ FieldDescriptor::CPPTYPE_ENUM;
+ static const Descriptor* GetMessageFieldDescriptor() {
+ return NULL;
+ }
+};
+
+template<typename T>
+struct RefTypeTraits<
+ T, typename internal::enable_if< ::google::protobuf::internal::is_same<string, T>::value>::type> {
+ typedef RepeatedFieldRefIterator<T> iterator;
+ typedef RepeatedFieldAccessor AccessorType;
+ typedef string AccessorValueType;
+ typedef string IteratorValueType;
+ typedef string* IteratorPointerType;
+ static const FieldDescriptor::CppType cpp_type =
+ FieldDescriptor::CPPTYPE_STRING;
+ static const Descriptor* GetMessageFieldDescriptor() {
+ return NULL;
+ }
+};
+
+template<typename T>
+struct MessageDescriptorGetter {
+ static const Descriptor* get() {
+ return T::default_instance().GetDescriptor();
+ }
+};
+template<>
+struct MessageDescriptorGetter<Message> {
+ static const Descriptor* get() {
+ return NULL;
+ }
+};
+
+template<typename T>
+struct RefTypeTraits<
+ T, typename internal::enable_if<internal::is_base_of<Message, T>::value>::type> {
+ typedef RepeatedFieldRefIterator<T> iterator;
+ typedef RepeatedFieldAccessor AccessorType;
+ typedef Message AccessorValueType;
+ typedef const T& IteratorValueType;
+ typedef const T* IteratorPointerType;
+ static const FieldDescriptor::CppType cpp_type =
+ FieldDescriptor::CPPTYPE_MESSAGE;
+ static const Descriptor* GetMessageFieldDescriptor() {
+ return MessageDescriptorGetter<T>::get();
+ }
+};
+} // namespace internal
+} // namespace protobuf
+} // namespace google
+
+#endif // GOOGLE_PROTOBUF_REFLECTION_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/repeated_field.h b/darwin-x86_64/protoc/include/google/protobuf/repeated_field.h
index 5005183..1961bc4 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/repeated_field.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/repeated_field.h
@@ -53,8 +53,11 @@
#include <string>
#include <iterator>
+#include <google/protobuf/stubs/casts.h>
+#include <google/protobuf/stubs/logging.h>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/type_traits.h>
+#include <google/protobuf/arena.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/message_lite.h>
@@ -83,7 +86,8 @@
}
template <typename Iter>
-inline int CalculateReserve(Iter begin, Iter end, std::input_iterator_tag) {
+inline int CalculateReserve(Iter /*begin*/, Iter /*end*/,
+ std::input_iterator_tag /*unused*/) {
return -1;
}
@@ -103,6 +107,7 @@
class RepeatedField {
public:
RepeatedField();
+ explicit RepeatedField(Arena* arena);
RepeatedField(const RepeatedField& other);
template <typename Iter>
RepeatedField(Iter begin, const Iter& end);
@@ -152,9 +157,16 @@
Element* mutable_data();
const Element* data() const;
- // Swap entire contents with "other".
+ // Swap entire contents with "other". If they are separate arenas then, copies
+ // data between each other.
void Swap(RepeatedField* other);
+ // Swap entire contents with "other". Should be called only if the caller can
+ // guarantee that both repeated fields are on the same arena or are on the
+ // heap. Swapping between different arenas is disallowed and caught by a
+ // GOOGLE_DCHECK (see API docs for details).
+ void UnsafeArenaSwap(RepeatedField* other);
+
// Swap two elements.
void SwapElements(int index1, int index2);
@@ -171,8 +183,10 @@
iterator begin();
const_iterator begin() const;
+ const_iterator cbegin() const;
iterator end();
const_iterator end() const;
+ const_iterator cend() const;
// Reverse iterator support
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
@@ -194,22 +208,92 @@
// sizeof(*this)
int SpaceUsedExcludingSelf() const;
+ // Removes the element referenced by position.
+ //
+ // Returns an iterator to the element immediately following the removed
+ // element.
+ //
+ // Invalidates all iterators at or after the removed element, including end().
+ iterator erase(const_iterator position);
+
+ // Removes the elements in the range [first, last).
+ //
+ // Returns an iterator to the element immediately following the removed range.
+ //
+ // Invalidates all iterators at or after the removed range, including end().
+ iterator erase(const_iterator first, const_iterator last);
+
+ // Get the Arena on which this RepeatedField stores its elements.
+ ::google::protobuf::Arena* GetArena() const {
+ return GetArenaNoVirtual();
+ }
+
private:
static const int kInitialSize = 0;
+ // A note on the representation here (see also comment below for
+ // RepeatedPtrFieldBase's struct Rep):
+ //
+ // We maintain the same sizeof(RepeatedField) as before we added arena support
+ // so that we do not degrade performance by bloating memory usage. Directly
+ // adding an arena_ element to RepeatedField is quite costly. By using
+ // indirection in this way, we keep the same size when the RepeatedField is
+ // empty (common case), and add only an 8-byte header to the elements array
+ // when non-empty. We make sure to place the size fields directly in the
+ // RepeatedField class to avoid costly cache misses due to the indirection.
+ int current_size_;
+ int total_size_;
+ struct Rep {
+ Arena* arena;
+ Element elements[1];
+ };
+ // We can not use sizeof(Rep) - sizeof(Element) due to the trailing padding on
+ // the struct. We can not use sizeof(Arena*) as well because there might be
+ // a "gap" after the field arena and before the field elements (e.g., when
+ // Element is double and pointer is 32bit).
+ static const size_t kRepHeaderSize;
+ // Contains arena ptr and the elements array. We also keep the invariant that
+ // if rep_ is NULL, then arena is NULL.
+ Rep* rep_;
- Element* elements_;
- int current_size_;
- int total_size_;
+ friend class Arena;
+ typedef void InternalArenaConstructable_;
// Move the contents of |from| into |to|, possibly clobbering |from| in the
// process. For primitive types this is just a memcpy(), but it could be
// specialized for non-primitive types to, say, swap each element instead.
- void MoveArray(Element to[], Element from[], int size);
+ void MoveArray(Element* to, Element* from, int size);
// Copy the elements of |from| into |to|.
- void CopyArray(Element to[], const Element from[], int size);
+ void CopyArray(Element* to, const Element* from, int size);
+
+ inline void InternalSwap(RepeatedField* other);
+
+ // Internal helper expected by Arena methods.
+ inline Arena* GetArenaNoVirtual() const {
+ return (rep_ == NULL) ? NULL : rep_->arena;
+ }
+
+ // Internal helper to delete all elements and deallocate the storage.
+ // If Element has a trivial destructor (for example, if it's a fundamental
+ // type, like int32), the loop will be removed by the optimizer.
+ void InternalDeallocate(Rep* rep, int size) {
+ if (rep != NULL) {
+ Element* e = &rep->elements[0];
+ Element* limit = &rep->elements[size];
+ for (; e < limit; e++) {
+ e->Element::~Element();
+ }
+ if (rep->arena == NULL) {
+ delete[] reinterpret_cast<char*>(rep);
+ }
+ }
+ }
};
+template<typename Element>
+const size_t RepeatedField<Element>::kRepHeaderSize =
+ reinterpret_cast<size_t>(&reinterpret_cast<Rep*>(16)->elements[0]) - 16;
+
namespace internal {
template <typename It> class RepeatedPtrIterator;
template <typename It, typename VoidPtr> class RepeatedPtrOverPtrsIterator;
@@ -224,13 +308,48 @@
template <typename Element,
bool HasTrivialCopy = has_trivial_copy<Element>::value>
struct ElementCopier {
- void operator()(Element to[], const Element from[], int array_size);
+ void operator()(Element* to, const Element* from, int array_size);
};
} // namespace internal
namespace internal {
+// type-traits helper for RepeatedPtrFieldBase: we only want to invoke
+// 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*.
+template<typename T>
+struct TypeImplementsMergeBehavior {
+ typedef char HasMerge;
+ typedef long HasNoMerge;
+
+ // We accept either of:
+ // - void MergeFrom(const T& other)
+ // - bool MergeFrom(const T& other)
+ //
+ // We mangle these names a bit to avoid compatibility issues in 'unclean'
+ // include environments that may have, e.g., "#define test ..." (yes, this
+ // exists).
+ template<typename U, typename RetType, RetType (U::*)(const U& arg)>
+ struct CheckType;
+ template<typename U> static HasMerge Check(
+ CheckType<U, void, &U::MergeFrom>*);
+ template<typename U> static HasMerge Check(
+ CheckType<U, bool, &U::MergeFrom>*);
+ template<typename U> static HasNoMerge Check(...);
+
+ // Resovles to either google::protobuf::internal::true_type or google::protobuf::internal::false_type.
+ typedef google::protobuf::internal::integral_constant<bool,
+ (sizeof(Check<T>(0)) == sizeof(HasMerge))> type;
+};
+
+template<>
+struct TypeImplementsMergeBehavior< ::std::string > {
+ typedef google::protobuf::internal::true_type type;
+};
+
// This is the common base class for RepeatedPtrFields. It deals only in void*
// pointers. Users should not use this interface directly.
//
@@ -261,11 +380,18 @@
// use of AddFromCleared(), which is not part of the public interface.
friend class ExtensionSet;
+ // The MapFieldBase implementation needs to call protected methods directly,
+ // reinterpreting pointers as being to Message instead of a specific Message
+ // subclass.
+ friend class MapFieldBase;
+
// To parse directly into a proto2 generated class, the upb class GMR_Handlers
// needs to be able to modify a RepeatedPtrFieldBase directly.
- friend class LIBPROTOBUF_EXPORT upb::google_opensource::GMR_Handlers;
+ friend class upb::google_opensource::GMR_Handlers;
RepeatedPtrFieldBase();
+ explicit RepeatedPtrFieldBase(::google::protobuf::Arena* arena);
+ ~RepeatedPtrFieldBase() {}
// Must be called from destructor.
template <typename TypeHandler>
@@ -279,7 +405,10 @@
template <typename TypeHandler>
typename TypeHandler::Type* Mutable(int index);
template <typename TypeHandler>
- typename TypeHandler::Type* Add();
+ void Delete(int index);
+ template <typename TypeHandler>
+ typename TypeHandler::Type* Add(typename TypeHandler::Type* prototype = NULL);
+
template <typename TypeHandler>
void RemoveLast();
template <typename TypeHandler>
@@ -289,13 +418,7 @@
template <typename TypeHandler>
void CopyFrom(const RepeatedPtrFieldBase& other);
- void CloseGap(int start, int num) {
- // Close up a gap of "num" elements starting at offset "start".
- for (int i = start + num; i < allocated_size_; ++i)
- elements_[i - num] = elements_[i];
- current_size_ -= num;
- allocated_size_ -= num;
- }
+ void CloseGap(int start, int num);
void Reserve(int new_size);
@@ -310,7 +433,8 @@
template <typename TypeHandler>
const typename TypeHandler::Type* const* data() const;
- void Swap(RepeatedPtrFieldBase* other);
+ template <typename TypeHandler>
+ GOOGLE_ATTRIBUTE_ALWAYS_INLINE void Swap(RepeatedPtrFieldBase* other);
void SwapElements(int index1, int index2);
@@ -324,10 +448,25 @@
template <typename TypeHandler>
typename TypeHandler::Type* AddFromCleared();
+ template<typename TypeHandler>
+ void AddAllocated(typename TypeHandler::Type* value) {
+ typename TypeImplementsMergeBehavior<typename TypeHandler::Type>::type t;
+ AddAllocatedInternal<TypeHandler>(value, t);
+ }
+
template <typename TypeHandler>
- void AddAllocated(typename TypeHandler::Type* value);
+ void UnsafeArenaAddAllocated(typename TypeHandler::Type* value);
+
template <typename TypeHandler>
- typename TypeHandler::Type* ReleaseLast();
+ typename TypeHandler::Type* ReleaseLast() {
+ typename TypeImplementsMergeBehavior<typename TypeHandler::Type>::type t;
+ return ReleaseLastInternal<TypeHandler>(t);
+ }
+
+ // Releases last element and returns it, but does not do out-of-arena copy.
+ // And just returns the raw pointer to the contained element in the arena.
+ template <typename TypeHandler>
+ typename TypeHandler::Type* UnsafeArenaReleaseLast();
int ClearedCount() const;
template <typename TypeHandler>
@@ -335,13 +474,59 @@
template <typename TypeHandler>
typename TypeHandler::Type* ReleaseCleared();
+ protected:
+ inline void InternalSwap(RepeatedPtrFieldBase* other);
+
+ template <typename TypeHandler>
+ void AddAllocatedInternal(typename TypeHandler::Type* value,
+ google::protobuf::internal::true_type);
+ template <typename TypeHandler>
+ void AddAllocatedInternal(typename TypeHandler::Type* value,
+ google::protobuf::internal::false_type);
+
+ template <typename TypeHandler> GOOGLE_ATTRIBUTE_NOINLINE
+ void AddAllocatedSlowWithCopy(typename TypeHandler::Type* value,
+ Arena* value_arena,
+ Arena* my_arena);
+ template <typename TypeHandler> GOOGLE_ATTRIBUTE_NOINLINE
+ void AddAllocatedSlowWithoutCopy(typename TypeHandler::Type* value);
+
+ template <typename TypeHandler>
+ typename TypeHandler::Type* ReleaseLastInternal(google::protobuf::internal::true_type);
+ template <typename TypeHandler>
+ typename TypeHandler::Type* ReleaseLastInternal(google::protobuf::internal::false_type);
+
+ template<typename TypeHandler> GOOGLE_ATTRIBUTE_NOINLINE
+ void SwapFallback(RepeatedPtrFieldBase* other);
+
+ inline Arena* GetArenaNoVirtual() const {
+ return arena_;
+ }
+
private:
static const int kInitialSize = 0;
-
- void** elements_;
+ // A few notes on internal representation:
+ //
+ // We use an indirected approach, with struct Rep, to keep
+ // sizeof(RepeatedPtrFieldBase) equivalent to what it was before arena support
+ // was added, namely, 3 8-byte machine words on x86-64. An instance of Rep is
+ // allocated only when the repeated field is non-empty, and it is a
+ // dynamically-sized struct (the header is directly followed by elements[]).
+ // We place arena_ and current_size_ directly in the object to avoid cache
+ // misses due to the indirection, because these fields are checked frequently.
+ // Placing all fields directly in the RepeatedPtrFieldBase instance costs
+ // significant performance for memory-sensitive workloads.
+ Arena* arena_;
int current_size_;
- int allocated_size_;
int total_size_;
+ struct Rep {
+ int allocated_size;
+ void* elements[1];
+ };
+ static const size_t kRepHeaderSize = sizeof(Rep) - sizeof(void*);
+ // Contains arena ptr and the elements array. We also keep the invariant that
+ // if rep_ is NULL, then arena is NULL.
+ Rep* rep_;
template <typename TypeHandler>
static inline typename TypeHandler::Type* cast(void* element) {
@@ -352,6 +537,22 @@
return reinterpret_cast<const typename TypeHandler::Type*>(element);
}
+ // Non-templated inner function to avoid code duplication. Takes a function
+ // pointer to the type-specific (templated) inner allocate/merge loop.
+ void MergeFromInternal(
+ const RepeatedPtrFieldBase& other,
+ void (RepeatedPtrFieldBase::*inner_loop)(void**, void**, int, int));
+
+ template<typename TypeHandler>
+ void MergeFromInnerLoop(
+ void** our_elems, void** other_elems, int length, int already_allocated);
+
+ // Internal helper: extend array space if necessary to contain |extend_amount|
+ // more elements, and return a pointer to the element immediately following
+ // the old list of elements. This interface factors out common behavior from
+ // Reserve() and MergeFrom() to reduce code size. |extend_amount| must be > 0.
+ void** InternalExtend(int extend_amount);
+
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedPtrFieldBase);
};
@@ -359,21 +560,100 @@
class GenericTypeHandler {
public:
typedef GenericType Type;
- static GenericType* New() { return new GenericType; }
- static void Delete(GenericType* value) { delete value; }
- static void Clear(GenericType* value) { value->Clear(); }
- static void Merge(const GenericType& from, GenericType* to) {
- to->MergeFrom(from);
+ static inline GenericType* New(Arena* arena) {
+ return ::google::protobuf::Arena::CreateMaybeMessage<Type>(
+ arena, static_cast<GenericType*>(0));
}
- static int SpaceUsed(const GenericType& value) { return value.SpaceUsed(); }
- static const Type& default_instance() { return Type::default_instance(); }
+ // We force NewFromPrototype() and Delete() to be non-inline to reduce code
+ // size: else, several other methods get inlined copies of message types'
+ // constructors and destructors.
+ GOOGLE_ATTRIBUTE_NOINLINE static GenericType* NewFromPrototype(
+ const GenericType* prototype, ::google::protobuf::Arena* arena = NULL);
+ GOOGLE_ATTRIBUTE_NOINLINE static void Delete(GenericType* value, Arena* arena);
+ static inline ::google::protobuf::Arena* GetArena(GenericType* value) {
+ return ::google::protobuf::Arena::GetArena<Type>(value);
+ }
+ static inline void* GetMaybeArenaPointer(GenericType* value) {
+ return ::google::protobuf::Arena::GetArena<Type>(value);
+ }
+
+ static inline void Clear(GenericType* value) { value->Clear(); }
+ GOOGLE_ATTRIBUTE_NOINLINE static void Merge(const GenericType& from,
+ GenericType* to);
+ static inline int SpaceUsed(const GenericType& value) {
+ return value.SpaceUsed();
+ }
+ static inline const Type& default_instance() {
+ return Type::default_instance();
+ }
};
-template <>
-inline void GenericTypeHandler<MessageLite>::Merge(
- const MessageLite& from, MessageLite* to) {
- to->CheckTypeAndMergeFrom(from);
+template <typename GenericType>
+GenericType* GenericTypeHandler<GenericType>::NewFromPrototype(
+ const GenericType* /* prototype */, ::google::protobuf::Arena* arena) {
+ return New(arena);
}
+template <typename GenericType>
+void GenericTypeHandler<GenericType>::Delete(GenericType* value, Arena* arena) {
+ if (arena == NULL) {
+ delete value;
+ }
+}
+template <typename GenericType>
+void GenericTypeHandler<GenericType>::Merge(const GenericType& from,
+ GenericType* to) {
+ to->MergeFrom(from);
+}
+
+// NewFromPrototype() and Merge() cannot be defined here; if they're declared
+// inline the compiler will complain about not matching GOOGLE_ATTRIBUTE_NOINLINE
+// above, and if not, compilation will result in multiple definitions. These
+// are therefore declared as specializations here and defined in
+// message_lite.cc.
+template<>
+MessageLite* GenericTypeHandler<MessageLite>::NewFromPrototype(
+ const MessageLite* prototype, google::protobuf::Arena* arena);
+template<>
+inline google::protobuf::Arena* GenericTypeHandler<MessageLite>::GetArena(
+ MessageLite* value) {
+ return value->GetArena();
+}
+template<>
+inline void* GenericTypeHandler<MessageLite>::GetMaybeArenaPointer(
+ MessageLite* value) {
+ return value->GetMaybeArenaPointer();
+}
+template <>
+void GenericTypeHandler<MessageLite>::Merge(const MessageLite& from,
+ MessageLite* to);
+template<>
+inline void GenericTypeHandler<string>::Clear(string* value) {
+ value->clear();
+}
+template<>
+void GenericTypeHandler<string>::Merge(const string& from,
+ 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.
+#define DECLARE_SPECIALIZATIONS_FOR_BASE_PROTO_TYPES(TypeName) \
+ template<> \
+ TypeName* GenericTypeHandler<TypeName>::NewFromPrototype( \
+ const TypeName* prototype, google::protobuf::Arena* arena); \
+ template<> \
+ google::protobuf::Arena* GenericTypeHandler<TypeName>::GetArena( \
+ TypeName* value); \
+ template<> \
+ void* GenericTypeHandler<TypeName>::GetMaybeArenaPointer( \
+ TypeName* value);
+
+// Message specialization bodies defined in message.cc. This split is necessary
+// to allow proto2-lite (which includes this header) to be independent of
+// Message.
+DECLARE_SPECIALIZATIONS_FOR_BASE_PROTO_TYPES(Message)
+
+
+#undef DECLARE_SPECIALIZATIONS_FOR_BASE_PROTO_TYPES
template <>
inline const MessageLite& GenericTypeHandler<MessageLite>::default_instance() {
@@ -401,15 +681,33 @@
// StringTypeHandler is exported. So, we factor out StringTypeHandlerBase,
// export that, then make StringTypeHandler be a subclass which is NOT
// exported.
-// TODO(kenton): There has to be a better way.
+// TODO(kenton): Now that StringSpaceUsedExcludingSelf() is in the lite
+// library, this can be cleaned up.
class LIBPROTOBUF_EXPORT StringTypeHandlerBase {
public:
typedef string Type;
- static string* New();
- static void Delete(string* value);
- static void Clear(string* value) { value->clear(); }
- static void Merge(const string& from, string* to) { *to = from; }
- static const Type& default_instance() {
+
+ static inline string* New(Arena* arena) {
+ return Arena::Create<string>(arena);
+ }
+ static inline string* NewFromPrototype(const string*,
+ ::google::protobuf::Arena* arena) {
+ return New(arena);
+ }
+ static inline ::google::protobuf::Arena* GetArena(string*) {
+ return NULL;
+ }
+ static inline void* GetMaybeArenaPointer(string* /* value */) {
+ return NULL;
+ }
+ static inline void Delete(string* value, Arena* arena) {
+ if (arena == NULL) {
+ delete value;
+ }
+ }
+ static inline void Clear(string* value) { value->clear(); }
+ static inline void Merge(const string& from, string* to) { *to = from; }
+ static inline const Type& default_instance() {
return ::google::protobuf::internal::GetEmptyString();
}
};
@@ -417,7 +715,7 @@
class StringTypeHandler : public StringTypeHandlerBase {
public:
static int SpaceUsed(const string& value) {
- return sizeof(value) + StringSpaceUsedExcludingSelf(value);
+ return static_cast<int>(sizeof(value)) + StringSpaceUsedExcludingSelf(value);
}
};
@@ -430,6 +728,8 @@
class RepeatedPtrField : public internal::RepeatedPtrFieldBase {
public:
RepeatedPtrField();
+ explicit RepeatedPtrField(::google::protobuf::Arena* arena);
+
RepeatedPtrField(const RepeatedPtrField& other);
template <typename Iter>
RepeatedPtrField(Iter begin, const Iter& end);
@@ -469,9 +769,16 @@
Element** mutable_data();
const Element* const* data() const;
- // Swap entire contents with "other".
+ // Swap entire contents with "other". If they are on separate arenas, then
+ // copies data.
void Swap(RepeatedPtrField* other);
+ // Swap entire contents with "other". Caller should guarantee that either both
+ // fields are on the same arena or both are on the heap. Swapping between
+ // different arenas with this function is disallowed and is caught via
+ // GOOGLE_DCHECK.
+ void UnsafeArenaSwap(RepeatedPtrField* other);
+
// Swap two elements.
void SwapElements(int index1, int index2);
@@ -488,8 +795,10 @@
iterator begin();
const_iterator begin() const;
+ const_iterator cbegin() const;
iterator end();
const_iterator end() const;
+ const_iterator cend() const;
// Reverse iterator support
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
@@ -528,11 +837,45 @@
// Add an already-allocated object, passing ownership to the
// RepeatedPtrField.
+ //
+ // Note that some special behavior occurs with respect to arenas:
+ //
+ // (i) if this field holds submessages, the new submessage will be copied if
+ // the original is in an arena and this RepeatedPtrField is either in a
+ // different arena, or on the heap.
+ // (ii) if this field holds strings, the passed-in string *must* be
+ // heap-allocated, not arena-allocated. There is no way to dynamically check
+ // this at runtime, so User Beware.
void AddAllocated(Element* value);
+
// Remove the last element and return it, passing ownership to the caller.
// Requires: size() > 0
+ //
+ // If this RepeatedPtrField is on an arena, an object copy is required to pass
+ // ownership back to the user (for compatible semantics). Use
+ // UnsafeArenaReleaseLast() if this behavior is undesired.
Element* ReleaseLast();
+ // Add an already-allocated object, skipping arena-ownership checks. The user
+ // must guarantee that the given object is in the same arena as this
+ // RepeatedPtrField.
+ // It is also useful in legacy code that uses temporary ownership to avoid
+ // copies. Example:
+ // RepeatedPtrField<T> temp_field;
+ // temp_field.AddAllocated(new T);
+ // ... // Do something with temp_field
+ // temp_field.ExtractSubrange(0, temp_field.size(), NULL);
+ // If you put temp_field on the arena this fails, because the ownership
+ // transfers to the arena at the "AddAllocated" call and is not released
+ // anymore causing a double delete. UnsafeArenaAddAllocated prevents this.
+ void UnsafeArenaAddAllocated(Element* value);
+
+ // Remove the last element and return it. Works only when operating on an
+ // arena. The returned pointer is to the original object in the arena, hence
+ // has the arena's lifetime.
+ // Requires: current_size_ > 0
+ Element* UnsafeArenaReleaseLast();
+
// Extract elements with indices in the range "[start .. start+num-1]".
// The caller assumes ownership of the extracted elements and is responsible
// for deleting them when they are no longer needed.
@@ -542,8 +885,20 @@
// to perform any further operations (like deletion) on these elements.
// Caution: implementation also moves elements with indices [start+num ..].
// Calling this routine inside a loop can cause quadratic behavior.
+ //
+ // Memory copying behavior is identical to ReleaseLast(), described above: if
+ // this RepeatedPtrField is on an arena, an object copy is performed for each
+ // returned element, so that all returned element pointers are to
+ // heap-allocated copies. If this copy is not desired, the user should call
+ // UnsafeArenaExtractSubrange().
void ExtractSubrange(int start, int num, Element** elements);
+ // Identical to ExtractSubrange() described above, except that when this
+ // repeated field is on an arena, no object copies are performed. Instead, the
+ // raw object pointers are returned. Thus, if on an arena, the returned
+ // objects must not be freed, because they will not be heap-allocated objects.
+ void UnsafeArenaExtractSubrange(int start, int num, Element** elements);
+
// When elements are removed by calls to RemoveLast() or Clear(), they
// are not actually freed. Instead, they are cleared and kept so that
// they can be reused later. This can save lots of CPU time when
@@ -558,12 +913,39 @@
// Add an element to the pool of cleared objects, passing ownership to
// the RepeatedPtrField. The element must be cleared prior to calling
// this method.
+ //
+ // This method cannot be called when the repeated field is on an arena or when
+ // |value| is; both cases will trigger a GOOGLE_DCHECK-failure.
void AddCleared(Element* value);
// Remove a single element from the cleared pool and return it, passing
// ownership to the caller. The element is guaranteed to be cleared.
// Requires: ClearedCount() > 0
+ //
+ //
+ // This method cannot be called when the repeated field is on an arena; doing
+ // so will trigger a GOOGLE_DCHECK-failure.
Element* ReleaseCleared();
+ // Removes the element referenced by position.
+ //
+ // Returns an iterator to the element immediately following the removed
+ // element.
+ //
+ // Invalidates all iterators at or after the removed element, including end().
+ iterator erase(const_iterator position);
+
+ // Removes the elements in the range [first, last).
+ //
+ // Returns an iterator to the element immediately following the removed range.
+ //
+ // Invalidates all iterators at or after the removed range, including end().
+ iterator erase(const_iterator first, const_iterator last);
+
+ // Gets the arena on which this RepeatedPtrField stores its elements.
+ ::google::protobuf::Arena* GetArena() const {
+ return GetArenaNoVirtual();
+ }
+
protected:
// Note: RepeatedPtrField SHOULD NOT be subclassed by users. We only
// subclass it in one place as a hack for compatibility with proto1. The
@@ -571,31 +953,61 @@
// methods on RepeatedPtrFieldBase.
class TypeHandler;
+ // Internal arena accessor expected by helpers in Arena.
+ inline Arena* GetArenaNoVirtual() const;
+
+ private:
+ // Implementations for ExtractSubrange(). The copying behavior must be
+ // included only if the type supports the necessary operations (e.g.,
+ // MergeFrom()), so we must resolve this at compile time. ExtractSubrange()
+ // uses SFINAE to choose one of the below implementations.
+ void ExtractSubrangeInternal(int start, int num, Element** elements,
+ google::protobuf::internal::true_type);
+ void ExtractSubrangeInternal(int start, int num, Element** elements,
+ google::protobuf::internal::false_type);
+
+ friend class Arena;
+ typedef void InternalArenaConstructable_;
+
};
// implementation ====================================================
template <typename Element>
inline RepeatedField<Element>::RepeatedField()
- : elements_(NULL),
- current_size_(0),
- total_size_(kInitialSize) {
+ : current_size_(0),
+ total_size_(0),
+ rep_(NULL) {
+}
+
+template <typename Element>
+inline RepeatedField<Element>::RepeatedField(Arena* arena)
+ : current_size_(0),
+ total_size_(0),
+ rep_(NULL) {
+ // In case arena is NULL, then we do not create rep_, as code has an invariant
+ // `rep_ == NULL then arena == NULL`.
+ if (arena != NULL) {
+ rep_ = reinterpret_cast<Rep*>(
+ ::google::protobuf::Arena::CreateArray<char>(arena, kRepHeaderSize));
+ rep_->arena = arena;
+ }
}
template <typename Element>
inline RepeatedField<Element>::RepeatedField(const RepeatedField& other)
- : elements_(NULL),
- current_size_(0),
- total_size_(kInitialSize) {
+ : current_size_(0),
+ total_size_(0),
+ rep_(NULL) {
CopyFrom(other);
}
template <typename Element>
template <typename Iter>
-inline RepeatedField<Element>::RepeatedField(Iter begin, const Iter& end)
- : elements_(NULL),
- current_size_(0),
- total_size_(kInitialSize) {
+RepeatedField<Element>::RepeatedField(Iter begin, const Iter& end)
+ : current_size_(0),
+ total_size_(0),
+ rep_(NULL) {
int reserve = internal::CalculateReserve(begin, end);
if (reserve != -1) {
Reserve(reserve);
@@ -611,7 +1023,9 @@
template <typename Element>
RepeatedField<Element>::~RepeatedField() {
- delete [] elements_;
+ // See explanation in Reserve(): we need to invoke destructors here for the
+ // case that Element has a non-trivial destructor.
+ InternalDeallocate(rep_, total_size_);
}
template <typename Element>
@@ -639,22 +1053,23 @@
template<typename Element>
inline void RepeatedField<Element>::AddAlreadyReserved(const Element& value) {
- GOOGLE_DCHECK_LT(size(), Capacity());
- elements_[current_size_++] = value;
+ GOOGLE_DCHECK_LT(current_size_, total_size_);
+ rep_->elements[current_size_++] = value;
}
template<typename Element>
inline Element* RepeatedField<Element>::AddAlreadyReserved() {
- GOOGLE_DCHECK_LT(size(), Capacity());
- return &elements_[current_size_++];
+ GOOGLE_DCHECK_LT(current_size_, total_size_);
+ return &rep_->elements[current_size_++];
}
template<typename Element>
inline void RepeatedField<Element>::Resize(int new_size, const Element& value) {
GOOGLE_DCHECK_GE(new_size, 0);
- if (new_size > size()) {
+ if (new_size > current_size_) {
Reserve(new_size);
- std::fill(&elements_[current_size_], &elements_[new_size], value);
+ std::fill(&rep_->elements[current_size_],
+ &rep_->elements[new_size], value);
}
current_size_ = new_size;
}
@@ -662,40 +1077,40 @@
template <typename Element>
inline const Element& RepeatedField<Element>::Get(int index) const {
GOOGLE_DCHECK_GE(index, 0);
- GOOGLE_DCHECK_LT(index, size());
- return elements_[index];
+ GOOGLE_DCHECK_LT(index, current_size_);
+ return rep_->elements[index];
}
template <typename Element>
inline Element* RepeatedField<Element>::Mutable(int index) {
GOOGLE_DCHECK_GE(index, 0);
- GOOGLE_DCHECK_LT(index, size());
- return elements_ + index;
+ GOOGLE_DCHECK_LT(index, current_size_);
+ return &rep_->elements[index];
}
template <typename Element>
inline void RepeatedField<Element>::Set(int index, const Element& value) {
GOOGLE_DCHECK_GE(index, 0);
- GOOGLE_DCHECK_LT(index, size());
- elements_[index] = value;
+ GOOGLE_DCHECK_LT(index, current_size_);
+ rep_->elements[index] = value;
}
template <typename Element>
inline void RepeatedField<Element>::Add(const Element& value) {
if (current_size_ == total_size_) Reserve(total_size_ + 1);
- elements_[current_size_++] = value;
+ rep_->elements[current_size_++] = value;
}
template <typename Element>
inline Element* RepeatedField<Element>::Add() {
if (current_size_ == total_size_) Reserve(total_size_ + 1);
- return &elements_[current_size_++];
+ return &rep_->elements[current_size_++];
}
template <typename Element>
inline void RepeatedField<Element>::RemoveLast() {
GOOGLE_DCHECK_GT(current_size_, 0);
- --current_size_;
+ current_size_--;
}
template <typename Element>
@@ -703,7 +1118,7 @@
int start, int num, Element* elements) {
GOOGLE_DCHECK_GE(start, 0);
GOOGLE_DCHECK_GE(num, 0);
- GOOGLE_DCHECK_LE(start + num, this->size());
+ GOOGLE_DCHECK_LE(start + num, this->current_size_);
// Save the values of the removed elements if requested.
if (elements != NULL) {
@@ -713,9 +1128,9 @@
// Slide remaining elements down to fill the gap.
if (num > 0) {
- for (int i = start + num; i < this->size(); ++i)
+ for (int i = start + num; i < this->current_size_; ++i)
this->Set(i - num, this->Get(i));
- this->Truncate(this->size() - num);
+ this->Truncate(this->current_size_ - num);
}
}
@@ -729,7 +1144,8 @@
GOOGLE_CHECK_NE(&other, this);
if (other.current_size_ != 0) {
Reserve(current_size_ + other.current_size_);
- CopyArray(elements_ + current_size_, other.elements_, other.current_size_);
+ CopyArray(rep_->elements + current_size_,
+ other.rep_->elements, other.current_size_);
current_size_ += other.current_size_;
}
}
@@ -742,62 +1158,100 @@
}
template <typename Element>
+inline typename RepeatedField<Element>::iterator RepeatedField<Element>::erase(
+ const_iterator position) {
+ return erase(position, position + 1);
+}
+
+template <typename Element>
+inline typename RepeatedField<Element>::iterator RepeatedField<Element>::erase(
+ const_iterator first, const_iterator last) {
+ size_type first_offset = first - cbegin();
+ if (first != last) {
+ Truncate(std::copy(last, cend(), begin() + first_offset) - cbegin());
+ }
+ return begin() + first_offset;
+}
+
+template <typename Element>
inline Element* RepeatedField<Element>::mutable_data() {
- return elements_;
+ return rep_ ? rep_->elements : NULL;
}
template <typename Element>
inline const Element* RepeatedField<Element>::data() const {
- return elements_;
+ return rep_ ? rep_->elements : NULL;
}
template <typename Element>
+inline void RepeatedField<Element>::InternalSwap(RepeatedField* other) {
+ std::swap(rep_, other->rep_);
+ std::swap(current_size_, other->current_size_);
+ std::swap(total_size_, other->total_size_);
+}
+
+template <typename Element>
void RepeatedField<Element>::Swap(RepeatedField* other) {
if (this == other) return;
- Element* swap_elements = elements_;
- int swap_current_size = current_size_;
- int swap_total_size = total_size_;
+ if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
+ InternalSwap(other);
+ } else {
+ RepeatedField<Element> temp(other->GetArenaNoVirtual());
+ temp.MergeFrom(*this);
+ CopyFrom(*other);
+ other->UnsafeArenaSwap(&temp);
+ }
+}
- elements_ = other->elements_;
- current_size_ = other->current_size_;
- total_size_ = other->total_size_;
-
- other->elements_ = swap_elements;
- other->current_size_ = swap_current_size;
- other->total_size_ = swap_total_size;
+template <typename Element>
+void RepeatedField<Element>::UnsafeArenaSwap(RepeatedField* other) {
+ if (this == other) return;
+ GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
+ InternalSwap(other);
}
template <typename Element>
void RepeatedField<Element>::SwapElements(int index1, int index2) {
using std::swap; // enable ADL with fallback
- swap(elements_[index1], elements_[index2]);
+ swap(rep_->elements[index1], rep_->elements[index2]);
}
template <typename Element>
inline typename RepeatedField<Element>::iterator
RepeatedField<Element>::begin() {
- return elements_;
+ return rep_ ? rep_->elements : NULL;
}
template <typename Element>
inline typename RepeatedField<Element>::const_iterator
RepeatedField<Element>::begin() const {
- return elements_;
+ return rep_ ? rep_->elements : NULL;
+}
+template <typename Element>
+inline typename RepeatedField<Element>::const_iterator
+RepeatedField<Element>::cbegin() const {
+ return rep_ ? rep_->elements : NULL;
}
template <typename Element>
inline typename RepeatedField<Element>::iterator
RepeatedField<Element>::end() {
- return elements_ + current_size_;
+ return rep_ ? rep_->elements + current_size_ : NULL;
}
template <typename Element>
inline typename RepeatedField<Element>::const_iterator
RepeatedField<Element>::end() const {
- return elements_ + current_size_;
+ return rep_ ? rep_->elements + current_size_ : NULL;
+}
+template <typename Element>
+inline typename RepeatedField<Element>::const_iterator
+RepeatedField<Element>::cend() const {
+ return rep_ ? rep_->elements + current_size_ : NULL;
}
template <typename Element>
inline int RepeatedField<Element>::SpaceUsedExcludingSelf() const {
- return (elements_ != NULL) ? total_size_ * sizeof(elements_[0]) : 0;
+ return rep_ ?
+ (total_size_ * sizeof(Element) + kRepHeaderSize) : 0;
}
// Avoid inlining of Reserve(): new, copy, and delete[] lead to a significant
@@ -805,32 +1259,65 @@
template <typename Element>
void RepeatedField<Element>::Reserve(int new_size) {
if (total_size_ >= new_size) return;
-
- Element* old_elements = elements_;
- total_size_ = max(google::protobuf::internal::kMinRepeatedFieldAllocationSize,
- max(total_size_ * 2, new_size));
- elements_ = new Element[total_size_];
- if (old_elements != NULL) {
- MoveArray(elements_, old_elements, current_size_);
- delete [] old_elements;
+ Rep* old_rep = rep_;
+ Arena* arena = GetArenaNoVirtual();
+ new_size = std::max(google::protobuf::internal::kMinRepeatedFieldAllocationSize,
+ std::max(total_size_ * 2, new_size));
+ GOOGLE_CHECK_LE(static_cast<size_t>(new_size),
+ (std::numeric_limits<size_t>::max() - kRepHeaderSize) /
+ sizeof(Element))
+ << "Requested size is too large to fit into size_t.";
+ if (arena == NULL) {
+ rep_ = reinterpret_cast<Rep*>(
+ new char[kRepHeaderSize + sizeof(Element) * new_size]);
+ } else {
+ rep_ = reinterpret_cast<Rep*>(
+ ::google::protobuf::Arena::CreateArray<char>(arena,
+ kRepHeaderSize + sizeof(Element) * new_size));
}
+ rep_->arena = arena;
+ int old_total_size = total_size_;
+ total_size_ = new_size;
+ // Invoke placement-new on newly allocated elements. We shouldn't have to do
+ // this, since Element is supposed to be POD, but a previous version of this
+ // code allocated storage with "new Element[size]" and some code uses
+ // RepeatedField with non-POD types, relying on constructor invocation. If
+ // Element has a trivial constructor (e.g., int32), gcc (tested with -O2)
+ // completely removes this loop because the loop body is empty, so this has no
+ // effect unless its side-effects are required for correctness.
+ // Note that we do this before MoveArray() below because Element's copy
+ // assignment implementation will want an initialized instance first.
+ Element* e = &rep_->elements[0];
+ Element* limit = &rep_->elements[total_size_];
+ for (; e < limit; e++) {
+ new (e) Element();
+ }
+ if (current_size_ > 0) {
+ MoveArray(rep_->elements, old_rep->elements, current_size_);
+ }
+
+ // Likewise, we need to invoke destructors on the old array.
+ InternalDeallocate(old_rep, old_total_size);
+
}
template <typename Element>
inline void RepeatedField<Element>::Truncate(int new_size) {
GOOGLE_DCHECK_LE(new_size, current_size_);
- current_size_ = new_size;
+ if (current_size_ > 0) {
+ current_size_ = new_size;
+ }
}
template <typename Element>
inline void RepeatedField<Element>::MoveArray(
- Element to[], Element from[], int array_size) {
+ Element* to, Element* from, int array_size) {
CopyArray(to, from, array_size);
}
template <typename Element>
inline void RepeatedField<Element>::CopyArray(
- Element to[], const Element from[], int array_size) {
+ Element* to, const Element* from, int array_size) {
internal::ElementCopier<Element>()(to, from, array_size);
}
@@ -838,13 +1325,13 @@
template <typename Element, bool HasTrivialCopy>
void ElementCopier<Element, HasTrivialCopy>::operator()(
- Element to[], const Element from[], int array_size) {
+ Element* to, const Element* from, int array_size) {
std::copy(from, from + array_size, to);
}
template <typename Element>
struct ElementCopier<Element, true> {
- void operator()(Element to[], const Element from[], int array_size) {
+ void operator()(Element* to, const Element* from, int array_size) {
memcpy(to, from, array_size * sizeof(Element));
}
};
@@ -857,18 +1344,55 @@
namespace internal {
inline RepeatedPtrFieldBase::RepeatedPtrFieldBase()
- : elements_(NULL),
+ : arena_(NULL),
current_size_(0),
- allocated_size_(0),
- total_size_(kInitialSize) {
+ total_size_(0),
+ rep_(NULL) {
+}
+
+inline RepeatedPtrFieldBase::RepeatedPtrFieldBase(::google::protobuf::Arena* arena)
+ : arena_(arena),
+ current_size_(0),
+ total_size_(0),
+ rep_(NULL) {
}
template <typename TypeHandler>
void RepeatedPtrFieldBase::Destroy() {
- for (int i = 0; i < allocated_size_; i++) {
- TypeHandler::Delete(cast<TypeHandler>(elements_[i]));
+ if (rep_ != NULL) {
+ for (int i = 0; i < rep_->allocated_size; i++) {
+ TypeHandler::Delete(cast<TypeHandler>(rep_->elements[i]), arena_);
+ }
+ if (arena_ == NULL) {
+ delete [] reinterpret_cast<char*>(rep_);
+ }
}
- delete [] elements_;
+ rep_ = NULL;
+}
+
+template <typename TypeHandler>
+inline void RepeatedPtrFieldBase::Swap(RepeatedPtrFieldBase* other) {
+ if (other->GetArenaNoVirtual() == GetArenaNoVirtual()) {
+ InternalSwap(other);
+ } else {
+ SwapFallback<TypeHandler>(other);
+ }
+}
+
+template <typename TypeHandler>
+void RepeatedPtrFieldBase::SwapFallback(RepeatedPtrFieldBase* other) {
+ GOOGLE_DCHECK(other->GetArenaNoVirtual() != GetArenaNoVirtual());
+
+ // Copy semantics in this case. We try to improve efficiency by placing the
+ // temporary on |other|'s arena so that messages are copied cross-arena only
+ // once, not twice.
+ RepeatedPtrFieldBase temp(other->GetArenaNoVirtual());
+ temp.MergeFrom<TypeHandler>(*this);
+ this->Clear<TypeHandler>();
+ this->MergeFrom<TypeHandler>(*other);
+ other->Clear<TypeHandler>();
+ other->InternalSwap(&temp);
+ temp.Destroy<TypeHandler>(); // Frees rep_ if `other` had no arena.
}
inline bool RepeatedPtrFieldBase::empty() const {
@@ -883,8 +1407,8 @@
inline const typename TypeHandler::Type&
RepeatedPtrFieldBase::Get(int index) const {
GOOGLE_DCHECK_GE(index, 0);
- GOOGLE_DCHECK_LT(index, size());
- return *cast<TypeHandler>(elements_[index]);
+ GOOGLE_DCHECK_LT(index, current_size_);
+ return *cast<TypeHandler>(rep_->elements[index]);
}
@@ -892,42 +1416,106 @@
inline typename TypeHandler::Type*
RepeatedPtrFieldBase::Mutable(int index) {
GOOGLE_DCHECK_GE(index, 0);
- GOOGLE_DCHECK_LT(index, size());
- return cast<TypeHandler>(elements_[index]);
+ GOOGLE_DCHECK_LT(index, current_size_);
+ return cast<TypeHandler>(rep_->elements[index]);
}
template <typename TypeHandler>
-inline typename TypeHandler::Type* RepeatedPtrFieldBase::Add() {
- if (current_size_ < allocated_size_) {
- return cast<TypeHandler>(elements_[current_size_++]);
+inline void RepeatedPtrFieldBase::Delete(int index) {
+ GOOGLE_DCHECK_GE(index, 0);
+ GOOGLE_DCHECK_LT(index, current_size_);
+ TypeHandler::Delete(cast<TypeHandler>(rep_->elements[index]), arena_);
+}
+
+template <typename TypeHandler>
+inline typename TypeHandler::Type* RepeatedPtrFieldBase::Add(
+ typename TypeHandler::Type* prototype) {
+ if (rep_ != NULL && current_size_ < rep_->allocated_size) {
+ return cast<TypeHandler>(rep_->elements[current_size_++]);
}
- if (allocated_size_ == total_size_) Reserve(total_size_ + 1);
- typename TypeHandler::Type* result = TypeHandler::New();
- ++allocated_size_;
- elements_[current_size_++] = result;
+ if (!rep_ || rep_->allocated_size == total_size_) {
+ Reserve(total_size_ + 1);
+ }
+ ++rep_->allocated_size;
+ typename TypeHandler::Type* result =
+ TypeHandler::NewFromPrototype(prototype, arena_);
+ rep_->elements[current_size_++] = result;
return result;
}
template <typename TypeHandler>
inline void RepeatedPtrFieldBase::RemoveLast() {
GOOGLE_DCHECK_GT(current_size_, 0);
- TypeHandler::Clear(cast<TypeHandler>(elements_[--current_size_]));
+ TypeHandler::Clear(cast<TypeHandler>(rep_->elements[--current_size_]));
}
template <typename TypeHandler>
void RepeatedPtrFieldBase::Clear() {
- for (int i = 0; i < current_size_; i++) {
- TypeHandler::Clear(cast<TypeHandler>(elements_[i]));
+ const int n = current_size_;
+ GOOGLE_DCHECK_GE(n, 0);
+ if (n > 0) {
+ void* const* elements = rep_->elements;
+ int i = 0;
+ do {
+ TypeHandler::Clear(cast<TypeHandler>(elements[i++]));
+ } while (i < n);
+ current_size_ = 0;
}
- current_size_ = 0;
}
+// To avoid unnecessary code duplication and reduce binary size, we use a
+// layered approach to implementing MergeFrom(). The toplevel method is
+// templated, so we get a small thunk per concrete message type in the binary.
+// This calls a shared implementation with most of the logic, passing a function
+// pointer to another type-specific piece of code that calls the object-allocate
+// and merge handlers.
template <typename TypeHandler>
inline void RepeatedPtrFieldBase::MergeFrom(const RepeatedPtrFieldBase& other) {
- GOOGLE_CHECK_NE(&other, this);
- Reserve(current_size_ + other.current_size_);
- for (int i = 0; i < other.current_size_; i++) {
- TypeHandler::Merge(other.template Get<TypeHandler>(i), Add<TypeHandler>());
+ GOOGLE_DCHECK_NE(&other, this);
+ if (other.current_size_ == 0) return;
+ MergeFromInternal(
+ other, &RepeatedPtrFieldBase::MergeFromInnerLoop<TypeHandler>);
+}
+
+inline void RepeatedPtrFieldBase::MergeFromInternal(
+ const RepeatedPtrFieldBase& other,
+ void (RepeatedPtrFieldBase::*inner_loop)(void**, void**, int, int)) {
+ // Note: wrapper has already guaranteed that other.rep_ != NULL here.
+ int other_size = other.current_size_;
+ void** other_elements = other.rep_->elements;
+ void** new_elements = InternalExtend(other_size);
+ int allocated_elems = rep_->allocated_size - current_size_;
+ (this->*inner_loop)(new_elements, other_elements,
+ other_size, allocated_elems);
+ current_size_ += other_size;
+ if (rep_->allocated_size < current_size_) {
+ rep_->allocated_size = current_size_;
+ }
+}
+
+// Merges other_elems to our_elems.
+template<typename TypeHandler>
+void RepeatedPtrFieldBase::MergeFromInnerLoop(
+ void** our_elems, void** other_elems, int length, int already_allocated) {
+ // Split into two loops, over ranges [0, allocated) and [allocated, length),
+ // to avoid a branch within the loop.
+ for (int i = 0; i < already_allocated && i < length; i++) {
+ // Already allocated: use existing element.
+ typename TypeHandler::Type* other_elem =
+ reinterpret_cast<typename TypeHandler::Type*>(other_elems[i]);
+ typename TypeHandler::Type* new_elem =
+ reinterpret_cast<typename TypeHandler::Type*>(our_elems[i]);
+ TypeHandler::Merge(*other_elem, new_elem);
+ }
+ Arena* arena = GetArenaNoVirtual();
+ for (int i = already_allocated; i < length; i++) {
+ // Not allocated: alloc a new element first, then merge it.
+ typename TypeHandler::Type* other_elem =
+ reinterpret_cast<typename TypeHandler::Type*>(other_elems[i]);
+ typename TypeHandler::Type* new_elem =
+ TypeHandler::NewFromPrototype(other_elem, arena);
+ TypeHandler::Merge(*other_elem, new_elem);
+ our_elems[i] = new_elem;
}
}
@@ -943,18 +1531,18 @@
}
inline void* const* RepeatedPtrFieldBase::raw_data() const {
- return elements_;
+ return rep_ ? rep_->elements : NULL;
}
inline void** RepeatedPtrFieldBase::raw_mutable_data() const {
- return elements_;
+ return rep_ ? const_cast<void**>(rep_->elements) : NULL;
}
template <typename TypeHandler>
inline typename TypeHandler::Type** RepeatedPtrFieldBase::mutable_data() {
// TODO(kenton): Breaks C++ aliasing rules. We should probably remove this
// method entirely.
- return reinterpret_cast<typename TypeHandler::Type**>(elements_);
+ return reinterpret_cast<typename TypeHandler::Type**>(raw_mutable_data());
}
template <typename TypeHandler>
@@ -962,89 +1550,212 @@
RepeatedPtrFieldBase::data() const {
// TODO(kenton): Breaks C++ aliasing rules. We should probably remove this
// method entirely.
- return reinterpret_cast<const typename TypeHandler::Type* const*>(elements_);
+ return reinterpret_cast<const typename TypeHandler::Type* const*>(raw_data());
}
inline void RepeatedPtrFieldBase::SwapElements(int index1, int index2) {
using std::swap; // enable ADL with fallback
- swap(elements_[index1], elements_[index2]);
+ swap(rep_->elements[index1], rep_->elements[index2]);
}
template <typename TypeHandler>
inline int RepeatedPtrFieldBase::SpaceUsedExcludingSelf() const {
- int allocated_bytes =
- (elements_ != NULL) ? total_size_ * sizeof(elements_[0]) : 0;
- for (int i = 0; i < allocated_size_; ++i) {
- allocated_bytes += TypeHandler::SpaceUsed(*cast<TypeHandler>(elements_[i]));
+ int allocated_bytes = total_size_ * sizeof(void*);
+ if (rep_ != NULL) {
+ for (int i = 0; i < rep_->allocated_size; ++i) {
+ allocated_bytes += TypeHandler::SpaceUsed(
+ *cast<TypeHandler>(rep_->elements[i]));
+ }
+ allocated_bytes += kRepHeaderSize;
}
return allocated_bytes;
}
template <typename TypeHandler>
inline typename TypeHandler::Type* RepeatedPtrFieldBase::AddFromCleared() {
- if (current_size_ < allocated_size_) {
- return cast<TypeHandler>(elements_[current_size_++]);
+ if (rep_ != NULL && current_size_ < rep_->allocated_size) {
+ return cast<TypeHandler>(rep_->elements[current_size_++]);
} else {
return NULL;
}
}
+// AddAllocated version that implements arena-safe copying behavior.
template <typename TypeHandler>
-void RepeatedPtrFieldBase::AddAllocated(
+void RepeatedPtrFieldBase::AddAllocatedInternal(
+ typename TypeHandler::Type* value,
+ google::protobuf::internal::true_type) {
+ Arena* element_arena = reinterpret_cast<Arena*>(
+ TypeHandler::GetMaybeArenaPointer(value));
+ Arena* arena = GetArenaNoVirtual();
+ if (arena == element_arena && rep_ &&
+ rep_->allocated_size < total_size_) {
+ // Fast path: underlying arena representation (tagged pointer) is equal to
+ // our arena pointer, and we can add to array without resizing it (at least
+ // one slot that is not allocated).
+ void** elems = rep_->elements;
+ if (current_size_ < rep_->allocated_size) {
+ // Make space at [current] by moving first allocated element to end of
+ // allocated list.
+ elems[rep_->allocated_size] = elems[current_size_];
+ }
+ elems[current_size_] = value;
+ current_size_ = current_size_ + 1;
+ rep_->allocated_size = rep_->allocated_size + 1;
+ return;
+ } else {
+ AddAllocatedSlowWithCopy<TypeHandler>(
+ value, TypeHandler::GetArena(value), arena);
+ }
+}
+
+// Slowpath handles all cases, copying if necessary.
+template<typename TypeHandler>
+void RepeatedPtrFieldBase::AddAllocatedSlowWithCopy(
+ // Pass value_arena and my_arena to avoid duplicate virtual call (value) or
+ // load (mine).
+ typename TypeHandler::Type* value, Arena* value_arena, Arena* my_arena) {
+ // Ensure that either the value is in the same arena, or if not, we do the
+ // appropriate thing: Own() it (if it's on heap and we're in an arena) or copy
+ // it to our arena/heap (otherwise).
+ if (my_arena != NULL && value_arena == NULL) {
+ my_arena->Own(value);
+ } else if (my_arena != value_arena) {
+ typename TypeHandler::Type* new_value =
+ TypeHandler::NewFromPrototype(value, my_arena);
+ TypeHandler::Merge(*value, new_value);
+ TypeHandler::Delete(value, value_arena);
+ value = new_value;
+ }
+
+ UnsafeArenaAddAllocated<TypeHandler>(value);
+}
+
+// AddAllocated version that does not implement arena-safe copying behavior.
+template <typename TypeHandler>
+void RepeatedPtrFieldBase::AddAllocatedInternal(
+ typename TypeHandler::Type* value,
+ google::protobuf::internal::false_type) {
+ if (rep_ && rep_->allocated_size < total_size_) {
+ // Fast path: underlying arena representation (tagged pointer) is equal to
+ // our arena pointer, and we can add to array without resizing it (at least
+ // one slot that is not allocated).
+ void** elems = rep_->elements;
+ if (current_size_ < rep_->allocated_size) {
+ // Make space at [current] by moving first allocated element to end of
+ // allocated list.
+ elems[rep_->allocated_size] = elems[current_size_];
+ }
+ elems[current_size_] = value;
+ current_size_ = current_size_ + 1;
+ ++rep_->allocated_size;
+ return;
+ } else {
+ UnsafeArenaAddAllocated<TypeHandler>(value);
+ }
+}
+
+template <typename TypeHandler>
+void RepeatedPtrFieldBase::UnsafeArenaAddAllocated(
typename TypeHandler::Type* value) {
// Make room for the new pointer.
- if (current_size_ == total_size_) {
+ if (!rep_ || current_size_ == total_size_) {
// The array is completely full with no cleared objects, so grow it.
Reserve(total_size_ + 1);
- ++allocated_size_;
- } else if (allocated_size_ == total_size_) {
+ ++rep_->allocated_size;
+ } else if (rep_->allocated_size == total_size_) {
// There is no more space in the pointer array because it contains some
// cleared objects awaiting reuse. We don't want to grow the array in this
// case because otherwise a loop calling AddAllocated() followed by Clear()
// would leak memory.
- TypeHandler::Delete(cast<TypeHandler>(elements_[current_size_]));
- } else if (current_size_ < allocated_size_) {
+ TypeHandler::Delete(
+ cast<TypeHandler>(rep_->elements[current_size_]), arena_);
+ } else if (current_size_ < rep_->allocated_size) {
// We have some cleared objects. We don't care about their order, so we
// can just move the first one to the end to make space.
- elements_[allocated_size_] = elements_[current_size_];
- ++allocated_size_;
+ rep_->elements[rep_->allocated_size] = rep_->elements[current_size_];
+ ++rep_->allocated_size;
} else {
// There are no cleared objects.
- ++allocated_size_;
+ ++rep_->allocated_size;
}
- elements_[current_size_++] = value;
+ rep_->elements[current_size_++] = value;
+}
+
+// ReleaseLast() for types that implement merge/copy behavior.
+template <typename TypeHandler>
+inline typename TypeHandler::Type*
+RepeatedPtrFieldBase::ReleaseLastInternal(google::protobuf::internal::true_type) {
+ // First, release an element.
+ typename TypeHandler::Type* result = UnsafeArenaReleaseLast<TypeHandler>();
+ // Now perform a copy if we're on an arena.
+ Arena* arena = GetArenaNoVirtual();
+ if (arena == NULL) {
+ return result;
+ } else {
+ typename TypeHandler::Type* new_result =
+ TypeHandler::NewFromPrototype(result, NULL);
+ TypeHandler::Merge(*result, new_result);
+ return new_result;
+ }
+}
+
+// ReleaseLast() for types that *do not* implement merge/copy behavior -- this
+// is the same as UnsafeArenaReleaseLast(). Note that we GOOGLE_DCHECK-fail if we're on
+// an arena, since the user really should implement the copy operation in this
+// case.
+template <typename TypeHandler>
+inline typename TypeHandler::Type*
+RepeatedPtrFieldBase::ReleaseLastInternal(google::protobuf::internal::false_type) {
+ GOOGLE_DCHECK(GetArenaNoVirtual() == NULL)
+ << "ReleaseLast() called on a RepeatedPtrField that is on an arena, "
+ << "with a type that does not implement MergeFrom. This is unsafe; "
+ << "please implement MergeFrom for your type.";
+ return UnsafeArenaReleaseLast<TypeHandler>();
}
template <typename TypeHandler>
-inline typename TypeHandler::Type* RepeatedPtrFieldBase::ReleaseLast() {
+inline typename TypeHandler::Type*
+ RepeatedPtrFieldBase::UnsafeArenaReleaseLast() {
GOOGLE_DCHECK_GT(current_size_, 0);
typename TypeHandler::Type* result =
- cast<TypeHandler>(elements_[--current_size_]);
- --allocated_size_;
- if (current_size_ < allocated_size_) {
+ cast<TypeHandler>(rep_->elements[--current_size_]);
+ --rep_->allocated_size;
+ if (current_size_ < rep_->allocated_size) {
// There are cleared elements on the end; replace the removed element
// with the last allocated element.
- elements_[current_size_] = elements_[allocated_size_];
+ rep_->elements[current_size_] = rep_->elements[rep_->allocated_size];
}
return result;
}
inline int RepeatedPtrFieldBase::ClearedCount() const {
- return allocated_size_ - current_size_;
+ return rep_ ? (rep_->allocated_size - current_size_) : 0;
}
template <typename TypeHandler>
inline void RepeatedPtrFieldBase::AddCleared(
typename TypeHandler::Type* value) {
- if (allocated_size_ == total_size_) Reserve(total_size_ + 1);
- elements_[allocated_size_++] = value;
+ GOOGLE_DCHECK(GetArenaNoVirtual() == NULL)
+ << "AddCleared() can only be used on a RepeatedPtrField not on an arena.";
+ GOOGLE_DCHECK(TypeHandler::GetArena(value) == NULL)
+ << "AddCleared() can only accept values not on an arena.";
+ if (!rep_ || rep_->allocated_size == total_size_) {
+ Reserve(total_size_ + 1);
+ }
+ rep_->elements[rep_->allocated_size++] = value;
}
template <typename TypeHandler>
inline typename TypeHandler::Type* RepeatedPtrFieldBase::ReleaseCleared() {
- GOOGLE_DCHECK_GT(allocated_size_, current_size_);
- return cast<TypeHandler>(elements_[--allocated_size_]);
+ GOOGLE_DCHECK(GetArenaNoVirtual() == NULL)
+ << "ReleaseCleared() can only be used on a RepeatedPtrField not on "
+ << "an arena.";
+ GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
+ GOOGLE_DCHECK(rep_ != NULL);
+ GOOGLE_DCHECK_GT(rep_->allocated_size, current_size_);
+ return cast<TypeHandler>(rep_->elements[--rep_->allocated_size]);
}
} // namespace internal
@@ -1063,12 +1774,17 @@
template <typename Element>
-inline RepeatedPtrField<Element>::RepeatedPtrField() {}
+inline RepeatedPtrField<Element>::RepeatedPtrField()
+ : RepeatedPtrFieldBase() {}
+
+template <typename Element>
+inline RepeatedPtrField<Element>::RepeatedPtrField(::google::protobuf::Arena* arena) :
+ RepeatedPtrFieldBase(arena) {}
template <typename Element>
inline RepeatedPtrField<Element>::RepeatedPtrField(
const RepeatedPtrField& other)
- : RepeatedPtrFieldBase() {
+ : RepeatedPtrFieldBase() {
CopyFrom(other);
}
@@ -1134,14 +1850,71 @@
GOOGLE_DCHECK_GE(start, 0);
GOOGLE_DCHECK_GE(num, 0);
GOOGLE_DCHECK_LE(start + num, size());
- for (int i = 0; i < num; ++i)
- delete RepeatedPtrFieldBase::Mutable<TypeHandler>(start + i);
+ for (int i = 0; i < num; ++i) {
+ RepeatedPtrFieldBase::Delete<TypeHandler>(start + i);
+ }
ExtractSubrange(start, num, NULL);
}
template <typename Element>
inline void RepeatedPtrField<Element>::ExtractSubrange(
int start, int num, Element** elements) {
+ typename internal::TypeImplementsMergeBehavior<
+ typename TypeHandler::Type>::type t;
+ ExtractSubrangeInternal(start, num, elements, t);
+}
+
+// ExtractSubrange() implementation for types that implement merge/copy
+// behavior.
+template <typename Element>
+inline void RepeatedPtrField<Element>::ExtractSubrangeInternal(
+ int start, int num, Element** elements, google::protobuf::internal::true_type) {
+ GOOGLE_DCHECK_GE(start, 0);
+ GOOGLE_DCHECK_GE(num, 0);
+ GOOGLE_DCHECK_LE(start + num, size());
+
+ if (num > 0) {
+ // Save the values of the removed elements if requested.
+ if (elements != NULL) {
+ if (GetArenaNoVirtual() != NULL) {
+ // If we're on an arena, we perform a copy for each element so that the
+ // returned elements are heap-allocated.
+ for (int i = 0; i < num; ++i) {
+ Element* element = RepeatedPtrFieldBase::
+ Mutable<TypeHandler>(i + start);
+ typename TypeHandler::Type* new_value =
+ TypeHandler::NewFromPrototype(element, NULL);
+ TypeHandler::Merge(*element, new_value);
+ elements[i] = new_value;
+ }
+ } else {
+ for (int i = 0; i < num; ++i) {
+ elements[i] = RepeatedPtrFieldBase::Mutable<TypeHandler>(i + start);
+ }
+ }
+ }
+ CloseGap(start, num);
+ }
+}
+
+// ExtractSubrange() implementation for types that do not implement merge/copy
+// behavior.
+template<typename Element>
+inline void RepeatedPtrField<Element>::ExtractSubrangeInternal(
+ int start, int num, Element** elements, google::protobuf::internal::false_type) {
+ // This case is identical to UnsafeArenaExtractSubrange(). However, since
+ // ExtractSubrange() must return heap-allocated objects by contract, and we
+ // cannot fulfill this contract if we are an on arena, we must GOOGLE_DCHECK() that
+ // we are not on an arena.
+ GOOGLE_DCHECK(GetArenaNoVirtual() == NULL)
+ << "ExtractSubrange() when arena is non-NULL is only supported when "
+ << "the Element type supplies a MergeFrom() operation to make copies.";
+ UnsafeArenaExtractSubrange(start, num, elements);
+}
+
+template <typename Element>
+inline void RepeatedPtrField<Element>::UnsafeArenaExtractSubrange(
+ int start, int num, Element** elements) {
GOOGLE_DCHECK_GE(start, 0);
GOOGLE_DCHECK_GE(num, 0);
GOOGLE_DCHECK_LE(start + num, size());
@@ -1149,8 +1922,9 @@
if (num > 0) {
// Save the values of the removed elements if requested.
if (elements != NULL) {
- for (int i = 0; i < num; ++i)
+ for (int i = 0; i < num; ++i) {
elements[i] = RepeatedPtrFieldBase::Mutable<TypeHandler>(i + start);
+ }
}
CloseGap(start, num);
}
@@ -1174,6 +1948,21 @@
}
template <typename Element>
+inline typename RepeatedPtrField<Element>::iterator
+RepeatedPtrField<Element>::erase(const_iterator position) {
+ return erase(position, position + 1);
+}
+
+template <typename Element>
+inline typename RepeatedPtrField<Element>::iterator
+RepeatedPtrField<Element>::erase(const_iterator first, const_iterator last) {
+ size_type pos_offset = std::distance(cbegin(), first);
+ size_type last_offset = std::distance(cbegin(), last);
+ DeleteSubrange(pos_offset, last_offset - pos_offset);
+ return begin() + pos_offset;
+}
+
+template <typename Element>
inline Element** RepeatedPtrField<Element>::mutable_data() {
return RepeatedPtrFieldBase::mutable_data<TypeHandler>();
}
@@ -1184,16 +1973,32 @@
}
template <typename Element>
-void RepeatedPtrField<Element>::Swap(RepeatedPtrField* other) {
- RepeatedPtrFieldBase::Swap(other);
+inline void RepeatedPtrField<Element>::Swap(RepeatedPtrField* other) {
+ if (this == other)
+ return;
+ RepeatedPtrFieldBase::Swap<TypeHandler>(other);
}
template <typename Element>
-void RepeatedPtrField<Element>::SwapElements(int index1, int index2) {
+inline void RepeatedPtrField<Element>::UnsafeArenaSwap(
+ RepeatedPtrField* other) {
+ GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
+ if (this == other)
+ return;
+ RepeatedPtrFieldBase::InternalSwap(other);
+}
+
+template <typename Element>
+inline void RepeatedPtrField<Element>::SwapElements(int index1, int index2) {
RepeatedPtrFieldBase::SwapElements(index1, index2);
}
template <typename Element>
+inline Arena* RepeatedPtrField<Element>::GetArenaNoVirtual() const {
+ return RepeatedPtrFieldBase::GetArenaNoVirtual();
+}
+
+template <typename Element>
inline int RepeatedPtrField<Element>::SpaceUsedExcludingSelf() const {
return RepeatedPtrFieldBase::SpaceUsedExcludingSelf<TypeHandler>();
}
@@ -1204,10 +2009,19 @@
}
template <typename Element>
+inline void RepeatedPtrField<Element>::UnsafeArenaAddAllocated(Element* value) {
+ RepeatedPtrFieldBase::UnsafeArenaAddAllocated<TypeHandler>(value);
+}
+
+template <typename Element>
inline Element* RepeatedPtrField<Element>::ReleaseLast() {
return RepeatedPtrFieldBase::ReleaseLast<TypeHandler>();
}
+template <typename Element>
+inline Element* RepeatedPtrField<Element>::UnsafeArenaReleaseLast() {
+ return RepeatedPtrFieldBase::UnsafeArenaReleaseLast<TypeHandler>();
+}
template <typename Element>
inline int RepeatedPtrField<Element>::ClearedCount() const {
@@ -1307,11 +2121,11 @@
it_ += d;
return *this;
}
- friend iterator operator+(iterator it, difference_type d) {
+ friend iterator operator+(iterator it, const difference_type d) {
it += d;
return it;
}
- friend iterator operator+(difference_type d, iterator it) {
+ friend iterator operator+(const difference_type d, iterator it) {
it += d;
return it;
}
@@ -1422,6 +2236,12 @@
VoidPtr* it_;
};
+void RepeatedPtrFieldBase::InternalSwap(RepeatedPtrFieldBase* other) {
+ std::swap(rep_, other->rep_);
+ std::swap(current_size_, other->current_size_);
+ std::swap(total_size_, other->total_size_);
+}
+
} // namespace internal
template <typename Element>
@@ -1435,6 +2255,11 @@
return iterator(raw_data());
}
template <typename Element>
+inline typename RepeatedPtrField<Element>::const_iterator
+RepeatedPtrField<Element>::cbegin() const {
+ return begin();
+}
+template <typename Element>
inline typename RepeatedPtrField<Element>::iterator
RepeatedPtrField<Element>::end() {
return iterator(raw_data() + size());
@@ -1444,6 +2269,11 @@
RepeatedPtrField<Element>::end() const {
return iterator(raw_data() + size());
}
+template <typename Element>
+inline typename RepeatedPtrField<Element>::const_iterator
+RepeatedPtrField<Element>::cend() const {
+ return end();
+}
template <typename Element>
inline typename RepeatedPtrField<Element>::pointer_iterator
@@ -1470,7 +2300,7 @@
// Iterators and helper functions that follow the spirit of the STL
// std::back_insert_iterator and std::back_inserter but are tailor-made
-// for RepeatedField and RepatedPtrField. Typical usage would be:
+// for RepeatedField and RepeatedPtrField. Typical usage would be:
//
// std::copy(some_sequence.begin(), some_sequence.end(),
// google::protobuf::RepeatedFieldBackInserter(proto.mutable_sequence()));
@@ -1563,6 +2393,37 @@
private:
RepeatedPtrField<T>* field_;
};
+
+// Almost identical to AllocatedRepeatedPtrFieldBackInsertIterator. This one
+// uses the UnsafeArenaAddAllocated instead.
+template<typename T>
+class UnsafeArenaAllocatedRepeatedPtrFieldBackInsertIterator
+ : public std::iterator<std::output_iterator_tag, T> {
+ public:
+ explicit UnsafeArenaAllocatedRepeatedPtrFieldBackInsertIterator(
+ ::google::protobuf::RepeatedPtrField<T>* const mutable_field)
+ : field_(mutable_field) {
+ }
+ UnsafeArenaAllocatedRepeatedPtrFieldBackInsertIterator<T>& operator=(
+ T const* const ptr_to_value) {
+ field_->UnsafeArenaAddAllocated(const_cast<T*>(ptr_to_value));
+ return *this;
+ }
+ UnsafeArenaAllocatedRepeatedPtrFieldBackInsertIterator<T>& operator*() {
+ return *this;
+ }
+ UnsafeArenaAllocatedRepeatedPtrFieldBackInsertIterator<T>& operator++() {
+ return *this;
+ }
+ UnsafeArenaAllocatedRepeatedPtrFieldBackInsertIterator<T>& operator++(
+ int /* unused */) {
+ return *this;
+ }
+
+ private:
+ ::google::protobuf::RepeatedPtrField<T>* field_;
+};
+
} // namespace internal
// Provides a back insert iterator for RepeatedField instances,
@@ -1597,6 +2458,25 @@
mutable_field);
}
+// Similar to AllocatedRepeatedPtrFieldBackInserter, using
+// UnsafeArenaAddAllocated instead of AddAllocated.
+// This is slightly faster if that matters. It is also useful in legacy code
+// that uses temporary ownership to avoid copies. Example:
+// RepeatedPtrField<T> temp_field;
+// temp_field.AddAllocated(new T);
+// ... // Do something with temp_field
+// temp_field.ExtractSubrange(0, temp_field.size(), NULL);
+// If you put temp_field on the arena this fails, because the ownership
+// transfers to the arena at the "AddAllocated" call and is not released anymore
+// causing a double delete. Using UnsafeArenaAddAllocated prevents this.
+template<typename T>
+internal::UnsafeArenaAllocatedRepeatedPtrFieldBackInsertIterator<T>
+UnsafeArenaAllocatedRepeatedPtrFieldBackInserter(
+ ::google::protobuf::RepeatedPtrField<T>* const mutable_field) {
+ return internal::UnsafeArenaAllocatedRepeatedPtrFieldBackInsertIterator<T>(
+ mutable_field);
+}
+
} // namespace protobuf
} // namespace google
diff --git a/darwin-x86_64/protoc/include/google/protobuf/repeated_field_reflection.h b/darwin-x86_64/protoc/include/google/protobuf/repeated_field_reflection.h
new file mode 100644
index 0000000..44d14d5
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/repeated_field_reflection.h
@@ -0,0 +1,337 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// This header file is protobuf internal. Users should not include this
+// file directly.
+#ifndef GOOGLE_PROTOBUF_REPEATED_FIELD_REFLECTION_H__
+#define GOOGLE_PROTOBUF_REPEATED_FIELD_REFLECTION_H__
+
+#include <memory>
+#ifndef _SHARED_PTR_H
+#include <google/protobuf/stubs/shared_ptr.h>
+#endif
+
+#include <google/protobuf/generated_enum_reflection.h>
+
+namespace google {
+namespace protobuf {
+namespace internal {
+// Interfaces used to implement reflection RepeatedFieldRef API.
+// Reflection::GetRepeatedAccessor() should return a pointer to an singleton
+// object that implements the below interface.
+//
+// This interface passes/returns values using void pointers. The actual type
+// of the value depends on the field's cpp_type. Following is a mapping from
+// cpp_type to the type that should be used in this interface:
+//
+// field->cpp_type() T Actual type of void*
+// CPPTYPE_INT32 int32 int32
+// CPPTYPE_UINT32 uint32 uint32
+// CPPTYPE_INT64 int64 int64
+// CPPTYPE_UINT64 uint64 uint64
+// CPPTYPE_DOUBLE double double
+// CPPTYPE_FLOAT float float
+// CPPTYPE_BOOL bool bool
+// CPPTYPE_ENUM generated enum type int32
+// CPPTYPE_STRING string string
+// CPPTYPE_MESSAGE generated message type google::protobuf::Message
+// or google::protobuf::Message
+//
+// Note that for enums we use int32 in the interface.
+//
+// You can map from T to the actual type using RefTypeTraits:
+// typedef RefTypeTraits<T>::AccessorValueType ActualType;
+class LIBPROTOBUF_EXPORT RepeatedFieldAccessor {
+ public:
+ // Typedefs for clarity.
+ typedef void Field;
+ typedef void Value;
+ typedef void Iterator;
+
+ virtual ~RepeatedFieldAccessor();
+ virtual bool IsEmpty(const Field* data) const = 0;
+ virtual int Size(const Field* data) const = 0;
+ // Depends on the underlying representation of the repeated field, this
+ // method can return a pointer to the underlying object if such an object
+ // exists, or fill the data into scratch_space and return scratch_space.
+ // Callers of this method must ensure scratch_space is a valid pointer
+ // to a mutable object of the correct type.
+ virtual const Value* Get(
+ const Field* data, int index, Value* scratch_space) const = 0;
+
+ virtual void Clear(Field* data) const = 0;
+ virtual void Set(Field* data, int index, const Value* value) const = 0;
+ virtual void Add(Field* data, const Value* value) const = 0;
+ virtual void RemoveLast(Field* data) const = 0;
+ virtual void SwapElements(Field* data, int index1, int index2) const = 0;
+ virtual void Swap(Field* data, const RepeatedFieldAccessor* other_mutator,
+ Field* other_data) const = 0;
+
+ // Create an iterator that points at the begining of the repeated field.
+ virtual Iterator* BeginIterator(const Field* data) const = 0;
+ // Create an iterator that points at the end of the repeated field.
+ virtual Iterator* EndIterator(const Field* data) const = 0;
+ // Make a copy of an iterator and return the new copy.
+ virtual Iterator* CopyIterator(const Field* data,
+ const Iterator* iterator) const = 0;
+ // Move an iterator to point to the next element.
+ virtual Iterator* AdvanceIterator(const Field* data,
+ Iterator* iterator) const = 0;
+ // Compare whether two iterators point to the same element.
+ virtual bool EqualsIterator(const Field* data, const Iterator* a,
+ const Iterator* b) const = 0;
+ // Delete an iterator created by BeginIterator(), EndIterator() and
+ // CopyIterator().
+ virtual void DeleteIterator(const Field* data, Iterator* iterator) const = 0;
+ // Like Get() but for iterators.
+ virtual const Value* GetIteratorValue(const Field* data,
+ const Iterator* iterator,
+ Value* scratch_space) const = 0;
+
+ // Templated methods that make using this interface easier for non-message
+ // types.
+ template<typename T>
+ T Get(const Field* data, int index) const {
+ typedef typename RefTypeTraits<T>::AccessorValueType ActualType;
+ ActualType scratch_space;
+ return static_cast<T>(
+ *reinterpret_cast<const ActualType*>(
+ Get(data, index, static_cast<Value*>(&scratch_space))));
+ }
+
+ template<typename T, typename ValueType>
+ void Set(Field* data, int index, const ValueType& value) const {
+ typedef typename RefTypeTraits<T>::AccessorValueType ActualType;
+ // In this RepeatedFieldAccessor interface we pass/return data using
+ // raw pointers. Type of the data these raw pointers point to should
+ // be ActualType. Here we have a ValueType object and want a ActualType
+ // pointer. We can't cast a ValueType pointer to an ActualType pointer
+ // directly because their type might be different (for enums ValueType
+ // may be a generated enum type while ActualType is int32). To be safe
+ // we make a copy to get a temporary ActualType object and use it.
+ ActualType tmp = static_cast<ActualType>(value);
+ Set(data, index, static_cast<const Value*>(&tmp));
+ }
+
+ template<typename T, typename ValueType>
+ void Add(Field* data, const ValueType& value) const {
+ typedef typename RefTypeTraits<T>::AccessorValueType ActualType;
+ // In this RepeatedFieldAccessor interface we pass/return data using
+ // raw pointers. Type of the data these raw pointers point to should
+ // be ActualType. Here we have a ValueType object and want a ActualType
+ // pointer. We can't cast a ValueType pointer to an ActualType pointer
+ // directly because their type might be different (for enums ValueType
+ // may be a generated enum type while ActualType is int32). To be safe
+ // we make a copy to get a temporary ActualType object and use it.
+ ActualType tmp = static_cast<ActualType>(value);
+ Add(data, static_cast<const Value*>(&tmp));
+ }
+};
+
+// Implement (Mutable)RepeatedFieldRef::iterator
+template<typename T>
+class RepeatedFieldRefIterator
+ : public std::iterator<std::forward_iterator_tag, T> {
+ typedef typename RefTypeTraits<T>::AccessorValueType AccessorValueType;
+ typedef typename RefTypeTraits<T>::IteratorValueType IteratorValueType;
+ typedef typename RefTypeTraits<T>::IteratorPointerType IteratorPointerType;
+
+ public:
+ // Constructor for non-message fields.
+ RepeatedFieldRefIterator(const void* data,
+ const RepeatedFieldAccessor* accessor,
+ bool begin)
+ : data_(data), accessor_(accessor),
+ iterator_(begin ? accessor->BeginIterator(data) :
+ accessor->EndIterator(data)),
+ scratch_space_(new AccessorValueType) {
+ }
+ // Constructor for message fields.
+ RepeatedFieldRefIterator(const void* data,
+ const RepeatedFieldAccessor* accessor,
+ bool begin,
+ AccessorValueType* scratch_space)
+ : data_(data), accessor_(accessor),
+ iterator_(begin ? accessor->BeginIterator(data) :
+ accessor->EndIterator(data)),
+ scratch_space_(scratch_space) {
+ }
+ ~RepeatedFieldRefIterator() {
+ accessor_->DeleteIterator(data_, iterator_);
+ }
+ RepeatedFieldRefIterator operator++(int) {
+ RepeatedFieldRefIterator tmp(*this);
+ iterator_ = accessor_->AdvanceIterator(data_, iterator_);
+ return tmp;
+ }
+ RepeatedFieldRefIterator& operator++() {
+ iterator_ = accessor_->AdvanceIterator(data_, iterator_);
+ return *this;
+ }
+ IteratorValueType operator*() const {
+ return static_cast<IteratorValueType>(
+ *static_cast<const AccessorValueType*>(
+ accessor_->GetIteratorValue(
+ data_, iterator_, scratch_space_.get())));
+ }
+ IteratorPointerType operator->() const {
+ return static_cast<IteratorPointerType>(
+ accessor_->GetIteratorValue(
+ data_, iterator_, scratch_space_.get()));
+ }
+ bool operator!=(const RepeatedFieldRefIterator& other) const {
+ assert(data_ == other.data_);
+ assert(accessor_ == other.accessor_);
+ return !accessor_->EqualsIterator(data_, iterator_, other.iterator_);
+ }
+ bool operator==(const RepeatedFieldRefIterator& other) const {
+ return !this->operator!=(other);
+ }
+
+ RepeatedFieldRefIterator(const RepeatedFieldRefIterator& other)
+ : data_(other.data_), accessor_(other.accessor_),
+ iterator_(accessor_->CopyIterator(data_, other.iterator_)) {
+ }
+ RepeatedFieldRefIterator& operator=(const RepeatedFieldRefIterator& other) {
+ if (this != &other) {
+ accessor_->DeleteIterator(data_, iterator_);
+ data_ = other.data_;
+ accessor_ = other.accessor_;
+ iterator_ = accessor_->CopyIterator(data_, other.iterator_);
+ }
+ return *this;
+ }
+
+ protected:
+ const void* data_;
+ const RepeatedFieldAccessor* accessor_;
+ void* iterator_;
+ google::protobuf::scoped_ptr<AccessorValueType> scratch_space_;
+};
+
+// TypeTraits that maps the type parameter T of RepeatedFieldRef or
+// MutableRepeatedFieldRef to corresponding iterator type,
+// RepeatedFieldAccessor type, etc.
+template<typename T>
+struct PrimitiveTraits {
+ static const bool is_primitive = false;
+};
+#define DEFINE_PRIMITIVE(TYPE, type) \
+ template<> struct PrimitiveTraits<type> { \
+ static const bool is_primitive = true; \
+ static const FieldDescriptor::CppType cpp_type = \
+ FieldDescriptor::CPPTYPE_ ## TYPE; \
+ };
+DEFINE_PRIMITIVE(INT32, int32)
+DEFINE_PRIMITIVE(UINT32, uint32)
+DEFINE_PRIMITIVE(INT64, int64)
+DEFINE_PRIMITIVE(UINT64, uint64)
+DEFINE_PRIMITIVE(FLOAT, float)
+DEFINE_PRIMITIVE(DOUBLE, double)
+DEFINE_PRIMITIVE(BOOL, bool)
+#undef DEFINE_PRIMITIVE
+
+template<typename T>
+struct RefTypeTraits<
+ T, typename internal::enable_if<PrimitiveTraits<T>::is_primitive>::type> {
+ typedef RepeatedFieldRefIterator<T> iterator;
+ typedef RepeatedFieldAccessor AccessorType;
+ typedef T AccessorValueType;
+ typedef T IteratorValueType;
+ typedef T* IteratorPointerType;
+ static const FieldDescriptor::CppType cpp_type =
+ PrimitiveTraits<T>::cpp_type;
+ static const Descriptor* GetMessageFieldDescriptor() {
+ return NULL;
+ }
+};
+
+template<typename T>
+struct RefTypeTraits<
+ T, typename internal::enable_if<is_proto_enum<T>::value>::type> {
+ typedef RepeatedFieldRefIterator<T> iterator;
+ typedef RepeatedFieldAccessor AccessorType;
+ // We use int32 for repeated enums in RepeatedFieldAccessor.
+ typedef int32 AccessorValueType;
+ typedef T IteratorValueType;
+ typedef int32* IteratorPointerType;
+ static const FieldDescriptor::CppType cpp_type =
+ FieldDescriptor::CPPTYPE_ENUM;
+ static const Descriptor* GetMessageFieldDescriptor() {
+ return NULL;
+ }
+};
+
+template<typename T>
+struct RefTypeTraits<
+ T, typename internal::enable_if<internal::is_same<string, T>::value>::type> {
+ typedef RepeatedFieldRefIterator<T> iterator;
+ typedef RepeatedFieldAccessor AccessorType;
+ typedef string AccessorValueType;
+ typedef string IteratorValueType;
+ typedef string* IteratorPointerType;
+ static const FieldDescriptor::CppType cpp_type =
+ FieldDescriptor::CPPTYPE_STRING;
+ static const Descriptor* GetMessageFieldDescriptor() {
+ return NULL;
+ }
+};
+
+template<typename T>
+struct MessageDescriptorGetter {
+ static const Descriptor* get() {
+ return T::default_instance().GetDescriptor();
+ }
+};
+template<>
+struct MessageDescriptorGetter<Message> {
+ static const Descriptor* get() {
+ return NULL;
+ }
+};
+
+template<typename T>
+struct RefTypeTraits<
+ T, typename internal::enable_if<internal::is_base_of<Message, T>::value>::type> {
+ typedef RepeatedFieldRefIterator<T> iterator;
+ typedef RepeatedFieldAccessor AccessorType;
+ typedef Message AccessorValueType;
+ typedef const T& IteratorValueType;
+ typedef const T* IteratorPointerType;
+ static const FieldDescriptor::CppType cpp_type =
+ FieldDescriptor::CPPTYPE_MESSAGE;
+ static const Descriptor* GetMessageFieldDescriptor() {
+ return MessageDescriptorGetter<T>::get();
+ }
+};
+} // namespace internal
+} // namespace protobuf
+} // namespace google
+#endif // GOOGLE_PROTOBUF_REPEATED_FIELD_REFLECTION_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/service.h b/darwin-x86_64/protoc/include/google/protobuf/service.h
index cc0b45d..ad6f968 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/service.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/service.h
@@ -74,12 +74,12 @@
//
// To call a remote MyServiceImpl, first you need an RpcChannel connected to it.
// How to construct a channel depends, again, on your RPC implementation.
-// Here we use a hypothentical "MyRpcChannel" as an example:
+// Here we use a hypothetical "MyRpcChannel" as an example:
// MyRpcChannel channel("rpc:hostname:1234/myservice");
// MyRpcController controller;
// MyServiceImpl::Stub stub(&channel);
// FooRequest request;
-// FooRespnose response;
+// FooResponse response;
//
// // ... fill in request ...
//
@@ -102,6 +102,7 @@
#include <string>
#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/callback.h>
namespace google {
namespace protobuf {
diff --git a/darwin-x86_64/protoc/include/google/protobuf/source_context.pb.h b/darwin-x86_64/protoc/include/google/protobuf/source_context.pb.h
new file mode 100644
index 0000000..ccfd365
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/source_context.pb.h
@@ -0,0 +1,186 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/protobuf/source_context.proto
+
+#ifndef PROTOBUF_google_2fprotobuf_2fsource_5fcontext_2eproto__INCLUDED
+#define PROTOBUF_google_2fprotobuf_2fsource_5fcontext_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 3000000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/arena.h>
+#include <google/protobuf/arenastring.h>
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/metadata.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/unknown_field_set.h>
+// @@protoc_insertion_point(includes)
+
+namespace google {
+namespace protobuf {
+
+// Internal implementation detail -- do not call these.
+void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto();
+void protobuf_AssignDesc_google_2fprotobuf_2fsource_5fcontext_2eproto();
+void protobuf_ShutdownFile_google_2fprotobuf_2fsource_5fcontext_2eproto();
+
+class SourceContext;
+
+// ===================================================================
+
+class LIBPROTOBUF_EXPORT SourceContext : public ::google::protobuf::Message {
+ public:
+ SourceContext();
+ virtual ~SourceContext();
+
+ SourceContext(const SourceContext& from);
+
+ inline SourceContext& operator=(const SourceContext& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const SourceContext& default_instance();
+
+ void Swap(SourceContext* other);
+
+ // implements Message ----------------------------------------------
+
+ inline SourceContext* New() const { return New(NULL); }
+
+ SourceContext* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const SourceContext& from);
+ void MergeFrom(const SourceContext& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(SourceContext* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional 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);
+ 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);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.SourceContext)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ bool _is_default_instance_;
+ ::google::protobuf::internal::ArenaStringPtr file_name_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fsource_5fcontext_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fsource_5fcontext_2eproto();
+
+ void InitAsDefaultInstance();
+ static SourceContext* default_instance_;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+#if !PROTOBUF_INLINE_NOT_IN_HEADERS
+// SourceContext
+
+// optional string file_name = 1;
+inline void SourceContext::clear_file_name() {
+ file_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& SourceContext::file_name() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.SourceContext.file_name)
+ return file_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void SourceContext::set_file_name(const ::std::string& value) {
+
+ file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.SourceContext.file_name)
+}
+inline void SourceContext::set_file_name(const char* value) {
+
+ file_name_.SetNoArena(&::google::protobuf::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(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceContext.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());
+}
+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());
+}
+inline void SourceContext::set_allocated_file_name(::std::string* file_name) {
+ if (file_name != NULL) {
+
+ } else {
+
+ }
+ file_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), file_name);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceContext.file_name)
+}
+
+#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace protobuf
+} // namespace google
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_google_2fprotobuf_2fsource_5fcontext_2eproto__INCLUDED
diff --git a/linux-x86_64/protoc/include/google/protobuf/io/strtod.h b/darwin-x86_64/protoc/include/google/protobuf/source_context.proto
similarity index 71%
copy from linux-x86_64/protoc/include/google/protobuf/io/strtod.h
copy to darwin-x86_64/protoc/include/google/protobuf/source_context.proto
index c2efc8d..d76252c 100644
--- a/linux-x86_64/protoc/include/google/protobuf/io/strtod.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/source_context.proto
@@ -28,23 +28,21 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// A locale-independent version of strtod(), used to parse floating
-// point default values in .proto files, where the decimal separator
-// is always a dot.
+syntax = "proto3";
-#ifndef GOOGLE_PROTOBUF_IO_STRTOD_H__
-#define GOOGLE_PROTOBUF_IO_STRTOD_H__
+package google.protobuf;
-namespace google {
-namespace protobuf {
-namespace io {
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "SourceContextProto";
+option java_multiple_files = true;
+option java_generate_equals_and_hash = true;
+option objc_class_prefix = "GPB";
-// A locale-independent version of the standard strtod(), which always
-// uses a dot as the decimal separator.
-double NoLocaleStrtod(const char* str, char** endptr);
-
-} // namespace io
-} // namespace protobuf
-
-} // namespace google
-#endif // GOOGLE_PROTOBUF_IO_STRTOD_H__
+// `SourceContext` represents information about the source of a
+// protobuf element, like the file in which it is defined.
+message SourceContext {
+ // The path-qualified name of the .proto file that contained the associated
+ // protobuf element. For example: `"google/protobuf/source.proto"`.
+ string file_name = 1;
+}
diff --git a/darwin-x86_64/protoc/include/google/protobuf/struct.pb.h b/darwin-x86_64/protoc/include/google/protobuf/struct.pb.h
new file mode 100644
index 0000000..6a4764a
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/struct.pb.h
@@ -0,0 +1,769 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/protobuf/struct.proto
+
+#ifndef PROTOBUF_google_2fprotobuf_2fstruct_2eproto__INCLUDED
+#define PROTOBUF_google_2fprotobuf_2fstruct_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 3000000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/arena.h>
+#include <google/protobuf/arenastring.h>
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/metadata.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/map.h>
+#include <google/protobuf/map_field_inl.h>
+#include <google/protobuf/generated_enum_reflection.h>
+#include <google/protobuf/unknown_field_set.h>
+// @@protoc_insertion_point(includes)
+
+namespace google {
+namespace protobuf {
+
+// Internal implementation detail -- do not call these.
+void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto();
+void protobuf_AssignDesc_google_2fprotobuf_2fstruct_2eproto();
+void protobuf_ShutdownFile_google_2fprotobuf_2fstruct_2eproto();
+
+class ListValue;
+class Struct;
+class Value;
+
+enum NullValue {
+ NULL_VALUE = 0,
+ NullValue_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min,
+ NullValue_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max
+};
+LIBPROTOBUF_EXPORT bool NullValue_IsValid(int value);
+const NullValue NullValue_MIN = NULL_VALUE;
+const NullValue NullValue_MAX = NULL_VALUE;
+const int NullValue_ARRAYSIZE = NullValue_MAX + 1;
+
+LIBPROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* NullValue_descriptor();
+inline const ::std::string& NullValue_Name(NullValue value) {
+ return ::google::protobuf::internal::NameOfEnum(
+ NullValue_descriptor(), value);
+}
+inline bool NullValue_Parse(
+ const ::std::string& name, NullValue* value) {
+ return ::google::protobuf::internal::ParseNamedEnum<NullValue>(
+ NullValue_descriptor(), name, value);
+}
+// ===================================================================
+
+class LIBPROTOBUF_EXPORT Struct : public ::google::protobuf::Message {
+ public:
+ Struct();
+ virtual ~Struct();
+
+ Struct(const Struct& from);
+
+ inline Struct& operator=(const Struct& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const Struct& default_instance();
+
+ void Swap(Struct* other);
+
+ // implements Message ----------------------------------------------
+
+ inline Struct* New() const { return New(NULL); }
+
+ Struct* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const Struct& from);
+ void MergeFrom(const Struct& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(Struct* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+
+ // accessors -------------------------------------------------------
+
+ // map<string, .google.protobuf.Value> fields = 1;
+ int fields_size() const;
+ void clear_fields();
+ static const int kFieldsFieldNumber = 1;
+ const ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >&
+ fields() const;
+ ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >*
+ mutable_fields();
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.Struct)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ bool _is_default_instance_;
+ typedef ::google::protobuf::internal::MapEntryLite<
+ ::std::string, ::google::protobuf::Value,
+ ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
+ ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
+ 0 >
+ Struct_FieldsEntry;
+ ::google::protobuf::internal::MapField<
+ ::std::string, ::google::protobuf::Value,
+ ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
+ ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
+ 0 > fields_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fstruct_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fstruct_2eproto();
+
+ void InitAsDefaultInstance();
+ static Struct* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class LIBPROTOBUF_EXPORT Value : public ::google::protobuf::Message {
+ public:
+ Value();
+ virtual ~Value();
+
+ Value(const Value& from);
+
+ inline Value& operator=(const Value& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const Value& default_instance();
+
+ enum KindCase {
+ kNullValue = 1,
+ kNumberValue = 2,
+ kStringValue = 3,
+ kBoolValue = 4,
+ kStructValue = 5,
+ kListValue = 6,
+ KIND_NOT_SET = 0,
+ };
+
+ void Swap(Value* other);
+
+ // implements Message ----------------------------------------------
+
+ inline Value* New() const { return New(NULL); }
+
+ Value* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const Value& from);
+ void MergeFrom(const Value& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(Value* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional .google.protobuf.NullValue null_value = 1;
+ private:
+ bool has_null_value() const;
+ public:
+ void clear_null_value();
+ static const int kNullValueFieldNumber = 1;
+ ::google::protobuf::NullValue null_value() const;
+ void set_null_value(::google::protobuf::NullValue value);
+
+ // optional double number_value = 2;
+ private:
+ bool has_number_value() const;
+ public:
+ void clear_number_value();
+ static const int kNumberValueFieldNumber = 2;
+ double number_value() const;
+ void set_number_value(double value);
+
+ // optional string string_value = 3;
+ private:
+ bool has_string_value() const;
+ public:
+ void clear_string_value();
+ static const int kStringValueFieldNumber = 3;
+ const ::std::string& string_value() const;
+ void set_string_value(const ::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);
+
+ // optional bool bool_value = 4;
+ private:
+ bool has_bool_value() const;
+ public:
+ void clear_bool_value();
+ static const int kBoolValueFieldNumber = 4;
+ bool bool_value() const;
+ void set_bool_value(bool value);
+
+ // optional .google.protobuf.Struct struct_value = 5;
+ bool has_struct_value() const;
+ void clear_struct_value();
+ static const int kStructValueFieldNumber = 5;
+ const ::google::protobuf::Struct& struct_value() const;
+ ::google::protobuf::Struct* mutable_struct_value();
+ ::google::protobuf::Struct* release_struct_value();
+ void set_allocated_struct_value(::google::protobuf::Struct* struct_value);
+
+ // optional .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* mutable_list_value();
+ ::google::protobuf::ListValue* release_list_value();
+ void set_allocated_list_value(::google::protobuf::ListValue* list_value);
+
+ KindCase kind_case() const;
+ // @@protoc_insertion_point(class_scope:google.protobuf.Value)
+ private:
+ inline void set_has_null_value();
+ inline void set_has_number_value();
+ inline void set_has_string_value();
+ inline void set_has_bool_value();
+ inline void set_has_struct_value();
+ inline void set_has_list_value();
+
+ inline bool has_kind() const;
+ void clear_kind();
+ inline void clear_has_kind();
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ bool _is_default_instance_;
+ union KindUnion {
+ KindUnion() {}
+ int null_value_;
+ double number_value_;
+ ::google::protobuf::internal::ArenaStringPtr string_value_;
+ bool bool_value_;
+ ::google::protobuf::Struct* struct_value_;
+ ::google::protobuf::ListValue* list_value_;
+ } kind_;
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _oneof_case_[1];
+
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fstruct_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fstruct_2eproto();
+
+ void InitAsDefaultInstance();
+ static Value* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class LIBPROTOBUF_EXPORT ListValue : public ::google::protobuf::Message {
+ public:
+ ListValue();
+ virtual ~ListValue();
+
+ ListValue(const ListValue& from);
+
+ inline ListValue& operator=(const ListValue& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const ListValue& default_instance();
+
+ void Swap(ListValue* other);
+
+ // implements Message ----------------------------------------------
+
+ inline ListValue* New() const { return New(NULL); }
+
+ ListValue* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const ListValue& from);
+ void MergeFrom(const ListValue& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(ListValue* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // repeated .google.protobuf.Value values = 1;
+ int values_size() const;
+ void clear_values();
+ static const int kValuesFieldNumber = 1;
+ const ::google::protobuf::Value& values(int index) const;
+ ::google::protobuf::Value* mutable_values(int index);
+ ::google::protobuf::Value* add_values();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >*
+ mutable_values();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >&
+ values() const;
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.ListValue)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ bool _is_default_instance_;
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value > values_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fstruct_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fstruct_2eproto();
+
+ void InitAsDefaultInstance();
+ static ListValue* default_instance_;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+#if !PROTOBUF_INLINE_NOT_IN_HEADERS
+// Struct
+
+// map<string, .google.protobuf.Value> fields = 1;
+inline int Struct::fields_size() const {
+ return fields_.size();
+}
+inline void Struct::clear_fields() {
+ fields_.Clear();
+}
+inline const ::google::protobuf::Map< ::std::string, ::google::protobuf::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 >*
+Struct::mutable_fields() {
+ // @@protoc_insertion_point(field_mutable_map:google.protobuf.Struct.fields)
+ return fields_.MutableMap();
+}
+
+// -------------------------------------------------------------------
+
+// Value
+
+// optional .google.protobuf.NullValue null_value = 1;
+inline bool Value::has_null_value() const {
+ return kind_case() == kNullValue;
+}
+inline void Value::set_has_null_value() {
+ _oneof_case_[0] = kNullValue;
+}
+inline void Value::clear_null_value() {
+ if (has_null_value()) {
+ kind_.null_value_ = 0;
+ clear_has_kind();
+ }
+}
+inline ::google::protobuf::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< ::google::protobuf::NullValue >(0);
+}
+inline void Value::set_null_value(::google::protobuf::NullValue value) {
+ if (!has_null_value()) {
+ clear_kind();
+ set_has_null_value();
+ }
+ kind_.null_value_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.Value.null_value)
+}
+
+// optional double number_value = 2;
+inline bool Value::has_number_value() const {
+ return kind_case() == kNumberValue;
+}
+inline void Value::set_has_number_value() {
+ _oneof_case_[0] = kNumberValue;
+}
+inline void Value::clear_number_value() {
+ if (has_number_value()) {
+ kind_.number_value_ = 0;
+ clear_has_kind();
+ }
+}
+inline double Value::number_value() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Value.number_value)
+ if (has_number_value()) {
+ return kind_.number_value_;
+ }
+ return 0;
+}
+inline void Value::set_number_value(double value) {
+ if (!has_number_value()) {
+ clear_kind();
+ set_has_number_value();
+ }
+ kind_.number_value_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.Value.number_value)
+}
+
+// optional string string_value = 3;
+inline bool Value::has_string_value() const {
+ return kind_case() == kStringValue;
+}
+inline void Value::set_has_string_value() {
+ _oneof_case_[0] = kStringValue;
+}
+inline void Value::clear_string_value() {
+ if (has_string_value()) {
+ kind_.string_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ clear_has_kind();
+ }
+}
+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_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ }
+ return *&::google::protobuf::internal::GetEmptyStringAlreadyInited();
+}
+inline void Value::set_string_value(const ::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_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.Value.string_value)
+}
+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_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(value));
+ // @@protoc_insertion_point(field_set_char:google.protobuf.Value.string_value)
+}
+inline void Value::set_string_value(const char* value, size_t size) {
+ if (!has_string_value()) {
+ clear_kind();
+ set_has_string_value();
+ kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ }
+ kind_.string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
+ reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.Value.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());
+ }
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Value.string_value)
+ return kind_.string_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+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_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ } else {
+ return NULL;
+ }
+}
+inline void Value::set_allocated_string_value(::std::string* string_value) {
+ if (!has_string_value()) {
+ kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ }
+ clear_kind();
+ if (string_value != NULL) {
+ set_has_string_value();
+ kind_.string_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ string_value);
+ }
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.string_value)
+}
+
+// optional bool bool_value = 4;
+inline bool Value::has_bool_value() const {
+ return kind_case() == kBoolValue;
+}
+inline void Value::set_has_bool_value() {
+ _oneof_case_[0] = kBoolValue;
+}
+inline void Value::clear_bool_value() {
+ if (has_bool_value()) {
+ kind_.bool_value_ = false;
+ clear_has_kind();
+ }
+}
+inline bool Value::bool_value() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Value.bool_value)
+ if (has_bool_value()) {
+ return kind_.bool_value_;
+ }
+ return false;
+}
+inline void Value::set_bool_value(bool value) {
+ if (!has_bool_value()) {
+ clear_kind();
+ set_has_bool_value();
+ }
+ kind_.bool_value_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.Value.bool_value)
+}
+
+// optional .google.protobuf.Struct struct_value = 5;
+inline bool Value::has_struct_value() const {
+ return kind_case() == kStructValue;
+}
+inline void Value::set_has_struct_value() {
+ _oneof_case_[0] = kStructValue;
+}
+inline void Value::clear_struct_value() {
+ if (has_struct_value()) {
+ delete kind_.struct_value_;
+ clear_has_kind();
+ }
+}
+inline const ::google::protobuf::Struct& Value::struct_value() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Value.struct_value)
+ return has_struct_value()
+ ? *kind_.struct_value_
+ : ::google::protobuf::Struct::default_instance();
+}
+inline ::google::protobuf::Struct* Value::mutable_struct_value() {
+ if (!has_struct_value()) {
+ clear_kind();
+ set_has_struct_value();
+ kind_.struct_value_ = new ::google::protobuf::Struct;
+ }
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Value.struct_value)
+ return kind_.struct_value_;
+}
+inline ::google::protobuf::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_;
+ kind_.struct_value_ = NULL;
+ return temp;
+ } else {
+ return NULL;
+ }
+}
+inline void Value::set_allocated_struct_value(::google::protobuf::Struct* struct_value) {
+ clear_kind();
+ if (struct_value) {
+ set_has_struct_value();
+ kind_.struct_value_ = struct_value;
+ }
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.struct_value)
+}
+
+// optional .google.protobuf.ListValue list_value = 6;
+inline bool Value::has_list_value() const {
+ return kind_case() == kListValue;
+}
+inline void Value::set_has_list_value() {
+ _oneof_case_[0] = kListValue;
+}
+inline void Value::clear_list_value() {
+ if (has_list_value()) {
+ delete kind_.list_value_;
+ clear_has_kind();
+ }
+}
+inline const ::google::protobuf::ListValue& Value::list_value() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Value.list_value)
+ return has_list_value()
+ ? *kind_.list_value_
+ : ::google::protobuf::ListValue::default_instance();
+}
+inline ::google::protobuf::ListValue* Value::mutable_list_value() {
+ if (!has_list_value()) {
+ clear_kind();
+ set_has_list_value();
+ kind_.list_value_ = new ::google::protobuf::ListValue;
+ }
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Value.list_value)
+ return kind_.list_value_;
+}
+inline ::google::protobuf::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_;
+ kind_.list_value_ = NULL;
+ return temp;
+ } else {
+ return NULL;
+ }
+}
+inline void Value::set_allocated_list_value(::google::protobuf::ListValue* list_value) {
+ clear_kind();
+ if (list_value) {
+ set_has_list_value();
+ kind_.list_value_ = list_value;
+ }
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.list_value)
+}
+
+inline bool Value::has_kind() const {
+ return kind_case() != KIND_NOT_SET;
+}
+inline void Value::clear_has_kind() {
+ _oneof_case_[0] = KIND_NOT_SET;
+}
+inline Value::KindCase Value::kind_case() const {
+ return Value::KindCase(_oneof_case_[0]);
+}
+// -------------------------------------------------------------------
+
+// ListValue
+
+// repeated .google.protobuf.Value values = 1;
+inline int ListValue::values_size() const {
+ return values_.size();
+}
+inline void ListValue::clear_values() {
+ values_.Clear();
+}
+inline const ::google::protobuf::Value& ListValue::values(int index) const {
+ // @@protoc_insertion_point(field_get:google.protobuf.ListValue.values)
+ return values_.Get(index);
+}
+inline ::google::protobuf::Value* ListValue::mutable_values(int index) {
+ // @@protoc_insertion_point(field_mutable:google.protobuf.ListValue.values)
+ return values_.Mutable(index);
+}
+inline ::google::protobuf::Value* ListValue::add_values() {
+ // @@protoc_insertion_point(field_add:google.protobuf.ListValue.values)
+ return values_.Add();
+}
+inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >*
+ListValue::mutable_values() {
+ // @@protoc_insertion_point(field_mutable_list:google.protobuf.ListValue.values)
+ return &values_;
+}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >&
+ListValue::values() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.ListValue.values)
+ return values_;
+}
+
+#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace protobuf
+} // namespace google
+
+#ifndef SWIG
+namespace google {
+namespace protobuf {
+
+template <> struct is_proto_enum< ::google::protobuf::NullValue> : ::google::protobuf::internal::true_type {};
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::NullValue>() {
+ return ::google::protobuf::NullValue_descriptor();
+}
+
+} // namespace protobuf
+} // namespace google
+#endif // SWIG
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_google_2fprotobuf_2fstruct_2eproto__INCLUDED
diff --git a/darwin-x86_64/protoc/include/google/protobuf/struct.proto b/darwin-x86_64/protoc/include/google/protobuf/struct.proto
new file mode 100644
index 0000000..beeba81
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/struct.proto
@@ -0,0 +1,96 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option go_package = "github.com/golang/protobuf/ptypes/struct;structpb";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "StructProto";
+option java_multiple_files = true;
+option java_generate_equals_and_hash = true;
+option objc_class_prefix = "GPB";
+
+
+// `Struct` represents a structured data value, consisting of fields
+// which map to dynamically typed values. In some languages, `Struct`
+// might be supported by a native representation. For example, in
+// scripting languages like JS a struct is represented as an
+// object. The details of that representation are described together
+// with the proto support for the language.
+//
+// The JSON representation for `Struct` is JSON object.
+message Struct {
+ // Unordered map of dynamically typed values.
+ map<string, Value> fields = 1;
+}
+
+// `Value` represents a dynamically typed value which can be either
+// null, a number, a string, a boolean, a recursive struct value, or a
+// list of values. A producer of value is expected to set one of that
+// variants, absence of any variant indicates an error.
+//
+// The JSON representation for `Value` is JSON value.
+message Value {
+ // The kind of value.
+ oneof kind {
+ // Represents a null value.
+ NullValue null_value = 1;
+ // Represents a double value.
+ double number_value = 2;
+ // Represents a string value.
+ string string_value = 3;
+ // Represents a boolean value.
+ bool bool_value = 4;
+ // Represents a structured value.
+ Struct struct_value = 5;
+ // Represents a repeated `Value`.
+ ListValue list_value = 6;
+ }
+}
+
+// `NullValue` is a singleton enumeration to represent the null value for the
+// `Value` type union.
+//
+// The JSON representation for `NullValue` is JSON `null`.
+enum NullValue {
+ // Null value.
+ NULL_VALUE = 0;
+}
+
+// `ListValue` is a wrapper around a repeated field of values.
+//
+// The JSON representation for `ListValue` is JSON array.
+message ListValue {
+ // Repeated field of dynamically typed values.
+ repeated Value values = 1;
+}
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_arm64_gcc.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_arm64_gcc.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_arm64_gcc.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_arm_gcc.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_arm_gcc.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_arm_gcc.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_arm_qnx.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_arm_qnx.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_arm_qnx.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_atomicword_compat.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_atomicword_compat.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_atomicword_compat.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_generic_gcc.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_generic_gcc.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_generic_gcc.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_macosx.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_macosx.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_macosx.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_mips_gcc.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_mips_gcc.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_mips_gcc.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_pnacl.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_pnacl.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_pnacl.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_solaris.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_solaris.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_solaris.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_tsan.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_tsan.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_tsan.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_x86_gcc.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_x86_gcc.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_x86_gcc.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_x86_msvc.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_x86_msvc.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/._atomicops_internals_x86_msvc.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/._common.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/._common.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/._common.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/._once.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/._once.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/._once.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/._platform_macros.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/._platform_macros.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/._platform_macros.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/._stl_util.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/._stl_util.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/._stl_util.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/._template_util.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/._template_util.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/._template_util.h
+++ /dev/null
Binary files differ
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/._type_traits.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/._type_traits.h
deleted file mode 100644
index 7c463b3..0000000
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/._type_traits.h
+++ /dev/null
Binary files differ
diff --git a/linux-x86_64/protoc/include/google/protobuf/io/strtod.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/atomic_sequence_num.h
similarity index 75%
copy from linux-x86_64/protoc/include/google/protobuf/io/strtod.h
copy to darwin-x86_64/protoc/include/google/protobuf/stubs/atomic_sequence_num.h
index c2efc8d..bb20942 100644
--- a/linux-x86_64/protoc/include/google/protobuf/io/strtod.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/atomic_sequence_num.h
@@ -1,5 +1,5 @@
// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
+// Copyright 2014 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
@@ -27,24 +27,28 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#ifndef GOOGLE_PROTOBUF_ATOMIC_SEQUENCE_NUM_H_
+#define GOOGLE_PROTOBUF_ATOMIC_SEQUENCE_NUM_H_
-// A locale-independent version of strtod(), used to parse floating
-// point default values in .proto files, where the decimal separator
-// is always a dot.
-
-#ifndef GOOGLE_PROTOBUF_IO_STRTOD_H__
-#define GOOGLE_PROTOBUF_IO_STRTOD_H__
+#include <google/protobuf/stubs/atomicops.h>
namespace google {
namespace protobuf {
-namespace io {
+namespace internal {
-// A locale-independent version of the standard strtod(), which always
-// uses a dot as the decimal separator.
-double NoLocaleStrtod(const char* str, char** endptr);
+class SequenceNumber {
+ public:
+ SequenceNumber() : word_(0) {}
-} // namespace io
+ AtomicWord GetNext() {
+ return NoBarrier_AtomicIncrement(&word_, 1) - 1;
+ }
+ private:
+ AtomicWord word_;
+};
+
+} // namespace internal
} // namespace protobuf
-
} // namespace google
-#endif // GOOGLE_PROTOBUF_IO_STRTOD_H__
+
+#endif // GOOGLE_PROTOBUF_ATOMIC_SEQUENCE_NUM_H_
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/atomicops.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/atomicops.h
index b1336e3..9b3d1e6 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/atomicops.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/atomicops.h
@@ -56,17 +56,27 @@
// Don't include this file for people not concerned about thread safety.
#ifndef GOOGLE_PROTOBUF_NO_THREAD_SAFETY
+#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/platform_macros.h>
namespace google {
namespace protobuf {
namespace internal {
+#if defined(GOOGLE_PROTOBUF_ARCH_POWER)
+#if defined(_LP64) || defined(__LP64__)
+typedef int32 Atomic32;
+typedef intptr_t Atomic64;
+#else
+typedef intptr_t Atomic32;
+typedef int64 Atomic64;
+#endif
+#else
typedef int32 Atomic32;
#ifdef GOOGLE_PROTOBUF_ARCH_64_BIT
// We need to be able to go between Atomic64 and AtomicWord implicitly. This
// means Atomic64 and AtomicWord should be the same type on 64-bit.
-#if defined(__ILP32__) || defined(GOOGLE_PROTOBUF_OS_NACL) || defined(GOOGLE_PROTOBUF_ARCH_SPARC)
+#if defined(__ILP32__) || defined(GOOGLE_PROTOBUF_OS_NACL)
// NaCl's intptr_t is not actually 64-bits on 64-bit!
// http://code.google.com/p/nativeclient/issues/detail?id=1162
// sparcv9's pointer type is 32bits
@@ -75,6 +85,7 @@
typedef intptr_t Atomic64;
#endif
#endif
+#endif
// Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or
// Atomic64 routines below, depending on your architecture.
@@ -162,7 +173,7 @@
// Include our platform specific implementation.
#define GOOGLE_PROTOBUF_ATOMICOPS_ERROR \
-#error "Atomic operations are not supported on your platform"
+"Atomic operations are not supported on your platform"
// ThreadSanitizer, http://clang.llvm.org/docs/ThreadSanitizer.html.
#if defined(THREAD_SANITIZER)
@@ -172,13 +183,17 @@
#if defined(GOOGLE_PROTOBUF_ARCH_IA32) || defined(GOOGLE_PROTOBUF_ARCH_X64)
#include <google/protobuf/stubs/atomicops_internals_x86_msvc.h>
#else
-GOOGLE_PROTOBUF_ATOMICOPS_ERROR
+#error GOOGLE_PROTOBUF_ATOMICOPS_ERROR
#endif
// Solaris
#elif defined(GOOGLE_PROTOBUF_OS_SOLARIS)
#include <google/protobuf/stubs/atomicops_internals_solaris.h>
+// AIX
+#elif defined(GOOGLE_PROTOBUF_OS_AIX)
+#include <google/protobuf/stubs/atomicops_internals_power.h>
+
// Apple.
#elif defined(GOOGLE_PROTOBUF_OS_APPLE)
#include <google/protobuf/stubs/atomicops_internals_macosx.h>
@@ -195,23 +210,27 @@
#include <google/protobuf/stubs/atomicops_internals_arm_qnx.h>
#elif defined(GOOGLE_PROTOBUF_ARCH_MIPS) || defined(GOOGLE_PROTOBUF_ARCH_MIPS64)
#include <google/protobuf/stubs/atomicops_internals_mips_gcc.h>
+#elif defined(GOOGLE_PROTOBUF_ARCH_POWER)
+#include <google/protobuf/stubs/atomicops_internals_power.h>
#elif defined(__native_client__)
#include <google/protobuf/stubs/atomicops_internals_pnacl.h>
+#elif defined(GOOGLE_PROTOBUF_ARCH_PPC)
+#include <google/protobuf/stubs/atomicops_internals_ppc_gcc.h>
#elif (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4))
#include <google/protobuf/stubs/atomicops_internals_generic_gcc.h>
#elif defined(__clang__)
#if __has_extension(c_atomic)
#include <google/protobuf/stubs/atomicops_internals_generic_gcc.h>
#else
-GOOGLE_PROTOBUF_ATOMICOPS_ERROR
+#error GOOGLE_PROTOBUF_ATOMICOPS_ERROR
#endif
#else
-GOOGLE_PROTOBUF_ATOMICOPS_ERROR
+#error GOOGLE_PROTOBUF_ATOMICOPS_ERROR
#endif
// Unknown.
#else
-GOOGLE_PROTOBUF_ATOMICOPS_ERROR
+#error GOOGLE_PROTOBUF_ATOMICOPS_ERROR
#endif
// On some platforms we need additional declarations to make AtomicWord
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_generic_gcc.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_generic_gcc.h
index dd7abf6..a0116a6 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_generic_gcc.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_generic_gcc.h
@@ -61,8 +61,8 @@
inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value) {
- __atomic_compare_exchange(ptr, &old_value, &new_value, true,
- __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);
+ __atomic_compare_exchange_n(ptr, &old_value, new_value, true,
+ __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);
return old_value;
}
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_mips_gcc.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_mips_gcc.h
index e3cd14c..f5837c9 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_mips_gcc.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_mips_gcc.h
@@ -65,7 +65,7 @@
"2:\n"
".set pop\n"
: "=&r" (prev), "=m" (*ptr), "=&r" (tmp)
- : "Ir" (old_value), "r" (new_value), "m" (*ptr)
+ : "r" (old_value), "r" (new_value), "m" (*ptr)
: "memory");
return prev;
}
@@ -197,7 +197,7 @@
"2:\n"
".set pop\n"
: "=&r" (prev), "=m" (*ptr), "=&r" (tmp)
- : "Ir" (old_value), "r" (new_value), "m" (*ptr)
+ : "r" (old_value), "r" (new_value), "m" (*ptr)
: "memory");
return prev;
}
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_pnacl.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_pnacl.h
index b10ac02..3b314fd 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_pnacl.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_pnacl.h
@@ -33,39 +33,197 @@
#ifndef GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_PNACL_H_
#define GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_PNACL_H_
+#include <atomic>
+
namespace google {
namespace protobuf {
namespace internal {
+// This implementation is transitional and maintains the original API for
+// atomicops.h. This requires casting memory locations to the atomic types, and
+// assumes that the API and the C++11 implementation are layout-compatible,
+// which isn't true for all implementations or hardware platforms. The static
+// assertion should detect this issue, were it to fire then this header
+// shouldn't be used.
+//
+// TODO(jfb) If this header manages to stay committed then the API should be
+// modified, and all call sites updated.
+typedef volatile std::atomic<Atomic32>* AtomicLocation32;
+static_assert(sizeof(*(AtomicLocation32) nullptr) == sizeof(Atomic32),
+ "incompatible 32-bit atomic layout");
+
+inline void MemoryBarrier() {
+#if defined(__GLIBCXX__)
+ // Work around libstdc++ bug 51038 where atomic_thread_fence was declared but
+ // not defined, leading to the linker complaining about undefined references.
+ __atomic_thread_fence(std::memory_order_seq_cst);
+#else
+ std::atomic_thread_fence(std::memory_order_seq_cst);
+#endif
+}
+
inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value) {
- return __sync_val_compare_and_swap(ptr, old_value, new_value);
+ ((AtomicLocation32)ptr)
+ ->compare_exchange_strong(old_value,
+ new_value,
+ std::memory_order_relaxed,
+ std::memory_order_relaxed);
+ return old_value;
}
-inline void MemoryBarrier() {
- __sync_synchronize();
+inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
+ Atomic32 new_value) {
+ return ((AtomicLocation32)ptr)
+ ->exchange(new_value, std::memory_order_relaxed);
+}
+
+inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
+ Atomic32 increment) {
+ return increment +
+ ((AtomicLocation32)ptr)
+ ->fetch_add(increment, std::memory_order_relaxed);
+}
+
+inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
+ Atomic32 increment) {
+ return increment + ((AtomicLocation32)ptr)->fetch_add(increment);
}
inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value) {
- Atomic32 ret = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
+ ((AtomicLocation32)ptr)
+ ->compare_exchange_strong(old_value,
+ new_value,
+ std::memory_order_acquire,
+ std::memory_order_acquire);
+ return old_value;
+}
+
+inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
+ Atomic32 old_value,
+ Atomic32 new_value) {
+ ((AtomicLocation32)ptr)
+ ->compare_exchange_strong(old_value,
+ new_value,
+ std::memory_order_release,
+ std::memory_order_relaxed);
+ return old_value;
+}
+
+inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
+ ((AtomicLocation32)ptr)->store(value, std::memory_order_relaxed);
+}
+
+inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
+ ((AtomicLocation32)ptr)->store(value, std::memory_order_relaxed);
MemoryBarrier();
- return ret;
}
inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
- MemoryBarrier();
- *ptr = value;
+ ((AtomicLocation32)ptr)->store(value, std::memory_order_release);
+}
+
+inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
+ return ((AtomicLocation32)ptr)->load(std::memory_order_relaxed);
}
inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
- Atomic32 value = *ptr;
- MemoryBarrier();
- return value;
+ return ((AtomicLocation32)ptr)->load(std::memory_order_acquire);
}
+inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
+ MemoryBarrier();
+ return ((AtomicLocation32)ptr)->load(std::memory_order_relaxed);
+}
+
+#if defined(GOOGLE_PROTOBUF_ARCH_64_BIT)
+
+typedef volatile std::atomic<Atomic64>* AtomicLocation64;
+static_assert(sizeof(*(AtomicLocation64) nullptr) == sizeof(Atomic64),
+ "incompatible 64-bit atomic layout");
+
+inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
+ Atomic64 old_value,
+ Atomic64 new_value) {
+ ((AtomicLocation64)ptr)
+ ->compare_exchange_strong(old_value,
+ new_value,
+ std::memory_order_relaxed,
+ std::memory_order_relaxed);
+ return old_value;
+}
+
+inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr,
+ Atomic64 new_value) {
+ return ((AtomicLocation64)ptr)
+ ->exchange(new_value, std::memory_order_relaxed);
+}
+
+inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,
+ Atomic64 increment) {
+ return increment +
+ ((AtomicLocation64)ptr)
+ ->fetch_add(increment, std::memory_order_relaxed);
+}
+
+inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,
+ Atomic64 increment) {
+ return increment + ((AtomicLocation64)ptr)->fetch_add(increment);
+}
+
+inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
+ Atomic64 old_value,
+ Atomic64 new_value) {
+ ((AtomicLocation64)ptr)
+ ->compare_exchange_strong(old_value,
+ new_value,
+ std::memory_order_acquire,
+ std::memory_order_acquire);
+ return old_value;
+}
+
+inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
+ Atomic64 old_value,
+ Atomic64 new_value) {
+ ((AtomicLocation64)ptr)
+ ->compare_exchange_strong(old_value,
+ new_value,
+ std::memory_order_release,
+ std::memory_order_relaxed);
+ return old_value;
+}
+
+inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
+ ((AtomicLocation64)ptr)->store(value, std::memory_order_relaxed);
+}
+
+inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
+ ((AtomicLocation64)ptr)->store(value, std::memory_order_relaxed);
+ MemoryBarrier();
+}
+
+inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
+ ((AtomicLocation64)ptr)->store(value, std::memory_order_release);
+}
+
+inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
+ return ((AtomicLocation64)ptr)->load(std::memory_order_relaxed);
+}
+
+inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
+ return ((AtomicLocation64)ptr)->load(std::memory_order_acquire);
+}
+
+inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
+ MemoryBarrier();
+ return ((AtomicLocation64)ptr)->load(std::memory_order_relaxed);
+}
+
+#endif // defined(GOOGLE_PROTOBUF_ARCH_64_BIT)
+
} // namespace internal
} // namespace protobuf
} // namespace google
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_power.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_power.h
new file mode 100644
index 0000000..b8a42f2
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_power.h
@@ -0,0 +1,440 @@
+// Copyright 2014 Bloomberg Finance LP. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Bloomberg Finance LP. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// This file is an internal atomic implementation, use atomicops.h instead.
+
+#ifndef GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_AIX_H_
+#define GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_AIX_H_
+
+namespace google {
+namespace protobuf {
+namespace internal {
+
+inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
+ Atomic32 old_value,
+ Atomic32 new_value) {
+ Atomic32 result;
+
+ asm volatile (
+ "1: lwarx %[res], %[zero], %[obj] \n\t" // load and reserve
+ " cmpw %[cmp], %[res] \n\t" // compare values
+ " bne- 2f \n\t"
+ " stwcx. %[val], %[zero], %[obj] \n\t" // store new value
+ " bne- 1b \n\t"
+ "2: \n\t"
+ : [res] "=&b" (result)
+ : [obj] "b" (ptr),
+ [cmp] "b" (old_value),
+ [val] "b" (new_value),
+ [zero] "i" (0)
+ : "cr0", "ctr");
+
+ return result;
+}
+
+inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
+ Atomic32 new_value) {
+ Atomic32 result;
+
+ asm volatile (
+ "1: lwarx %[res], %[zero], %[obj] \n\t"
+ " stwcx. %[val], %[zero], %[obj] \n\t"
+ " bne- 1b \n\t"
+ : [res] "=&b" (result)
+ : [obj] "b" (ptr),
+ [val] "b" (new_value),
+ [zero] "i" (0)
+ : "cr0", "ctr");
+
+ return result;
+}
+
+inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
+ Atomic32 increment) {
+ Atomic32 result;
+
+ asm volatile (
+ "1: lwarx %[res], %[zero], %[obj] \n\t" // load and reserve
+ " add %[res], %[val], %[res] \n\t" // add the operand
+ " stwcx. %[res], %[zero], %[obj] \n\t" // store old value
+ // if still reserved
+ " bne- 1b \n\t"
+ : [res] "=&b" (result)
+ : [obj] "b" (ptr),
+ [val] "b" (increment),
+ [zero] "i" (0)
+ : "cr0", "ctr");
+
+ return result;
+}
+
+inline void MemoryBarrier(void) {
+ asm volatile (
+ " lwsync \n\t"
+ " isync \n\t"
+ :
+ :
+ : "memory");
+}
+
+inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
+ Atomic32 increment) {
+ Atomic32 result;
+
+ asm volatile (
+ " lwsync \n\t"
+
+ "1: lwarx %[res], %[zero], %[obj] \n\t" // load and reserve
+ " add %[res], %[val], %[res] \n\t" // add the operand
+ " stwcx. %[res], %[zero], %[obj] \n\t" // store old value
+ // if still reserved
+ " bne- 1b \n\t"
+ " isync \n\t"
+ : [res] "=&b" (result)
+ : [obj] "b" (ptr),
+ [val] "b" (increment),
+ [zero] "i" (0)
+ : "cr0", "ctr");
+
+ return result;
+}
+
+inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
+ Atomic32 old_value,
+ Atomic32 new_value) {
+ Atomic32 result;
+
+ asm volatile (
+ "1: lwarx %[res], %[zero], %[obj] \n\t" // load and reserve
+ " cmpw %[cmp], %[res] \n\t" // compare values
+ " bne- 2f \n\t"
+ " stwcx. %[val], %[zero], %[obj] \n\t" // store new value
+ " bne- 1b \n\t"
+
+ " isync \n\t"
+ "2: \n\t"
+ : [res] "=&b" (result)
+ : [obj] "b" (ptr),
+ [cmp] "b" (old_value),
+ [val] "b" (new_value),
+ [zero] "i" (0)
+ : "cr0", "ctr");
+
+ return result;
+}
+
+inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
+ Atomic32 old_value,
+ Atomic32 new_value) {
+ Atomic32 result;
+
+ asm volatile (
+ " lwsync \n\t"
+
+ "1: lwarx %[res], %[zero], %[obj] \n\t" // load and reserve
+ " cmpw %[cmp], %[res] \n\t" // compare values
+ " bne- 2f \n\t"
+ " stwcx. %[val], %[zero], %[obj] \n\t" // store new value
+ " bne- 1b \n\t"
+
+ "2: \n\t"
+ : [res] "=&b" (result)
+ : [obj] "b" (ptr),
+ [cmp] "b" (old_value),
+ [val] "b" (new_value),
+ [zero] "i" (0)
+ : "cr0", "ctr");
+
+ return result;
+}
+
+inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
+ *ptr = value;
+}
+
+inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
+ asm volatile (
+ " stw %[val], %[obj] \n\t"
+ " isync \n\t"
+ : [obj] "=m" (*ptr)
+ : [val] "b" (value));
+}
+
+inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
+ asm volatile (
+ " lwsync \n\t"
+ " stw %[val], %[obj] \n\t"
+ : [obj] "=m" (*ptr)
+ : [val] "b" (value));
+}
+
+inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
+ return *ptr;
+}
+
+inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
+ Atomic32 result;
+
+ asm volatile (
+ "1: lwz %[res], %[obj] \n\t"
+ " cmpw %[res], %[res] \n\t" // create data
+ // dependency for
+ // load/load ordering
+ " bne- 1b \n\t" // never taken
+
+ " isync \n\t"
+ : [res] "=b" (result)
+ : [obj] "m" (*ptr),
+ [zero] "i" (0)
+ : "cr0", "ctr");
+
+ return result;
+}
+
+inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
+ Atomic32 result;
+
+ asm volatile (
+ " lwsync \n\t"
+
+ "1: lwz %[res], %[obj] \n\t"
+ " cmpw %[res], %[res] \n\t" // create data
+ // dependency for
+ // load/load ordering
+ " bne- 1b \n\t" // never taken
+ : [res] "=b" (result)
+ : [obj] "m" (*ptr),
+ [zero] "i" (0)
+ : "cr0", "ctr");
+
+ return result;
+}
+
+#ifdef GOOGLE_PROTOBUF_ARCH_64_BIT
+inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
+ Atomic64 old_value,
+ Atomic64 new_value) {
+ Atomic64 result;
+
+ asm volatile (
+ "1: ldarx %[res], %[zero], %[obj] \n\t" // load and reserve
+ " cmpd %[cmp], %[res] \n\t" // compare values
+ " bne- 2f \n\t"
+
+ " stdcx. %[val], %[zero], %[obj] \n\t" // store the new value
+ " bne- 1b \n\t"
+ "2: \n\t"
+ : [res] "=&b" (result)
+ : [obj] "b" (ptr),
+ [cmp] "b" (old_value),
+ [val] "b" (new_value),
+ [zero] "i" (0)
+ : "cr0", "ctr");
+
+ return result;
+}
+
+inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr,
+ Atomic64 new_value) {
+ Atomic64 result;
+
+ asm volatile (
+ "1: ldarx %[res], %[zero], %[obj] \n\t"
+ " stdcx. %[val], %[zero], %[obj] \n\t"
+ " bne- 1b \n\t"
+ : [res] "=&b" (result)
+ : [obj] "b" (ptr),
+ [val] "b" (new_value),
+ [zero] "i" (0)
+ : "cr0", "ctr");
+
+ return result;
+}
+
+inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,
+ Atomic64 increment) {
+ Atomic64 result;
+
+ asm volatile (
+ "1: ldarx %[res], %[zero], %[obj] \n\t" // load and reserve
+ " add %[res], %[res], %[val] \n\t" // add the operand
+ " stdcx. %[res], %[zero], %[obj] \n\t" // store old value if
+ // still reserved
+
+ " bne- 1b \n\t"
+ : [res] "=&b" (result)
+ : [obj] "b" (ptr),
+ [val] "b" (increment),
+ [zero] "i" (0)
+ : "cr0", "ctr");
+
+ return result;
+}
+
+inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,
+ Atomic64 increment) {
+
+ Atomic64 result;
+
+ asm volatile (
+ " lwsync \n\t"
+
+ "1: ldarx %[res], %[zero], %[obj] \n\t" // load and reserve
+ " add %[res], %[res], %[val] \n\t" // add the operand
+ " stdcx. %[res], %[zero], %[obj] \n\t" // store old value if
+ // still reserved
+
+ " bne- 1b \n\t"
+
+ " isync \n\t"
+ : [res] "=&b" (result)
+ : [obj] "b" (ptr),
+ [val] "b" (increment),
+ [zero] "i" (0)
+ : "cr0", "ctr");
+
+ return result;
+}
+
+inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
+ Atomic64 old_value,
+ Atomic64 new_value) {
+ Atomic64 result;
+
+ asm volatile (
+ "1: ldarx %[res], %[zero], %[obj] \n\t" // load and reserve
+ " cmpd %[cmp], %[res] \n\t" // compare values
+ " bne- 2f \n\t"
+
+ " stdcx. %[val], %[zero], %[obj] \n\t" // store the new value
+ " bne- 1b \n\t"
+ " isync \n\t"
+ "2: \n\t"
+ : [res] "=&b" (result)
+ : [obj] "b" (ptr),
+ [cmp] "b" (old_value),
+ [val] "b" (new_value),
+ [zero] "i" (0)
+ : "cr0", "ctr");
+
+ return result;
+}
+
+inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
+ Atomic64 old_value,
+ Atomic64 new_value) {
+ Atomic64 result;
+
+ asm volatile (
+ " lwsync \n\t"
+
+ "1: ldarx %[res], %[zero], %[obj] \n\t" // load and reserve
+ " cmpd %[cmp], %[res] \n\t" // compare values
+ " bne- 2f \n\t"
+
+ " stdcx. %[val], %[zero], %[obj] \n\t" // store the new value
+ " bne- 1b \n\t"
+ "2: \n\t"
+ : [res] "=&b" (result)
+ : [obj] "b" (ptr),
+ [cmp] "b" (old_value),
+ [val] "b" (new_value),
+ [zero] "i" (0)
+ : "cr0", "ctr");
+
+ return result;
+}
+
+inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
+ *ptr = value;
+}
+
+inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
+ asm volatile (
+ " std %[val], %[obj] \n\t"
+ " isync \n\t"
+ : [obj] "=m" (*ptr)
+ : [val] "b" (value));
+}
+
+inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
+ asm volatile (
+ " lwsync \n\t"
+ " std %[val], %[obj] \n\t"
+ : [obj] "=m" (*ptr)
+ : [val] "b" (value));
+}
+
+inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
+ return *ptr;
+}
+
+inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
+ Atomic64 result;
+
+ asm volatile (
+ "1: ld %[res], %[obj] \n\t"
+ " cmpd %[res], %[res] \n\t" // create data
+ // dependency for
+ // load/load ordering
+ " bne- 1b \n\t" // never taken
+
+ " isync \n\t"
+ : [res] "=b" (result)
+ : [obj] "m" (*ptr),
+ [zero] "i" (0)
+ : "cr0", "ctr");
+
+ return result;
+}
+
+inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
+ Atomic64 result;
+
+ asm volatile (
+ " lwsync \n\t"
+
+ "1: ld %[res], %[obj] \n\t"
+ " cmpd %[res], %[res] \n\t" // create data
+ // dependency for
+ // load/load ordering
+ " bne- 1b \n\t" // never taken
+ : [res] "=b" (result)
+ : [obj] "m" (*ptr),
+ [zero] "i" (0)
+ : "cr0", "ctr");
+
+ return result;
+}
+#endif
+
+} // namespace internal
+} // namespace protobuf
+} // namespace google
+
+#endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_SPARC_GCC_H_
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/bytestream.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/bytestream.h
new file mode 100644
index 0000000..de8e020
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/bytestream.h
@@ -0,0 +1,348 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// This file declares the ByteSink and ByteSource abstract interfaces. These
+// interfaces represent objects that consume (ByteSink) or produce (ByteSource)
+// a sequence of bytes. Using these abstract interfaces in your APIs can help
+// make your code work with a variety of input and output types.
+//
+// This file also declares the following commonly used implementations of these
+// interfaces.
+//
+// ByteSink:
+// UncheckedArrayByteSink Writes to an array, without bounds checking
+// CheckedArrayByteSink Writes to an array, with bounds checking
+// GrowingArrayByteSink Allocates and writes to a growable buffer
+// StringByteSink Writes to an STL string
+// NullByteSink Consumes a never-ending stream of bytes
+//
+// ByteSource:
+// ArrayByteSource Reads from an array or string/StringPiece
+// LimitedByteSource Limits the number of bytes read from an
+
+#ifndef GOOGLE_PROTOBUF_STUBS_BYTESTREAM_H_
+#define GOOGLE_PROTOBUF_STUBS_BYTESTREAM_H_
+
+#include <stddef.h>
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/stringpiece.h>
+
+class CordByteSink;
+class MemBlock;
+
+namespace google {
+namespace protobuf {
+namespace strings {
+
+// An abstract interface for an object that consumes a sequence of bytes. This
+// interface offers 3 different ways to append data, and a Flush() function.
+//
+// Example:
+//
+// string my_data;
+// ...
+// ByteSink* sink = ...
+// sink->Append(my_data.data(), my_data.size());
+// sink->Flush();
+//
+class LIBPROTOBUF_EXPORT ByteSink {
+ public:
+ ByteSink() {}
+ virtual ~ByteSink() {}
+
+ // Appends the "n" bytes starting at "bytes".
+ virtual void Append(const char* bytes, size_t n) = 0;
+
+ // Flushes internal buffers. The default implemenation does nothing. ByteSink
+ // subclasses may use internal buffers that require calling Flush() at the end
+ // of the stream.
+ virtual void Flush();
+
+ private:
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ByteSink);
+};
+
+// An abstract interface for an object that produces a fixed-size sequence of
+// bytes.
+//
+// Example:
+//
+// ByteSource* source = ...
+// while (source->Available() > 0) {
+// StringPiece data = source->Peek();
+// ... do something with "data" ...
+// source->Skip(data.length());
+// }
+//
+class LIBPROTOBUF_EXPORT ByteSource {
+ public:
+ ByteSource() {}
+ virtual ~ByteSource() {}
+
+ // Returns the number of bytes left to read from the source. Available()
+ // should decrease by N each time Skip(N) is called. Available() may not
+ // increase. Available() returning 0 indicates that the ByteSource is
+ // exhausted.
+ //
+ // Note: Size() may have been a more appropriate name as it's more
+ // indicative of the fixed-size nature of a ByteSource.
+ virtual size_t Available() const = 0;
+
+ // Returns a StringPiece of the next contiguous region of the source. Does not
+ // reposition the source. The returned region is empty iff Available() == 0.
+ //
+ // The returned region is valid until the next call to Skip() or until this
+ // object is destroyed, whichever occurs first.
+ //
+ // The length of the returned StringPiece will be <= Available().
+ virtual StringPiece Peek() = 0;
+
+ // Skips the next n bytes. Invalidates any StringPiece returned by a previous
+ // call to Peek().
+ //
+ // REQUIRES: Available() >= n
+ virtual void Skip(size_t n) = 0;
+
+ // Writes the next n bytes in this ByteSource to the given ByteSink, and
+ // advances this ByteSource past the copied bytes. The default implementation
+ // of this method just copies the bytes normally, but subclasses might
+ // override CopyTo to optimize certain cases.
+ //
+ // REQUIRES: Available() >= n
+ virtual void CopyTo(ByteSink* sink, size_t n);
+
+ private:
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ByteSource);
+};
+
+//
+// Some commonly used implementations of ByteSink
+//
+
+// Implementation of ByteSink that writes to an unsized byte array. No
+// bounds-checking is performed--it is the caller's responsibility to ensure
+// that the destination array is large enough.
+//
+// Example:
+//
+// char buf[10];
+// UncheckedArrayByteSink sink(buf);
+// sink.Append("hi", 2); // OK
+// sink.Append(data, 100); // WOOPS! Overflows buf[10].
+//
+class LIBPROTOBUF_EXPORT UncheckedArrayByteSink : public ByteSink {
+ public:
+ explicit UncheckedArrayByteSink(char* dest) : dest_(dest) {}
+ virtual void Append(const char* data, size_t n);
+
+ // Returns the current output pointer so that a caller can see how many bytes
+ // were produced.
+ //
+ // Note: this method is not part of the ByteSink interface.
+ char* CurrentDestination() const { return dest_; }
+
+ private:
+ char* dest_;
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(UncheckedArrayByteSink);
+};
+
+// Implementation of ByteSink that writes to a sized byte array. This sink will
+// not write more than "capacity" bytes to outbuf. Once "capacity" bytes are
+// appended, subsequent bytes will be ignored and Overflowed() will return true.
+// Overflowed() does not cause a runtime error (i.e., it does not CHECK fail).
+//
+// Example:
+//
+// char buf[10];
+// CheckedArrayByteSink sink(buf, 10);
+// sink.Append("hi", 2); // OK
+// sink.Append(data, 100); // Will only write 8 more bytes
+//
+class LIBPROTOBUF_EXPORT CheckedArrayByteSink : public ByteSink {
+ public:
+ CheckedArrayByteSink(char* outbuf, size_t capacity);
+ virtual void Append(const char* bytes, size_t n);
+
+ // Returns the number of bytes actually written to the sink.
+ size_t NumberOfBytesWritten() const { return size_; }
+
+ // Returns true if any bytes were discarded, i.e., if there was an
+ // attempt to write more than 'capacity' bytes.
+ bool Overflowed() const { return overflowed_; }
+
+ private:
+ char* outbuf_;
+ const size_t capacity_;
+ size_t size_;
+ bool overflowed_;
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CheckedArrayByteSink);
+};
+
+// Implementation of ByteSink that allocates an internal buffer (a char array)
+// and expands it as needed to accomodate appended data (similar to a string),
+// and allows the caller to take ownership of the internal buffer via the
+// GetBuffer() method. The buffer returned from GetBuffer() must be deleted by
+// the caller with delete[]. GetBuffer() also sets the internal buffer to be
+// empty, and subsequent appends to the sink will create a new buffer. The
+// destructor will free the internal buffer if GetBuffer() was not called.
+//
+// Example:
+//
+// GrowingArrayByteSink sink(10);
+// sink.Append("hi", 2);
+// sink.Append(data, n);
+// const char* buf = sink.GetBuffer(); // Ownership transferred
+// delete[] buf;
+//
+class LIBPROTOBUF_EXPORT GrowingArrayByteSink : public strings::ByteSink {
+ public:
+ explicit GrowingArrayByteSink(size_t estimated_size);
+ virtual ~GrowingArrayByteSink();
+ virtual void Append(const char* bytes, size_t n);
+
+ // Returns the allocated buffer, and sets nbytes to its size. The caller takes
+ // ownership of the buffer and must delete it with delete[].
+ char* GetBuffer(size_t* nbytes);
+
+ private:
+ void Expand(size_t amount);
+ void ShrinkToFit();
+
+ size_t capacity_;
+ char* buf_;
+ size_t size_;
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(GrowingArrayByteSink);
+};
+
+// Implementation of ByteSink that appends to the given string.
+// Existing contents of "dest" are not modified; new data is appended.
+//
+// Example:
+//
+// string dest = "Hello ";
+// StringByteSink sink(&dest);
+// sink.Append("World", 5);
+// assert(dest == "Hello World");
+//
+class LIBPROTOBUF_EXPORT StringByteSink : public ByteSink {
+ public:
+ explicit StringByteSink(string* dest) : dest_(dest) {}
+ virtual void Append(const char* data, size_t n);
+
+ private:
+ string* dest_;
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(StringByteSink);
+};
+
+// Implementation of ByteSink that discards all data.
+//
+// Example:
+//
+// NullByteSink sink;
+// sink.Append(data, data.size()); // All data ignored.
+//
+class LIBPROTOBUF_EXPORT NullByteSink : public ByteSink {
+ public:
+ NullByteSink() {}
+ virtual void Append(const char *data, size_t n) {}
+
+ private:
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(NullByteSink);
+};
+
+//
+// Some commonly used implementations of ByteSource
+//
+
+// Implementation of ByteSource that reads from a StringPiece.
+//
+// Example:
+//
+// string data = "Hello";
+// ArrayByteSource source(data);
+// assert(source.Available() == 5);
+// assert(source.Peek() == "Hello");
+//
+class LIBPROTOBUF_EXPORT ArrayByteSource : public ByteSource {
+ public:
+ explicit ArrayByteSource(StringPiece s) : input_(s) {}
+
+ virtual size_t Available() const;
+ virtual StringPiece Peek();
+ virtual void Skip(size_t n);
+
+ private:
+ StringPiece input_;
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ArrayByteSource);
+};
+
+// Implementation of ByteSource that wraps another ByteSource, limiting the
+// number of bytes returned.
+//
+// The caller maintains ownership of the underlying source, and may not use the
+// underlying source while using the LimitByteSource object. The underlying
+// source's pointer is advanced by n bytes every time this LimitByteSource
+// object is advanced by n.
+//
+// Example:
+//
+// string data = "Hello World";
+// ArrayByteSource abs(data);
+// assert(abs.Available() == data.size());
+//
+// LimitByteSource limit(abs, 5);
+// assert(limit.Available() == 5);
+// assert(limit.Peek() == "Hello");
+//
+class LIBPROTOBUF_EXPORT LimitByteSource : public ByteSource {
+ public:
+ // Returns at most "limit" bytes from "source".
+ LimitByteSource(ByteSource* source, size_t limit);
+
+ virtual size_t Available() const;
+ virtual StringPiece Peek();
+ virtual void Skip(size_t n);
+
+ // We override CopyTo so that we can forward to the underlying source, in
+ // case it has an efficient implementation of CopyTo.
+ virtual void CopyTo(ByteSink* sink, size_t n);
+
+ private:
+ ByteSource* source_;
+ size_t limit_;
+};
+
+} // namespace strings
+} // namespace protobuf
+} // namespace google
+
+#endif // GOOGLE_PROTOBUF_STUBS_BYTESTREAM_H_
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/callback.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/callback.h
new file mode 100644
index 0000000..87271c5
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/callback.h
@@ -0,0 +1,546 @@
+#ifndef GOOGLE_PROTOBUF_STUBS_CALLBACK_H_
+#define GOOGLE_PROTOBUF_STUBS_CALLBACK_H_
+
+#include <google/protobuf/stubs/macros.h>
+#include <google/protobuf/stubs/type_traits.h>
+
+// ===================================================================
+// emulates google3/base/callback.h
+
+namespace google {
+namespace protobuf {
+
+// Abstract interface for a callback. When calling an RPC, you must provide
+// a Closure to call when the procedure completes. See the Service interface
+// in service.h.
+//
+// To automatically construct a Closure which calls a particular function or
+// method with a particular set of parameters, use the NewCallback() function.
+// Example:
+// void FooDone(const FooResponse* response) {
+// ...
+// }
+//
+// void CallFoo() {
+// ...
+// // When done, call FooDone() and pass it a pointer to the response.
+// Closure* callback = NewCallback(&FooDone, response);
+// // Make the call.
+// service->Foo(controller, request, response, callback);
+// }
+//
+// Example that calls a method:
+// class Handler {
+// public:
+// ...
+//
+// void FooDone(const FooResponse* response) {
+// ...
+// }
+//
+// void CallFoo() {
+// ...
+// // When done, call FooDone() and pass it a pointer to the response.
+// Closure* callback = NewCallback(this, &Handler::FooDone, response);
+// // Make the call.
+// service->Foo(controller, request, response, callback);
+// }
+// };
+//
+// Currently NewCallback() supports binding zero, one, or two arguments.
+//
+// Callbacks created with NewCallback() automatically delete themselves when
+// executed. They should be used when a callback is to be called exactly
+// once (usually the case with RPC callbacks). If a callback may be called
+// a different number of times (including zero), create it with
+// NewPermanentCallback() instead. You are then responsible for deleting the
+// callback (using the "delete" keyword as normal).
+//
+// Note that NewCallback() is a bit touchy regarding argument types. Generally,
+// the values you provide for the parameter bindings must exactly match the
+// types accepted by the callback function. For example:
+// void Foo(string s);
+// NewCallback(&Foo, "foo"); // WON'T WORK: const char* != string
+// NewCallback(&Foo, string("foo")); // WORKS
+// Also note that the arguments cannot be references:
+// void Foo(const string& s);
+// string my_str;
+// NewCallback(&Foo, my_str); // WON'T WORK: Can't use referecnes.
+// However, correctly-typed pointers will work just fine.
+class LIBPROTOBUF_EXPORT Closure {
+ public:
+ Closure() {}
+ virtual ~Closure();
+
+ virtual void Run() = 0;
+
+ private:
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Closure);
+};
+
+template<typename R>
+class ResultCallback {
+ public:
+ ResultCallback() {}
+ virtual ~ResultCallback() {}
+
+ virtual R Run() = 0;
+
+ private:
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ResultCallback);
+};
+
+template<typename R, typename A1>
+class LIBPROTOBUF_EXPORT ResultCallback1 {
+ public:
+ ResultCallback1() {}
+ virtual ~ResultCallback1() {}
+
+ virtual R Run(A1) = 0;
+
+ private:
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ResultCallback1);
+};
+
+template<typename R, typename A1, typename A2>
+class LIBPROTOBUF_EXPORT ResultCallback2 {
+ public:
+ ResultCallback2() {}
+ virtual ~ResultCallback2() {}
+
+ virtual R Run(A1,A2) = 0;
+
+ private:
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ResultCallback2);
+};
+
+namespace internal {
+
+class LIBPROTOBUF_EXPORT FunctionClosure0 : public Closure {
+ public:
+ typedef void (*FunctionType)();
+
+ FunctionClosure0(FunctionType function, bool self_deleting)
+ : function_(function), self_deleting_(self_deleting) {}
+ ~FunctionClosure0();
+
+ void Run() {
+ bool needs_delete = self_deleting_; // read in case callback deletes
+ function_();
+ if (needs_delete) delete this;
+ }
+
+ private:
+ FunctionType function_;
+ bool self_deleting_;
+};
+
+template <typename Class>
+class MethodClosure0 : public Closure {
+ public:
+ typedef void (Class::*MethodType)();
+
+ MethodClosure0(Class* object, MethodType method, bool self_deleting)
+ : object_(object), method_(method), self_deleting_(self_deleting) {}
+ ~MethodClosure0() {}
+
+ void Run() {
+ bool needs_delete = self_deleting_; // read in case callback deletes
+ (object_->*method_)();
+ if (needs_delete) delete this;
+ }
+
+ private:
+ Class* object_;
+ MethodType method_;
+ bool self_deleting_;
+};
+
+template <typename Arg1>
+class FunctionClosure1 : public Closure {
+ public:
+ typedef void (*FunctionType)(Arg1 arg1);
+
+ FunctionClosure1(FunctionType function, bool self_deleting,
+ Arg1 arg1)
+ : function_(function), self_deleting_(self_deleting),
+ arg1_(arg1) {}
+ ~FunctionClosure1() {}
+
+ void Run() {
+ bool needs_delete = self_deleting_; // read in case callback deletes
+ function_(arg1_);
+ if (needs_delete) delete this;
+ }
+
+ private:
+ FunctionType function_;
+ bool self_deleting_;
+ Arg1 arg1_;
+};
+
+template <typename Class, typename Arg1>
+class MethodClosure1 : public Closure {
+ public:
+ typedef void (Class::*MethodType)(Arg1 arg1);
+
+ MethodClosure1(Class* object, MethodType method, bool self_deleting,
+ Arg1 arg1)
+ : object_(object), method_(method), self_deleting_(self_deleting),
+ arg1_(arg1) {}
+ ~MethodClosure1() {}
+
+ void Run() {
+ bool needs_delete = self_deleting_; // read in case callback deletes
+ (object_->*method_)(arg1_);
+ if (needs_delete) delete this;
+ }
+
+ private:
+ Class* object_;
+ MethodType method_;
+ bool self_deleting_;
+ Arg1 arg1_;
+};
+
+template <typename Arg1, typename Arg2>
+class FunctionClosure2 : public Closure {
+ public:
+ typedef void (*FunctionType)(Arg1 arg1, Arg2 arg2);
+
+ FunctionClosure2(FunctionType function, bool self_deleting,
+ Arg1 arg1, Arg2 arg2)
+ : function_(function), self_deleting_(self_deleting),
+ arg1_(arg1), arg2_(arg2) {}
+ ~FunctionClosure2() {}
+
+ void Run() {
+ bool needs_delete = self_deleting_; // read in case callback deletes
+ function_(arg1_, arg2_);
+ if (needs_delete) delete this;
+ }
+
+ private:
+ FunctionType function_;
+ bool self_deleting_;
+ Arg1 arg1_;
+ Arg2 arg2_;
+};
+
+template <typename Class, typename Arg1, typename Arg2>
+class MethodClosure2 : public Closure {
+ public:
+ typedef void (Class::*MethodType)(Arg1 arg1, Arg2 arg2);
+
+ MethodClosure2(Class* object, MethodType method, bool self_deleting,
+ Arg1 arg1, Arg2 arg2)
+ : object_(object), method_(method), self_deleting_(self_deleting),
+ arg1_(arg1), arg2_(arg2) {}
+ ~MethodClosure2() {}
+
+ void Run() {
+ bool needs_delete = self_deleting_; // read in case callback deletes
+ (object_->*method_)(arg1_, arg2_);
+ if (needs_delete) delete this;
+ }
+
+ private:
+ Class* object_;
+ MethodType method_;
+ bool self_deleting_;
+ Arg1 arg1_;
+ Arg2 arg2_;
+};
+
+template<typename R>
+class FunctionResultCallback_0_0 : public ResultCallback<R> {
+ public:
+ typedef R (*FunctionType)();
+
+ FunctionResultCallback_0_0(FunctionType function, bool self_deleting)
+ : function_(function), self_deleting_(self_deleting) {}
+ ~FunctionResultCallback_0_0() {}
+
+ R Run() {
+ bool needs_delete = self_deleting_; // read in case callback deletes
+ R result = function_();
+ if (needs_delete) delete this;
+ return result;
+ }
+
+ private:
+ FunctionType function_;
+ bool self_deleting_;
+};
+
+template<typename R, typename P1>
+class FunctionResultCallback_1_0 : public ResultCallback<R> {
+ public:
+ typedef R (*FunctionType)(P1);
+
+ FunctionResultCallback_1_0(FunctionType function, bool self_deleting,
+ P1 p1)
+ : function_(function), self_deleting_(self_deleting), p1_(p1) {}
+ ~FunctionResultCallback_1_0() {}
+
+ R Run() {
+ bool needs_delete = self_deleting_; // read in case callback deletes
+ R result = function_(p1_);
+ if (needs_delete) delete this;
+ return result;
+ }
+
+ private:
+ FunctionType function_;
+ bool self_deleting_;
+ P1 p1_;
+};
+
+template<typename R, typename Arg1>
+class FunctionResultCallback_0_1 : public ResultCallback1<R, Arg1> {
+ public:
+ typedef R (*FunctionType)(Arg1 arg1);
+
+ FunctionResultCallback_0_1(FunctionType function, bool self_deleting)
+ : function_(function), self_deleting_(self_deleting) {}
+ ~FunctionResultCallback_0_1() {}
+
+ R Run(Arg1 a1) {
+ bool needs_delete = self_deleting_; // read in case callback deletes
+ R result = function_(a1);
+ if (needs_delete) delete this;
+ return result;
+ }
+
+ private:
+ FunctionType function_;
+ bool self_deleting_;
+};
+
+template<typename R, typename P1, typename A1>
+class FunctionResultCallback_1_1 : public ResultCallback1<R, A1> {
+ public:
+ typedef R (*FunctionType)(P1, A1);
+
+ FunctionResultCallback_1_1(FunctionType function, bool self_deleting,
+ P1 p1)
+ : function_(function), self_deleting_(self_deleting), p1_(p1) {}
+ ~FunctionResultCallback_1_1() {}
+
+ R Run(A1 a1) {
+ bool needs_delete = self_deleting_; // read in case callback deletes
+ R result = function_(p1_, a1);
+ if (needs_delete) delete this;
+ return result;
+ }
+
+ private:
+ FunctionType function_;
+ bool self_deleting_;
+ P1 p1_;
+};
+
+template <typename T>
+struct InternalConstRef {
+ typedef typename remove_reference<T>::type base_type;
+ typedef const base_type& type;
+};
+
+template <typename R, typename T, typename P1, typename P2, typename P3,
+ typename P4, typename P5, typename A1, typename A2>
+class MethodResultCallback_5_2 : public ResultCallback2<R, A1, A2> {
+ public:
+ typedef R (T::*MethodType)(P1, P2, P3, P4, P5, A1, A2);
+ MethodResultCallback_5_2(T* object, MethodType method, bool self_deleting,
+ P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
+ : object_(object),
+ method_(method),
+ self_deleting_(self_deleting),
+ p1_(p1),
+ p2_(p2),
+ p3_(p3),
+ p4_(p4),
+ p5_(p5) {}
+ ~MethodResultCallback_5_2() {}
+
+ R Run(A1 a1, A2 a2) {
+ bool needs_delete = self_deleting_;
+ R result = (object_->*method_)(p1_, p2_, p3_, p4_, p5_, a1, a2);
+ if (needs_delete) delete this;
+ return result;
+ }
+
+ private:
+ T* object_;
+ MethodType method_;
+ bool self_deleting_;
+ typename remove_reference<P1>::type p1_;
+ typename remove_reference<P2>::type p2_;
+ typename remove_reference<P3>::type p3_;
+ typename remove_reference<P4>::type p4_;
+ typename remove_reference<P5>::type p5_;
+};
+
+// See Closure.
+inline Closure* NewCallback(void (*function)()) {
+ return new internal::FunctionClosure0(function, true);
+}
+
+// See Closure.
+inline Closure* NewPermanentCallback(void (*function)()) {
+ return new internal::FunctionClosure0(function, false);
+}
+
+// See Closure.
+template <typename Class>
+inline Closure* NewCallback(Class* object, void (Class::*method)()) {
+ return new internal::MethodClosure0<Class>(object, method, true);
+}
+
+// See Closure.
+template <typename Class>
+inline Closure* NewPermanentCallback(Class* object, void (Class::*method)()) {
+ return new internal::MethodClosure0<Class>(object, method, false);
+}
+
+// See Closure.
+template <typename Arg1>
+inline Closure* NewCallback(void (*function)(Arg1),
+ Arg1 arg1) {
+ return new internal::FunctionClosure1<Arg1>(function, true, arg1);
+}
+
+// See Closure.
+template <typename Arg1>
+inline Closure* NewPermanentCallback(void (*function)(Arg1),
+ Arg1 arg1) {
+ return new internal::FunctionClosure1<Arg1>(function, false, arg1);
+}
+
+// See Closure.
+template <typename Class, typename Arg1>
+inline Closure* NewCallback(Class* object, void (Class::*method)(Arg1),
+ Arg1 arg1) {
+ return new internal::MethodClosure1<Class, Arg1>(object, method, true, arg1);
+}
+
+// See Closure.
+template <typename Class, typename Arg1>
+inline Closure* NewPermanentCallback(Class* object, void (Class::*method)(Arg1),
+ Arg1 arg1) {
+ return new internal::MethodClosure1<Class, Arg1>(object, method, false, arg1);
+}
+
+// See Closure.
+template <typename Arg1, typename Arg2>
+inline Closure* NewCallback(void (*function)(Arg1, Arg2),
+ Arg1 arg1, Arg2 arg2) {
+ return new internal::FunctionClosure2<Arg1, Arg2>(
+ function, true, arg1, arg2);
+}
+
+// See Closure.
+template <typename Arg1, typename Arg2>
+inline Closure* NewPermanentCallback(void (*function)(Arg1, Arg2),
+ Arg1 arg1, Arg2 arg2) {
+ return new internal::FunctionClosure2<Arg1, Arg2>(
+ function, false, arg1, arg2);
+}
+
+// See Closure.
+template <typename Class, typename Arg1, typename Arg2>
+inline Closure* NewCallback(Class* object, void (Class::*method)(Arg1, Arg2),
+ Arg1 arg1, Arg2 arg2) {
+ return new internal::MethodClosure2<Class, Arg1, Arg2>(
+ object, method, true, arg1, arg2);
+}
+
+// See Closure.
+template <typename Class, typename Arg1, typename Arg2>
+inline Closure* NewPermanentCallback(
+ Class* object, void (Class::*method)(Arg1, Arg2),
+ Arg1 arg1, Arg2 arg2) {
+ return new internal::MethodClosure2<Class, Arg1, Arg2>(
+ object, method, false, arg1, arg2);
+}
+
+// See ResultCallback
+template<typename R>
+inline ResultCallback<R>* NewCallback(R (*function)()) {
+ return new internal::FunctionResultCallback_0_0<R>(function, true);
+}
+
+// See ResultCallback
+template<typename R>
+inline ResultCallback<R>* NewPermanentCallback(R (*function)()) {
+ return new internal::FunctionResultCallback_0_0<R>(function, false);
+}
+
+// See ResultCallback
+template<typename R, typename P1>
+inline ResultCallback<R>* NewCallback(R (*function)(P1), P1 p1) {
+ return new internal::FunctionResultCallback_1_0<R, P1>(
+ function, true, p1);
+}
+
+// See ResultCallback
+template<typename R, typename P1>
+inline ResultCallback<R>* NewPermanentCallback(
+ R (*function)(P1), P1 p1) {
+ return new internal::FunctionResultCallback_1_0<R, P1>(
+ function, false, p1);
+}
+
+// See ResultCallback1
+template<typename R, typename A1>
+inline ResultCallback1<R, A1>* NewCallback(R (*function)(A1)) {
+ return new internal::FunctionResultCallback_0_1<R, A1>(function, true);
+}
+
+// See ResultCallback1
+template<typename R, typename A1>
+inline ResultCallback1<R, A1>* NewPermanentCallback(R (*function)(A1)) {
+ return new internal::FunctionResultCallback_0_1<R, A1>(function, false);
+}
+
+// See ResultCallback1
+template<typename R, typename P1, typename A1>
+inline ResultCallback1<R, A1>* NewCallback(R (*function)(P1, A1), P1 p1) {
+ return new internal::FunctionResultCallback_1_1<R, P1, A1>(
+ function, true, p1);
+}
+
+// See ResultCallback1
+template<typename R, typename P1, typename A1>
+inline ResultCallback1<R, A1>* NewPermanentCallback(
+ R (*function)(P1, A1), P1 p1) {
+ return new internal::FunctionResultCallback_1_1<R, P1, A1>(
+ function, false, p1);
+}
+
+// See MethodResultCallback_5_2
+template <typename R, typename T, typename P1, typename P2, typename P3,
+ typename P4, typename P5, typename A1, typename A2>
+inline ResultCallback2<R, A1, A2>* NewPermanentCallback(
+ T* object, R (T::*function)(P1, P2, P3, P4, P5, A1, A2),
+ typename internal::InternalConstRef<P1>::type p1,
+ typename internal::InternalConstRef<P2>::type p2,
+ typename internal::InternalConstRef<P3>::type p3,
+ typename internal::InternalConstRef<P4>::type p4,
+ typename internal::InternalConstRef<P5>::type p5) {
+ return new internal::MethodResultCallback_5_2<R, T, P1, P2, P3, P4, P5, A1,
+ A2>(object, function, false, p1,
+ p2, p3, p4, p5);
+}
+
+} // namespace internal
+
+// A function which does nothing. Useful for creating no-op callbacks, e.g.:
+// Closure* nothing = NewCallback(&DoNothing);
+void LIBPROTOBUF_EXPORT DoNothing();
+
+
+} // namespace protobuf
+} // namespace google
+
+#endif // GOOGLE_PROTOBUF_STUBS_CALLBACK_H_
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/casts.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/casts.h
new file mode 100644
index 0000000..be65284
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/casts.h
@@ -0,0 +1,133 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2014 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_CASTS_H__
+#define GOOGLE_PROTOBUF_CASTS_H__
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/type_traits.h>
+
+namespace google {
+namespace protobuf {
+namespace internal {
+// Use implicit_cast as a safe version of static_cast or const_cast
+// for upcasting in the type hierarchy (i.e. casting a pointer to Foo
+// to a pointer to SuperclassOfFoo or casting a pointer to Foo to
+// a const pointer to Foo).
+// When you use implicit_cast, the compiler checks that the cast is safe.
+// Such explicit implicit_casts are necessary in surprisingly many
+// situations where C++ demands an exact type match instead of an
+// argument type convertable to a target type.
+//
+// The From type can be inferred, so the preferred syntax for using
+// implicit_cast is the same as for static_cast etc.:
+//
+// implicit_cast<ToType>(expr)
+//
+// implicit_cast would have been part of the C++ standard library,
+// but the proposal was submitted too late. It will probably make
+// its way into the language in the future.
+template<typename To, typename From>
+inline To implicit_cast(From const &f) {
+ return f;
+}
+
+// When you upcast (that is, cast a pointer from type Foo to type
+// SuperclassOfFoo), it's fine to use implicit_cast<>, since upcasts
+// always succeed. When you downcast (that is, cast a pointer from
+// type Foo to type SubclassOfFoo), static_cast<> isn't safe, because
+// how do you know the pointer is really of type SubclassOfFoo? It
+// could be a bare Foo, or of type DifferentSubclassOfFoo. Thus,
+// when you downcast, you should use this macro. In debug mode, we
+// use dynamic_cast<> to double-check the downcast is legal (we die
+// if it's not). In normal mode, we do the efficient static_cast<>
+// instead. Thus, it's important to test in debug mode to make sure
+// the cast is legal!
+// This is the only place in the code we should use dynamic_cast<>.
+// In particular, you SHOULDN'T be using dynamic_cast<> in order to
+// do RTTI (eg code like this:
+// if (dynamic_cast<Subclass1>(foo)) HandleASubclass1Object(foo);
+// if (dynamic_cast<Subclass2>(foo)) HandleASubclass2Object(foo);
+// You should design the code some other way not to need this.
+
+template<typename To, typename From> // use like this: down_cast<T*>(foo);
+inline To down_cast(From* f) { // so we only accept pointers
+ // Ensures that To is a sub-type of From *. This test is here only
+ // for compile-time type checking, and has no overhead in an
+ // optimized build at run-time, as it will be optimized away
+ // completely.
+ if (false) {
+ implicit_cast<From*, To>(0);
+ }
+
+#if !defined(NDEBUG) && !defined(GOOGLE_PROTOBUF_NO_RTTI)
+ assert(f == NULL || dynamic_cast<To>(f) != NULL); // RTTI: debug mode only!
+#endif
+ return static_cast<To>(f);
+}
+
+template<typename To, typename From> // use like this: down_cast<T&>(foo);
+inline To down_cast(From& f) {
+ typedef typename remove_reference<To>::type* ToAsPointer;
+ // Ensures that To is a sub-type of From *. This test is here only
+ // for compile-time type checking, and has no overhead in an
+ // optimized build at run-time, as it will be optimized away
+ // completely.
+ if (false) {
+ implicit_cast<From*, ToAsPointer>(0);
+ }
+
+#if !defined(NDEBUG) && !defined(GOOGLE_PROTOBUF_NO_RTTI)
+ // RTTI: debug mode only!
+ assert(dynamic_cast<ToAsPointer>(&f) != NULL);
+#endif
+ return *static_cast<ToAsPointer>(&f);
+}
+
+template<typename To, typename From>
+inline To bit_cast(const From& from) {
+ GOOGLE_COMPILE_ASSERT(sizeof(From) == sizeof(To),
+ bit_cast_with_different_sizes);
+ To dest;
+ memcpy(&dest, &from, sizeof(dest));
+ return dest;
+}
+
+} // namespace internal
+
+// We made these internal so that they would show up as such in the docs,
+// but we don't want to stick "internal::" in front of them everywhere.
+using internal::implicit_cast;
+using internal::down_cast;
+using internal::bit_cast;
+
+} // namespace protobuf
+} // namespace google
+#endif // GOOGLE_PROTOBUF_CASTS_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/common.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/common.h
index f096fa9..9c05cac 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/common.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/common.h
@@ -35,18 +35,17 @@
#ifndef GOOGLE_PROTOBUF_COMMON_H__
#define GOOGLE_PROTOBUF_COMMON_H__
-#include <assert.h>
-#include <stdlib.h>
-#include <cstddef>
#include <string>
-#include <string.h>
-#if defined(__osf__)
-// Tru64 lacks stdint.h, but has inttypes.h which defines a superset of
-// what stdint.h would define.
-#include <inttypes.h>
-#elif !defined(_MSC_VER)
-#include <stdint.h>
-#endif
+
+#include <google/protobuf/stubs/port.h>
+#include <google/protobuf/stubs/macros.h>
+#include <google/protobuf/stubs/platform_macros.h>
+
+// TODO(liujisi): Remove the following includes after the include clean-up.
+#include <google/protobuf/stubs/logging.h>
+#include <google/protobuf/stubs/scoped_ptr.h>
+#include <google/protobuf/stubs/mutex.h>
+#include <google/protobuf/stubs/callback.h>
#ifndef PROTOBUF_USE_EXCEPTIONS
#if defined(_MSC_VER) && defined(_CPPUNWIND)
@@ -61,6 +60,13 @@
#if PROTOBUF_USE_EXCEPTIONS
#include <exception>
#endif
+#if defined(__APPLE__)
+#include <TargetConditionals.h> // for TARGET_OS_IPHONE
+#endif
+
+#if defined(__ANDROID__) || defined(GOOGLE_PROTOBUF_OS_ANDROID) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) || defined(GOOGLE_PROTOBUF_OS_IPHONE)
+#include <pthread.h>
+#endif
#if defined(_WIN32) && defined(GetMessage)
// Allow GetMessage to be used as a valid method name in protobuf classes.
@@ -79,33 +85,10 @@
}
#endif
-
namespace std {}
namespace google {
namespace protobuf {
-
-#undef GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
-#define GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TypeName) \
- TypeName(const TypeName&); \
- void operator=(const TypeName&)
-
-#if defined(_MSC_VER) && defined(PROTOBUF_USE_DLLS)
- #ifdef LIBPROTOBUF_EXPORTS
- #define LIBPROTOBUF_EXPORT __declspec(dllexport)
- #else
- #define LIBPROTOBUF_EXPORT __declspec(dllimport)
- #endif
- #ifdef LIBPROTOC_EXPORTS
- #define LIBPROTOC_EXPORT __declspec(dllexport)
- #else
- #define LIBPROTOC_EXPORT __declspec(dllimport)
- #endif
-#else
- #define LIBPROTOBUF_EXPORT
- #define LIBPROTOC_EXPORT
-#endif
-
namespace internal {
// Some of these constants are macros rather than const ints so that they can
@@ -113,24 +96,24 @@
// The current version, represented as a single integer to make comparison
// easier: major * 10^6 + minor * 10^3 + micro
-#define GOOGLE_PROTOBUF_VERSION 2006001
+#define GOOGLE_PROTOBUF_VERSION 3000000
// The minimum library version which works with the current version of the
// headers.
-#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 2006000
+#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 3000000
// The minimum header version which works with the current version of
// the library. This constant should only be used by protoc's C++ code
// generator.
-static const int kMinHeaderVersionForLibrary = 2006000;
+static const int kMinHeaderVersionForLibrary = 3000000;
// The minimum protoc version which works with the current version of the
// headers.
-#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 2006000
+#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 3000000
// The minimum header version which works with the current version of
// protoc. This constant should only be used in VerifyVersion().
-static const int kMinHeaderVersionForProtoc = 2006000;
+static const int kMinHeaderVersionForProtoc = 3000000;
// Verifies that the headers and libraries are compatible. Use the macro
// below to call this.
@@ -151,1025 +134,41 @@
GOOGLE_PROTOBUF_VERSION, GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION, \
__FILE__)
-// ===================================================================
-// from google3/base/port.h
-
-typedef unsigned int uint;
-
-#ifdef _MSC_VER
-typedef __int8 int8;
-typedef __int16 int16;
-typedef __int32 int32;
-typedef __int64 int64;
-
-typedef unsigned __int8 uint8;
-typedef unsigned __int16 uint16;
-typedef unsigned __int32 uint32;
-typedef unsigned __int64 uint64;
-#else
-typedef int8_t int8;
-typedef int16_t int16;
-typedef int32_t int32;
-typedef int64_t int64;
-
-typedef uint8_t uint8;
-typedef uint16_t uint16;
-typedef uint32_t uint32;
-typedef uint64_t uint64;
-#endif
-
-// long long macros to be used because gcc and vc++ use different suffixes,
-// and different size specifiers in format strings
-#undef GOOGLE_LONGLONG
-#undef GOOGLE_ULONGLONG
-#undef GOOGLE_LL_FORMAT
-
-#ifdef _MSC_VER
-#define GOOGLE_LONGLONG(x) x##I64
-#define GOOGLE_ULONGLONG(x) x##UI64
-#define GOOGLE_LL_FORMAT "I64" // As in printf("%I64d", ...)
-#else
-#define GOOGLE_LONGLONG(x) x##LL
-#define GOOGLE_ULONGLONG(x) x##ULL
-#define GOOGLE_LL_FORMAT "ll" // As in "%lld". Note that "q" is poor form also.
-#endif
-
-static const int32 kint32max = 0x7FFFFFFF;
-static const int32 kint32min = -kint32max - 1;
-static const int64 kint64max = GOOGLE_LONGLONG(0x7FFFFFFFFFFFFFFF);
-static const int64 kint64min = -kint64max - 1;
-static const uint32 kuint32max = 0xFFFFFFFFu;
-static const uint64 kuint64max = GOOGLE_ULONGLONG(0xFFFFFFFFFFFFFFFF);
-
-// -------------------------------------------------------------------
-// Annotations: Some parts of the code have been annotated in ways that might
-// be useful to some compilers or tools, but are not supported universally.
-// You can #define these annotations yourself if the default implementation
-// is not right for you.
-
-#ifndef GOOGLE_ATTRIBUTE_ALWAYS_INLINE
-#if defined(__GNUC__) && (__GNUC__ > 3 ||(__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
-// For functions we want to force inline.
-// Introduced in gcc 3.1.
-#define GOOGLE_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((always_inline))
-#else
-// Other compilers will have to figure it out for themselves.
-#define GOOGLE_ATTRIBUTE_ALWAYS_INLINE
-#endif
-#endif
-
-#ifndef GOOGLE_ATTRIBUTE_DEPRECATED
-#ifdef __GNUC__
-// If the method/variable/type is used anywhere, produce a warning.
-#define GOOGLE_ATTRIBUTE_DEPRECATED __attribute__((deprecated))
-#else
-#define GOOGLE_ATTRIBUTE_DEPRECATED
-#endif
-#endif
-
-#ifndef GOOGLE_PREDICT_TRUE
-#ifdef __GNUC__
-// Provided at least since GCC 3.0.
-#define GOOGLE_PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))
-#else
-#define GOOGLE_PREDICT_TRUE
-#endif
-#endif
-
-// Delimits a block of code which may write to memory which is simultaneously
-// written by other threads, but which has been determined to be thread-safe
-// (e.g. because it is an idempotent write).
-#ifndef GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN
-#define GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN()
-#endif
-#ifndef GOOGLE_SAFE_CONCURRENT_WRITES_END
-#define GOOGLE_SAFE_CONCURRENT_WRITES_END()
-#endif
-
-// ===================================================================
-// from google3/base/basictypes.h
-
-// The GOOGLE_ARRAYSIZE(arr) macro returns the # of elements in an array arr.
-// The expression is a compile-time constant, and therefore can be
-// used in defining new arrays, for example.
-//
-// GOOGLE_ARRAYSIZE catches a few type errors. If you see a compiler error
-//
-// "warning: division by zero in ..."
-//
-// when using GOOGLE_ARRAYSIZE, you are (wrongfully) giving it a pointer.
-// You should only use GOOGLE_ARRAYSIZE on statically allocated arrays.
-//
-// The following comments are on the implementation details, and can
-// be ignored by the users.
-//
-// ARRAYSIZE(arr) works by inspecting sizeof(arr) (the # of bytes in
-// the array) and sizeof(*(arr)) (the # of bytes in one array
-// element). If the former is divisible by the latter, perhaps arr is
-// indeed an array, in which case the division result is the # of
-// elements in the array. Otherwise, arr cannot possibly be an array,
-// and we generate a compiler error to prevent the code from
-// compiling.
-//
-// Since the size of bool is implementation-defined, we need to cast
-// !(sizeof(a) & sizeof(*(a))) to size_t in order to ensure the final
-// result has type size_t.
-//
-// This macro is not perfect as it wrongfully accepts certain
-// pointers, namely where the pointer size is divisible by the pointee
-// size. Since all our code has to go through a 32-bit compiler,
-// where a pointer is 4 bytes, this means all pointers to a type whose
-// size is 3 or greater than 4 will be (righteously) rejected.
-//
-// Kudos to Jorg Brown for this simple and elegant implementation.
-
-#undef GOOGLE_ARRAYSIZE
-#define GOOGLE_ARRAYSIZE(a) \
- ((sizeof(a) / sizeof(*(a))) / \
- static_cast<size_t>(!(sizeof(a) % sizeof(*(a)))))
-
-namespace internal {
-
-// Use implicit_cast as a safe version of static_cast or const_cast
-// for upcasting in the type hierarchy (i.e. casting a pointer to Foo
-// to a pointer to SuperclassOfFoo or casting a pointer to Foo to
-// a const pointer to Foo).
-// When you use implicit_cast, the compiler checks that the cast is safe.
-// Such explicit implicit_casts are necessary in surprisingly many
-// situations where C++ demands an exact type match instead of an
-// argument type convertable to a target type.
-//
-// The From type can be inferred, so the preferred syntax for using
-// implicit_cast is the same as for static_cast etc.:
-//
-// implicit_cast<ToType>(expr)
-//
-// implicit_cast would have been part of the C++ standard library,
-// but the proposal was submitted too late. It will probably make
-// its way into the language in the future.
-template<typename To, typename From>
-inline To implicit_cast(From const &f) {
- return f;
-}
-
-// When you upcast (that is, cast a pointer from type Foo to type
-// SuperclassOfFoo), it's fine to use implicit_cast<>, since upcasts
-// always succeed. When you downcast (that is, cast a pointer from
-// type Foo to type SubclassOfFoo), static_cast<> isn't safe, because
-// how do you know the pointer is really of type SubclassOfFoo? It
-// could be a bare Foo, or of type DifferentSubclassOfFoo. Thus,
-// when you downcast, you should use this macro. In debug mode, we
-// use dynamic_cast<> to double-check the downcast is legal (we die
-// if it's not). In normal mode, we do the efficient static_cast<>
-// instead. Thus, it's important to test in debug mode to make sure
-// the cast is legal!
-// This is the only place in the code we should use dynamic_cast<>.
-// In particular, you SHOULDN'T be using dynamic_cast<> in order to
-// do RTTI (eg code like this:
-// if (dynamic_cast<Subclass1>(foo)) HandleASubclass1Object(foo);
-// if (dynamic_cast<Subclass2>(foo)) HandleASubclass2Object(foo);
-// You should design the code some other way not to need this.
-
-template<typename To, typename From> // use like this: down_cast<T*>(foo);
-inline To down_cast(From* f) { // so we only accept pointers
- // Ensures that To is a sub-type of From *. This test is here only
- // for compile-time type checking, and has no overhead in an
- // optimized build at run-time, as it will be optimized away
- // completely.
- if (false) {
- implicit_cast<From*, To>(0);
- }
-
-#if !defined(NDEBUG) && !defined(GOOGLE_PROTOBUF_NO_RTTI)
- assert(f == NULL || dynamic_cast<To>(f) != NULL); // RTTI: debug mode only!
-#endif
- return static_cast<To>(f);
-}
-
-} // namespace internal
-
-// We made these internal so that they would show up as such in the docs,
-// but we don't want to stick "internal::" in front of them everywhere.
-using internal::implicit_cast;
-using internal::down_cast;
-
-// The COMPILE_ASSERT macro can be used to verify that a compile time
-// expression is true. For example, you could use it to verify the
-// size of a static array:
-//
-// COMPILE_ASSERT(ARRAYSIZE(content_type_names) == CONTENT_NUM_TYPES,
-// content_type_names_incorrect_size);
-//
-// or to make sure a struct is smaller than a certain size:
-//
-// COMPILE_ASSERT(sizeof(foo) < 128, foo_too_large);
-//
-// The second argument to the macro is the name of the variable. If
-// the expression is false, most compilers will issue a warning/error
-// containing the name of the variable.
-
-namespace internal {
-
-template <bool>
-struct CompileAssert {
-};
-
-} // namespace internal
-
-#undef GOOGLE_COMPILE_ASSERT
-#define GOOGLE_COMPILE_ASSERT(expr, msg) \
- typedef ::google::protobuf::internal::CompileAssert<(bool(expr))> \
- msg[bool(expr) ? 1 : -1]
-
-
-// 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<bool(expr)>
-//
-// 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.
-
-// ===================================================================
-// from google3/base/scoped_ptr.h
-
-namespace internal {
-
-// This is an implementation designed to match the anticipated future TR2
-// implementation of the scoped_ptr class, and its closely-related brethren,
-// scoped_array, scoped_ptr_malloc, and make_scoped_ptr.
-
-template <class C> class scoped_ptr;
-template <class C> class scoped_array;
-
-// A scoped_ptr<T> is like a T*, except that the destructor of scoped_ptr<T>
-// automatically deletes the pointer it holds (if any).
-// That is, scoped_ptr<T> owns the T object that it points to.
-// Like a T*, a scoped_ptr<T> may hold either NULL or a pointer to a T object.
-//
-// The size of a scoped_ptr is small:
-// sizeof(scoped_ptr<C>) == sizeof(C*)
-template <class C>
-class scoped_ptr {
- public:
-
- // The element type
- typedef C element_type;
-
- // Constructor. Defaults to intializing with NULL.
- // There is no way to create an uninitialized scoped_ptr.
- // The input parameter must be allocated with new.
- explicit scoped_ptr(C* p = NULL) : ptr_(p) { }
-
- // Destructor. If there is a C object, delete it.
- // We don't need to test ptr_ == NULL because C++ does that for us.
- ~scoped_ptr() {
- enum { type_must_be_complete = sizeof(C) };
- delete ptr_;
- }
-
- // Reset. Deletes the current owned object, if any.
- // Then takes ownership of a new object, if given.
- // this->reset(this->get()) works.
- void reset(C* p = NULL) {
- if (p != ptr_) {
- enum { type_must_be_complete = sizeof(C) };
- delete ptr_;
- ptr_ = p;
- }
- }
-
- // Accessors to get the owned object.
- // operator* and operator-> will assert() if there is no current object.
- C& operator*() const {
- assert(ptr_ != NULL);
- return *ptr_;
- }
- C* operator->() const {
- assert(ptr_ != NULL);
- return ptr_;
- }
- C* get() const { return ptr_; }
-
- // Comparison operators.
- // These return whether two scoped_ptr refer to the same object, not just to
- // two different but equal objects.
- bool operator==(C* p) const { return ptr_ == p; }
- bool operator!=(C* p) const { return ptr_ != p; }
-
- // Swap two scoped pointers.
- void swap(scoped_ptr& p2) {
- C* tmp = ptr_;
- ptr_ = p2.ptr_;
- p2.ptr_ = tmp;
- }
-
- // Release a pointer.
- // The return value is the current pointer held by this object.
- // If this object holds a NULL pointer, the return value is NULL.
- // After this operation, this object will hold a NULL pointer,
- // and will not own the object any more.
- C* release() {
- C* retVal = ptr_;
- ptr_ = NULL;
- return retVal;
- }
-
- private:
- C* ptr_;
-
- // Forbid comparison of scoped_ptr types. If C2 != C, it totally doesn't
- // make sense, and if C2 == C, it still doesn't make sense because you should
- // never have the same object owned by two different scoped_ptrs.
- template <class C2> bool operator==(scoped_ptr<C2> const& p2) const;
- template <class C2> bool operator!=(scoped_ptr<C2> const& p2) const;
-
- // Disallow evil constructors
- scoped_ptr(const scoped_ptr&);
- void operator=(const scoped_ptr&);
-};
-
-// scoped_array<C> is like scoped_ptr<C>, except that the caller must allocate
-// with new [] and the destructor deletes objects with delete [].
-//
-// As with scoped_ptr<C>, a scoped_array<C> either points to an object
-// or is NULL. A scoped_array<C> owns the object that it points to.
-//
-// Size: sizeof(scoped_array<C>) == sizeof(C*)
-template <class C>
-class scoped_array {
- public:
-
- // The element type
- typedef C element_type;
-
- // Constructor. Defaults to intializing with NULL.
- // There is no way to create an uninitialized scoped_array.
- // The input parameter must be allocated with new [].
- explicit scoped_array(C* p = NULL) : array_(p) { }
-
- // Destructor. If there is a C object, delete it.
- // We don't need to test ptr_ == NULL because C++ does that for us.
- ~scoped_array() {
- enum { type_must_be_complete = sizeof(C) };
- delete[] array_;
- }
-
- // Reset. Deletes the current owned object, if any.
- // Then takes ownership of a new object, if given.
- // this->reset(this->get()) works.
- void reset(C* p = NULL) {
- if (p != array_) {
- enum { type_must_be_complete = sizeof(C) };
- delete[] array_;
- array_ = p;
- }
- }
-
- // Get one element of the current object.
- // Will assert() if there is no current object, or index i is negative.
- C& operator[](std::ptrdiff_t i) const {
- assert(i >= 0);
- assert(array_ != NULL);
- return array_[i];
- }
-
- // Get a pointer to the zeroth element of the current object.
- // If there is no current object, return NULL.
- C* get() const {
- return array_;
- }
-
- // Comparison operators.
- // These return whether two scoped_array refer to the same object, not just to
- // two different but equal objects.
- bool operator==(C* p) const { return array_ == p; }
- bool operator!=(C* p) const { return array_ != p; }
-
- // Swap two scoped arrays.
- void swap(scoped_array& p2) {
- C* tmp = array_;
- array_ = p2.array_;
- p2.array_ = tmp;
- }
-
- // Release an array.
- // The return value is the current pointer held by this object.
- // If this object holds a NULL pointer, the return value is NULL.
- // After this operation, this object will hold a NULL pointer,
- // and will not own the object any more.
- C* release() {
- C* retVal = array_;
- array_ = NULL;
- return retVal;
- }
-
- private:
- C* array_;
-
- // Forbid comparison of different scoped_array types.
- template <class C2> bool operator==(scoped_array<C2> const& p2) const;
- template <class C2> bool operator!=(scoped_array<C2> const& p2) const;
-
- // Disallow evil constructors
- scoped_array(const scoped_array&);
- void operator=(const scoped_array&);
-};
-
-} // namespace internal
-
-// We made these internal so that they would show up as such in the docs,
-// but we don't want to stick "internal::" in front of them everywhere.
-using internal::scoped_ptr;
-using internal::scoped_array;
-
-// ===================================================================
-// emulates google3/base/logging.h
-
-enum LogLevel {
- LOGLEVEL_INFO, // Informational. This is never actually used by
- // libprotobuf.
- LOGLEVEL_WARNING, // Warns about issues that, although not technically a
- // problem now, could cause problems in the future. For
- // example, a // warning will be printed when parsing a
- // message that is near the message size limit.
- LOGLEVEL_ERROR, // An error occurred which should never happen during
- // normal use.
- LOGLEVEL_FATAL, // An error occurred from which the library cannot
- // recover. This usually indicates a programming error
- // in the code which calls the library, especially when
- // compiled in debug mode.
-
-#ifdef NDEBUG
- LOGLEVEL_DFATAL = LOGLEVEL_ERROR
-#else
- LOGLEVEL_DFATAL = LOGLEVEL_FATAL
-#endif
-};
-
-namespace internal {
-
-class LogFinisher;
-
-class LIBPROTOBUF_EXPORT LogMessage {
- public:
- LogMessage(LogLevel level, const char* filename, int line);
- ~LogMessage();
-
- LogMessage& operator<<(const std::string& value);
- LogMessage& operator<<(const char* value);
- LogMessage& operator<<(char value);
- LogMessage& operator<<(int value);
- LogMessage& operator<<(uint value);
- LogMessage& operator<<(long value);
- LogMessage& operator<<(unsigned long value);
- LogMessage& operator<<(double value);
-
- private:
- friend class LogFinisher;
- void Finish();
-
- LogLevel level_;
- const char* filename_;
- int line_;
- std::string message_;
-};
-
-// Used to make the entire "LOG(BLAH) << etc." expression have a void return
-// type and print a newline after each message.
-class LIBPROTOBUF_EXPORT LogFinisher {
- public:
- void operator=(LogMessage& other);
-};
-
-} // namespace internal
-
-// Undef everything in case we're being mixed with some other Google library
-// which already defined them itself. Presumably all Google libraries will
-// support the same syntax for these so it should not be a big deal if they
-// end up using our definitions instead.
-#undef GOOGLE_LOG
-#undef GOOGLE_LOG_IF
-
-#undef GOOGLE_CHECK
-#undef GOOGLE_CHECK_OK
-#undef GOOGLE_CHECK_EQ
-#undef GOOGLE_CHECK_NE
-#undef GOOGLE_CHECK_LT
-#undef GOOGLE_CHECK_LE
-#undef GOOGLE_CHECK_GT
-#undef GOOGLE_CHECK_GE
-#undef GOOGLE_CHECK_NOTNULL
-
-#undef GOOGLE_DLOG
-#undef GOOGLE_DCHECK
-#undef GOOGLE_DCHECK_EQ
-#undef GOOGLE_DCHECK_NE
-#undef GOOGLE_DCHECK_LT
-#undef GOOGLE_DCHECK_LE
-#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_IF(LEVEL, CONDITION) \
- !(CONDITION) ? (void)0 : GOOGLE_LOG(LEVEL)
-
-#define GOOGLE_CHECK(EXPRESSION) \
- GOOGLE_LOG_IF(FATAL, !(EXPRESSION)) << "CHECK failed: " #EXPRESSION ": "
-#define GOOGLE_CHECK_OK(A) GOOGLE_CHECK(A)
-#define GOOGLE_CHECK_EQ(A, B) GOOGLE_CHECK((A) == (B))
-#define GOOGLE_CHECK_NE(A, B) GOOGLE_CHECK((A) != (B))
-#define GOOGLE_CHECK_LT(A, B) GOOGLE_CHECK((A) < (B))
-#define GOOGLE_CHECK_LE(A, B) GOOGLE_CHECK((A) <= (B))
-#define GOOGLE_CHECK_GT(A, B) GOOGLE_CHECK((A) > (B))
-#define GOOGLE_CHECK_GE(A, B) GOOGLE_CHECK((A) >= (B))
-
-namespace internal {
-template<typename T>
-T* CheckNotNull(const char* /* file */, int /* line */,
- const char* name, T* val) {
- if (val == NULL) {
- GOOGLE_LOG(FATAL) << name;
- }
- return val;
-}
-} // namespace internal
-#define GOOGLE_CHECK_NOTNULL(A) \
- internal::CheckNotNull(__FILE__, __LINE__, "'" #A "' must not be NULL", (A))
-
-#ifdef NDEBUG
-
-#define GOOGLE_DLOG GOOGLE_LOG_IF(INFO, false)
-
-#define GOOGLE_DCHECK(EXPRESSION) while(false) GOOGLE_CHECK(EXPRESSION)
-#define GOOGLE_DCHECK_EQ(A, B) GOOGLE_DCHECK((A) == (B))
-#define GOOGLE_DCHECK_NE(A, B) GOOGLE_DCHECK((A) != (B))
-#define GOOGLE_DCHECK_LT(A, B) GOOGLE_DCHECK((A) < (B))
-#define GOOGLE_DCHECK_LE(A, B) GOOGLE_DCHECK((A) <= (B))
-#define GOOGLE_DCHECK_GT(A, B) GOOGLE_DCHECK((A) > (B))
-#define GOOGLE_DCHECK_GE(A, B) GOOGLE_DCHECK((A) >= (B))
-
-#else // NDEBUG
-
-#define GOOGLE_DLOG GOOGLE_LOG
-
-#define GOOGLE_DCHECK GOOGLE_CHECK
-#define GOOGLE_DCHECK_EQ GOOGLE_CHECK_EQ
-#define GOOGLE_DCHECK_NE GOOGLE_CHECK_NE
-#define GOOGLE_DCHECK_LT GOOGLE_CHECK_LT
-#define GOOGLE_DCHECK_LE GOOGLE_CHECK_LE
-#define GOOGLE_DCHECK_GT GOOGLE_CHECK_GT
-#define GOOGLE_DCHECK_GE GOOGLE_CHECK_GE
-
-#endif // !NDEBUG
-
-typedef void LogHandler(LogLevel level, const char* filename, int line,
- const std::string& message);
-
-// The protobuf library sometimes writes warning and error messages to
-// stderr. These messages are primarily useful for developers, but may
-// also help end users figure out a problem. If you would prefer that
-// these messages be sent somewhere other than stderr, call SetLogHandler()
-// to set your own handler. This returns the old handler. Set the handler
-// to NULL to ignore log messages (but see also LogSilencer, below).
-//
-// Obviously, SetLogHandler is not thread-safe. You should only call it
-// at initialization time, and probably not from library code. If you
-// simply want to suppress log messages temporarily (e.g. because you
-// have some code that tends to trigger them frequently and you know
-// the warnings are not important to you), use the LogSilencer class
-// below.
-LIBPROTOBUF_EXPORT LogHandler* SetLogHandler(LogHandler* new_func);
-
-// Create a LogSilencer if you want to temporarily suppress all log
-// messages. As long as any LogSilencer objects exist, non-fatal
-// log messages will be discarded (the current LogHandler will *not*
-// be called). Constructing a LogSilencer is thread-safe. You may
-// accidentally suppress log messages occurring in another thread, but
-// since messages are generally for debugging purposes only, this isn't
-// a big deal. If you want to intercept log messages, use SetLogHandler().
-class LIBPROTOBUF_EXPORT LogSilencer {
- public:
- LogSilencer();
- ~LogSilencer();
-};
-
-// ===================================================================
-// emulates google3/base/callback.h
-
-// Abstract interface for a callback. When calling an RPC, you must provide
-// a Closure to call when the procedure completes. See the Service interface
-// in service.h.
-//
-// To automatically construct a Closure which calls a particular function or
-// method with a particular set of parameters, use the NewCallback() function.
-// Example:
-// void FooDone(const FooResponse* response) {
-// ...
-// }
-//
-// void CallFoo() {
-// ...
-// // When done, call FooDone() and pass it a pointer to the response.
-// Closure* callback = NewCallback(&FooDone, response);
-// // Make the call.
-// service->Foo(controller, request, response, callback);
-// }
-//
-// Example that calls a method:
-// class Handler {
-// public:
-// ...
-//
-// void FooDone(const FooResponse* response) {
-// ...
-// }
-//
-// void CallFoo() {
-// ...
-// // When done, call FooDone() and pass it a pointer to the response.
-// Closure* callback = NewCallback(this, &Handler::FooDone, response);
-// // Make the call.
-// service->Foo(controller, request, response, callback);
-// }
-// };
-//
-// Currently NewCallback() supports binding zero, one, or two arguments.
-//
-// Callbacks created with NewCallback() automatically delete themselves when
-// executed. They should be used when a callback is to be called exactly
-// once (usually the case with RPC callbacks). If a callback may be called
-// a different number of times (including zero), create it with
-// NewPermanentCallback() instead. You are then responsible for deleting the
-// callback (using the "delete" keyword as normal).
-//
-// Note that NewCallback() is a bit touchy regarding argument types. Generally,
-// the values you provide for the parameter bindings must exactly match the
-// types accepted by the callback function. For example:
-// void Foo(string s);
-// NewCallback(&Foo, "foo"); // WON'T WORK: const char* != string
-// NewCallback(&Foo, string("foo")); // WORKS
-// Also note that the arguments cannot be references:
-// void Foo(const string& s);
-// string my_str;
-// NewCallback(&Foo, my_str); // WON'T WORK: Can't use referecnes.
-// However, correctly-typed pointers will work just fine.
-class LIBPROTOBUF_EXPORT Closure {
- public:
- Closure() {}
- virtual ~Closure();
-
- virtual void Run() = 0;
-
- private:
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Closure);
-};
-
-namespace internal {
-
-class LIBPROTOBUF_EXPORT FunctionClosure0 : public Closure {
- public:
- typedef void (*FunctionType)();
-
- FunctionClosure0(FunctionType function, bool self_deleting)
- : function_(function), self_deleting_(self_deleting) {}
- ~FunctionClosure0();
-
- void Run() {
- bool needs_delete = self_deleting_; // read in case callback deletes
- function_();
- if (needs_delete) delete this;
- }
-
- private:
- FunctionType function_;
- bool self_deleting_;
-};
-
-template <typename Class>
-class MethodClosure0 : public Closure {
- public:
- typedef void (Class::*MethodType)();
-
- MethodClosure0(Class* object, MethodType method, bool self_deleting)
- : object_(object), method_(method), self_deleting_(self_deleting) {}
- ~MethodClosure0() {}
-
- void Run() {
- bool needs_delete = self_deleting_; // read in case callback deletes
- (object_->*method_)();
- if (needs_delete) delete this;
- }
-
- private:
- Class* object_;
- MethodType method_;
- bool self_deleting_;
-};
-
-template <typename Arg1>
-class FunctionClosure1 : public Closure {
- public:
- typedef void (*FunctionType)(Arg1 arg1);
-
- FunctionClosure1(FunctionType function, bool self_deleting,
- Arg1 arg1)
- : function_(function), self_deleting_(self_deleting),
- arg1_(arg1) {}
- ~FunctionClosure1() {}
-
- void Run() {
- bool needs_delete = self_deleting_; // read in case callback deletes
- function_(arg1_);
- if (needs_delete) delete this;
- }
-
- private:
- FunctionType function_;
- bool self_deleting_;
- Arg1 arg1_;
-};
-
-template <typename Class, typename Arg1>
-class MethodClosure1 : public Closure {
- public:
- typedef void (Class::*MethodType)(Arg1 arg1);
-
- MethodClosure1(Class* object, MethodType method, bool self_deleting,
- Arg1 arg1)
- : object_(object), method_(method), self_deleting_(self_deleting),
- arg1_(arg1) {}
- ~MethodClosure1() {}
-
- void Run() {
- bool needs_delete = self_deleting_; // read in case callback deletes
- (object_->*method_)(arg1_);
- if (needs_delete) delete this;
- }
-
- private:
- Class* object_;
- MethodType method_;
- bool self_deleting_;
- Arg1 arg1_;
-};
-
-template <typename Arg1, typename Arg2>
-class FunctionClosure2 : public Closure {
- public:
- typedef void (*FunctionType)(Arg1 arg1, Arg2 arg2);
-
- FunctionClosure2(FunctionType function, bool self_deleting,
- Arg1 arg1, Arg2 arg2)
- : function_(function), self_deleting_(self_deleting),
- arg1_(arg1), arg2_(arg2) {}
- ~FunctionClosure2() {}
-
- void Run() {
- bool needs_delete = self_deleting_; // read in case callback deletes
- function_(arg1_, arg2_);
- if (needs_delete) delete this;
- }
-
- private:
- FunctionType function_;
- bool self_deleting_;
- Arg1 arg1_;
- Arg2 arg2_;
-};
-
-template <typename Class, typename Arg1, typename Arg2>
-class MethodClosure2 : public Closure {
- public:
- typedef void (Class::*MethodType)(Arg1 arg1, Arg2 arg2);
-
- MethodClosure2(Class* object, MethodType method, bool self_deleting,
- Arg1 arg1, Arg2 arg2)
- : object_(object), method_(method), self_deleting_(self_deleting),
- arg1_(arg1), arg2_(arg2) {}
- ~MethodClosure2() {}
-
- void Run() {
- bool needs_delete = self_deleting_; // read in case callback deletes
- (object_->*method_)(arg1_, arg2_);
- if (needs_delete) delete this;
- }
-
- private:
- Class* object_;
- MethodType method_;
- bool self_deleting_;
- Arg1 arg1_;
- Arg2 arg2_;
-};
-
-} // namespace internal
-
-// See Closure.
-inline Closure* NewCallback(void (*function)()) {
- return new internal::FunctionClosure0(function, true);
-}
-
-// See Closure.
-inline Closure* NewPermanentCallback(void (*function)()) {
- return new internal::FunctionClosure0(function, false);
-}
-
-// See Closure.
-template <typename Class>
-inline Closure* NewCallback(Class* object, void (Class::*method)()) {
- return new internal::MethodClosure0<Class>(object, method, true);
-}
-
-// See Closure.
-template <typename Class>
-inline Closure* NewPermanentCallback(Class* object, void (Class::*method)()) {
- return new internal::MethodClosure0<Class>(object, method, false);
-}
-
-// See Closure.
-template <typename Arg1>
-inline Closure* NewCallback(void (*function)(Arg1),
- Arg1 arg1) {
- return new internal::FunctionClosure1<Arg1>(function, true, arg1);
-}
-
-// See Closure.
-template <typename Arg1>
-inline Closure* NewPermanentCallback(void (*function)(Arg1),
- Arg1 arg1) {
- return new internal::FunctionClosure1<Arg1>(function, false, arg1);
-}
-
-// See Closure.
-template <typename Class, typename Arg1>
-inline Closure* NewCallback(Class* object, void (Class::*method)(Arg1),
- Arg1 arg1) {
- return new internal::MethodClosure1<Class, Arg1>(object, method, true, arg1);
-}
-
-// See Closure.
-template <typename Class, typename Arg1>
-inline Closure* NewPermanentCallback(Class* object, void (Class::*method)(Arg1),
- Arg1 arg1) {
- return new internal::MethodClosure1<Class, Arg1>(object, method, false, arg1);
-}
-
-// See Closure.
-template <typename Arg1, typename Arg2>
-inline Closure* NewCallback(void (*function)(Arg1, Arg2),
- Arg1 arg1, Arg2 arg2) {
- return new internal::FunctionClosure2<Arg1, Arg2>(
- function, true, arg1, arg2);
-}
-
-// See Closure.
-template <typename Arg1, typename Arg2>
-inline Closure* NewPermanentCallback(void (*function)(Arg1, Arg2),
- Arg1 arg1, Arg2 arg2) {
- return new internal::FunctionClosure2<Arg1, Arg2>(
- function, false, arg1, arg2);
-}
-
-// See Closure.
-template <typename Class, typename Arg1, typename Arg2>
-inline Closure* NewCallback(Class* object, void (Class::*method)(Arg1, Arg2),
- Arg1 arg1, Arg2 arg2) {
- return new internal::MethodClosure2<Class, Arg1, Arg2>(
- object, method, true, arg1, arg2);
-}
-
-// See Closure.
-template <typename Class, typename Arg1, typename Arg2>
-inline Closure* NewPermanentCallback(
- Class* object, void (Class::*method)(Arg1, Arg2),
- Arg1 arg1, Arg2 arg2) {
- return new internal::MethodClosure2<Class, Arg1, Arg2>(
- object, method, false, arg1, arg2);
-}
-
-// A function which does nothing. Useful for creating no-op callbacks, e.g.:
-// Closure* nothing = NewCallback(&DoNothing);
-void LIBPROTOBUF_EXPORT DoNothing();
-
-// ===================================================================
-// emulates google3/base/mutex.h
-
-namespace internal {
-
-// A Mutex is a non-reentrant (aka non-recursive) mutex. At most one thread T
-// may hold a mutex at a given time. If T attempts to Lock() the same Mutex
-// while holding it, T will deadlock.
-class LIBPROTOBUF_EXPORT Mutex {
- public:
- // Create a Mutex that is not held by anybody.
- Mutex();
-
- // Destructor
- ~Mutex();
-
- // Block if necessary until this Mutex is free, then acquire it exclusively.
- void Lock();
-
- // Release this Mutex. Caller must hold it exclusively.
- void Unlock();
-
- // Crash if this Mutex is not held exclusively by this thread.
- // May fail to crash when it should; will never crash when it should not.
- void AssertHeld();
-
- private:
- struct Internal;
- Internal* mInternal;
-
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Mutex);
-};
-
-// MutexLock(mu) acquires mu when constructed and releases it when destroyed.
-class LIBPROTOBUF_EXPORT MutexLock {
- public:
- explicit MutexLock(Mutex *mu) : mu_(mu) { this->mu_->Lock(); }
- ~MutexLock() { this->mu_->Unlock(); }
- private:
- Mutex *const mu_;
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MutexLock);
-};
-
-// TODO(kenton): Implement these? Hard to implement portably.
-typedef MutexLock ReaderMutexLock;
-typedef MutexLock WriterMutexLock;
-
-// MutexLockMaybe is like MutexLock, but is a no-op when mu is NULL.
-class LIBPROTOBUF_EXPORT MutexLockMaybe {
- public:
- explicit MutexLockMaybe(Mutex *mu) :
- mu_(mu) { if (this->mu_ != NULL) { this->mu_->Lock(); } }
- ~MutexLockMaybe() { if (this->mu_ != NULL) { this->mu_->Unlock(); } }
- private:
- Mutex *const mu_;
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MutexLockMaybe);
-};
-
-} // namespace internal
-
-// We made these internal so that they would show up as such in the docs,
-// but we don't want to stick "internal::" in front of them everywhere.
-using internal::Mutex;
-using internal::MutexLock;
-using internal::ReaderMutexLock;
-using internal::WriterMutexLock;
-using internal::MutexLockMaybe;
// ===================================================================
// from google3/util/utf8/public/unilib.h
+class StringPiece;
namespace internal {
// Checks if the buffer contains structurally-valid UTF-8. Implemented in
// structurally_valid.cc.
LIBPROTOBUF_EXPORT bool IsStructurallyValidUTF8(const char* buf, int len);
+inline bool IsStructurallyValidUTF8(const std::string& str) {
+ return IsStructurallyValidUTF8(str.data(), static_cast<int>(str.length()));
+}
+
+// Returns initial number of bytes of structually valid UTF-8.
+LIBPROTOBUF_EXPORT int UTF8SpnStructurallyValid(const StringPiece& str);
+
+// Coerce UTF-8 byte string in src_str to be
+// a structurally-valid equal-length string by selectively
+// overwriting illegal bytes with replace_char (typically ' ' or '?').
+// replace_char must be legal printable 7-bit Ascii 0x20..0x7e.
+// src_str is read-only.
+//
+// Returns pointer to output buffer, src_str.data() if no changes were made,
+// or idst if some bytes were changed. idst is allocated by the caller
+// and must be at least as big as src_str
+//
+// Optimized for: all structurally valid and no byte copying is done.
+//
+LIBPROTOBUF_EXPORT char* UTF8CoerceToStructurallyValid(
+ const StringPiece& str, char* dst, char replace_char);
+
} // namespace internal
-// ===================================================================
-// from google3/util/endian/endian.h
-LIBPROTOBUF_EXPORT uint32 ghtonl(uint32 x);
// ===================================================================
// Shutdown support.
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/fastmem.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/fastmem.h
new file mode 100644
index 0000000..763a6e6
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/fastmem.h
@@ -0,0 +1,152 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2014 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Fast memory copying and comparison routines.
+// strings::fastmemcmp_inlined() replaces memcmp()
+// strings::memcpy_inlined() replaces memcpy()
+// strings::memeq(a, b, n) replaces memcmp(a, b, n) == 0
+//
+// strings::*_inlined() routines are inline versions of the
+// routines exported by this module. Sometimes using the inlined
+// versions is faster. Measure before using the inlined versions.
+//
+// Performance measurement:
+// strings::fastmemcmp_inlined
+// Analysis: memcmp, fastmemcmp_inlined, fastmemcmp
+// 2012-01-30
+
+#ifndef GOOGLE_PROTOBUF_STUBS_FASTMEM_H_
+#define GOOGLE_PROTOBUF_STUBS_FASTMEM_H_
+
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <google/protobuf/stubs/common.h>
+
+namespace google {
+namespace protobuf {
+namespace internal {
+
+// Return true if the n bytes at a equal the n bytes at b.
+// The regions are allowed to overlap.
+//
+// The performance is similar to the performance memcmp(), but faster for
+// moderately-sized inputs, or inputs that share a common prefix and differ
+// somewhere in their last 8 bytes. Further optimizations can be added later
+// if it makes sense to do so.:w
+inline bool memeq(const char* a, const char* b, size_t n) {
+ size_t n_rounded_down = n & ~static_cast<size_t>(7);
+ if (GOOGLE_PREDICT_FALSE(n_rounded_down == 0)) { // n <= 7
+ return memcmp(a, b, n) == 0;
+ }
+ // n >= 8
+ uint64 u = GOOGLE_UNALIGNED_LOAD64(a) ^ GOOGLE_UNALIGNED_LOAD64(b);
+ uint64 v = GOOGLE_UNALIGNED_LOAD64(a + n - 8) ^ GOOGLE_UNALIGNED_LOAD64(b + n - 8);
+ if ((u | v) != 0) { // The first or last 8 bytes differ.
+ return false;
+ }
+ a += 8;
+ b += 8;
+ n = n_rounded_down - 8;
+ if (n > 128) {
+ // As of 2012, memcmp on x86-64 uses a big unrolled loop with SSE2
+ // instructions, and while we could try to do something faster, it
+ // doesn't seem worth pursuing.
+ return memcmp(a, b, n) == 0;
+ }
+ for (; n >= 16; n -= 16) {
+ uint64 x = GOOGLE_UNALIGNED_LOAD64(a) ^ GOOGLE_UNALIGNED_LOAD64(b);
+ uint64 y = GOOGLE_UNALIGNED_LOAD64(a + 8) ^ GOOGLE_UNALIGNED_LOAD64(b + 8);
+ if ((x | y) != 0) {
+ return false;
+ }
+ a += 16;
+ b += 16;
+ }
+ // n must be 0 or 8 now because it was a multiple of 8 at the top of the loop.
+ return n == 0 || GOOGLE_UNALIGNED_LOAD64(a) == GOOGLE_UNALIGNED_LOAD64(b);
+}
+
+inline int fastmemcmp_inlined(const char *a, const char *b, size_t n) {
+ if (n >= 64) {
+ return memcmp(a, b, n);
+ }
+ const char* a_limit = a + n;
+ while (a + sizeof(uint64) <= a_limit &&
+ GOOGLE_UNALIGNED_LOAD64(a) == GOOGLE_UNALIGNED_LOAD64(b)) {
+ a += sizeof(uint64);
+ b += sizeof(uint64);
+ }
+ if (a + sizeof(uint32) <= a_limit &&
+ GOOGLE_UNALIGNED_LOAD32(a) == GOOGLE_UNALIGNED_LOAD32(b)) {
+ a += sizeof(uint32);
+ b += sizeof(uint32);
+ }
+ while (a < a_limit) {
+ int d = static_cast<uint32>(*a++) - static_cast<uint32>(*b++);
+ if (d) return d;
+ }
+ return 0;
+}
+
+// The standard memcpy operation is slow for variable small sizes.
+// This implementation inlines the optimal realization for sizes 1 to 16.
+// To avoid code bloat don't use it in case of not performance-critical spots,
+// nor when you don't expect very frequent values of size <= 16.
+inline void memcpy_inlined(char *dst, const char *src, size_t size) {
+ // Compiler inlines code with minimal amount of data movement when third
+ // parameter of memcpy is a constant.
+ switch (size) {
+ case 1: memcpy(dst, src, 1); break;
+ case 2: memcpy(dst, src, 2); break;
+ case 3: memcpy(dst, src, 3); break;
+ case 4: memcpy(dst, src, 4); break;
+ case 5: memcpy(dst, src, 5); break;
+ case 6: memcpy(dst, src, 6); break;
+ case 7: memcpy(dst, src, 7); break;
+ case 8: memcpy(dst, src, 8); break;
+ case 9: memcpy(dst, src, 9); break;
+ case 10: memcpy(dst, src, 10); break;
+ case 11: memcpy(dst, src, 11); break;
+ case 12: memcpy(dst, src, 12); break;
+ case 13: memcpy(dst, src, 13); break;
+ case 14: memcpy(dst, src, 14); break;
+ case 15: memcpy(dst, src, 15); break;
+ case 16: memcpy(dst, src, 16); break;
+ default: memcpy(dst, src, size); break;
+ }
+}
+
+} // namespace internal
+} // namespace protobuf
+} // namespace google
+
+#endif // GOOGLE_PROTOBUF_STUBS_FASTMEM_H_
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/hash.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/hash.h
new file mode 100644
index 0000000..4eac7d5
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/hash.h
@@ -0,0 +1,438 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Author: kenton@google.com (Kenton Varda)
+//
+// Deals with the fact that hash_map is not defined everywhere.
+
+#ifndef GOOGLE_PROTOBUF_STUBS_HASH_H__
+#define GOOGLE_PROTOBUF_STUBS_HASH_H__
+
+#include <string.h>
+#include <google/protobuf/stubs/common.h>
+
+#define GOOGLE_PROTOBUF_HAVE_HASH_MAP 1
+#define GOOGLE_PROTOBUF_HAVE_HASH_SET 1
+
+// Android
+#if defined(__ANDROID__)
+# undef GOOGLE_PROTOBUF_HAVE_HASH_MAP
+# undef GOOGLE_PROTOBUF_HAVE_HASH_MAP
+
+// Use C++11 unordered_{map|set} if available.
+#elif ((_LIBCPP_STD_VER >= 11) || \
+ (((__cplusplus >= 201103L) || defined(__GXX_EXPERIMENTAL_CXX0X)) && \
+ (__GLIBCXX__ > 20090421)))
+# define GOOGLE_PROTOBUF_HAS_CXX11_HASH
+
+// For XCode >= 4.6: the compiler is clang with libc++.
+// For earlier XCode version: the compiler is gcc-4.2.1 with libstdc++.
+// libc++ provides <unordered_map> and friends even in non C++11 mode,
+// and it does not provide the tr1 library. Therefore the following macro
+// checks against this special case.
+// Note that we should not test the __APPLE_CC__ version number or the
+// __clang__ macro, since the new compiler can still use -stdlib=libstdc++, in
+// which case <unordered_map> is not compilable without -std=c++11
+#elif defined(__APPLE_CC__)
+# if __GNUC__ >= 4
+# define GOOGLE_PROTOBUF_HAS_TR1
+# else
+// Not tested for gcc < 4... These setting can compile under 4.2.1 though.
+# define GOOGLE_PROTOBUF_HASH_NAMESPACE __gnu_cxx
+# include <ext/hash_map>
+# define GOOGLE_PROTOBUF_HASH_MAP_CLASS hash_map
+# include <ext/hash_set>
+# define GOOGLE_PROTOBUF_HASH_SET_CLASS hash_set
+# endif
+
+// Version checks for gcc.
+#elif defined(__GNUC__)
+// For GCC 4.x+, use tr1::unordered_map/set; otherwise, follow the
+// instructions from:
+// https://gcc.gnu.org/onlinedocs/libstdc++/manual/backwards.html
+# if __GNUC__ >= 4
+# define GOOGLE_PROTOBUF_HAS_TR1
+# elif __GNUC__ >= 3
+# include <backward/hash_map>
+# define GOOGLE_PROTOBUF_HASH_MAP_CLASS hash_map
+# include <backward/hash_set>
+# define GOOGLE_PROTOBUF_HASH_SET_CLASS hash_set
+# if __GNUC__ == 3 && __GNUC_MINOR__ == 0
+# define GOOGLE_PROTOBUF_HASH_NAMESPACE std // GCC 3.0
+# else
+# define GOOGLE_PROTOBUF_HASH_NAMESPACE __gnu_cxx // GCC 3.1 and later
+# endif
+# else
+# define GOOGLE_PROTOBUF_HASH_NAMESPACE
+# include <hash_map>
+# define GOOGLE_PROTOBUF_HASH_MAP_CLASS hash_map
+# include <hash_set>
+# define GOOGLE_PROTOBUF_HASH_SET_CLASS hash_set
+# endif
+
+// Version checks for MSC.
+// Apparently Microsoft decided to move hash_map *back* to the std namespace in
+// MSVC 2010:
+// http://blogs.msdn.com/vcblog/archive/2009/05/25/stl-breaking-changes-in-visual-studio-2010-beta-1.aspx
+// And.. they are moved back to stdext in MSVC 2013 (haven't checked 2012). That
+// said, use unordered_map for MSVC 2010 and beyond is our safest bet.
+#elif defined(_MSC_VER)
+# if _MSC_VER >= 1600 // Since Visual Studio 2010
+# define GOOGLE_PROTOBUF_HAS_CXX11_HASH
+# define GOOGLE_PROTOBUF_HASH_COMPARE std::hash_compare
+# elif _MSC_VER >= 1500 // Since Visual Studio 2008
+# define GOOGLE_PROTOBUF_HASH_NAMESPACE stdext
+# include <hash_map>
+# define GOOGLE_PROTOBUF_HASH_MAP_CLASS hash_map
+# include <hash_set>
+# define GOOGLE_PROTOBUF_HASH_SET_CLASS hash_set
+# define GOOGLE_PROTOBUF_HASH_COMPARE stdext::hash_compare
+# define GOOGLE_PROTOBUF_CONTAINERS_NEED_HASH_COMPARE
+# elif _MSC_VER >= 1310
+# define GOOGLE_PROTOBUF_HASH_NAMESPACE stdext
+# include <hash_map>
+# define GOOGLE_PROTOBUF_HASH_MAP_CLASS hash_map
+# include <hash_set>
+# define GOOGLE_PROTOBUF_HASH_SET_CLASS hash_set
+# define GOOGLE_PROTOBUF_HASH_COMPARE stdext::hash_compare
+# else
+# define GOOGLE_PROTOBUF_HASH_NAMESPACE std
+# include <hash_map>
+# define GOOGLE_PROTOBUF_HASH_MAP_CLASS hash_map
+# include <hash_set>
+# define GOOGLE_PROTOBUF_HASH_SET_CLASS hash_set
+# define GOOGLE_PROTOBUF_HASH_COMPARE stdext::hash_compare
+# endif
+
+// **ADD NEW COMPILERS SUPPORT HERE.**
+// For other compilers, undefine the macro and fallback to use std::map, in
+// google/protobuf/stubs/hash.h
+#else
+# undef GOOGLE_PROTOBUF_HAVE_HASH_MAP
+# undef GOOGLE_PROTOBUF_HAVE_HASH_SET
+#endif
+
+#if defined(GOOGLE_PROTOBUF_HAS_CXX11_HASH)
+# define GOOGLE_PROTOBUF_HASH_NAMESPACE std
+# include <unordered_map>
+# define GOOGLE_PROTOBUF_HASH_MAP_CLASS unordered_map
+# include <unordered_set>
+# define GOOGLE_PROTOBUF_HASH_SET_CLASS unordered_set
+#elif defined(GOOGLE_PROTOBUF_HAS_TR1)
+# define GOOGLE_PROTOBUF_HASH_NAMESPACE std::tr1
+# include <tr1/unordered_map>
+# define GOOGLE_PROTOBUF_HASH_MAP_CLASS unordered_map
+# include <tr1/unordered_set>
+# define GOOGLE_PROTOBUF_HASH_SET_CLASS unordered_set
+#endif
+
+# define GOOGLE_PROTOBUF_HASH_NAMESPACE_DECLARATION_START \
+ namespace google { \
+ namespace protobuf {
+# define GOOGLE_PROTOBUF_HASH_NAMESPACE_DECLARATION_END }}
+
+#undef GOOGLE_PROTOBUF_HAS_CXX11_HASH
+#undef GOOGLE_PROTOBUF_HAS_TR1
+
+#if defined(GOOGLE_PROTOBUF_HAVE_HASH_MAP) && \
+ defined(GOOGLE_PROTOBUF_HAVE_HASH_SET)
+#else
+#define GOOGLE_PROTOBUF_MISSING_HASH
+#include <map>
+#include <set>
+#endif
+
+namespace google {
+namespace protobuf {
+
+#ifdef GOOGLE_PROTOBUF_MISSING_HASH
+#undef GOOGLE_PROTOBUF_MISSING_HASH
+
+// This system doesn't have hash_map or hash_set. Emulate them using map and
+// set.
+
+// Make hash<T> be the same as less<T>. Note that everywhere where custom
+// hash functions are defined in the protobuf code, they are also defined such
+// that they can be used as "less" functions, which is required by MSVC anyway.
+template <typename Key>
+struct hash {
+ // Dummy, just to make derivative hash functions compile.
+ int operator()(const Key& key) {
+ GOOGLE_LOG(FATAL) << "Should never be called.";
+ return 0;
+ }
+
+ inline bool operator()(const Key& a, const Key& b) const {
+ return a < b;
+ }
+};
+
+// Make sure char* is compared by value.
+template <>
+struct hash<const char*> {
+ // Dummy, just to make derivative hash functions compile.
+ int operator()(const char* key) {
+ GOOGLE_LOG(FATAL) << "Should never be called.";
+ return 0;
+ }
+
+ inline bool operator()(const char* a, const char* b) const {
+ return strcmp(a, b) < 0;
+ }
+};
+
+template <typename Key, typename Data,
+ typename HashFcn = hash<Key>,
+ typename EqualKey = std::equal_to<Key>,
+ typename Alloc = std::allocator< std::pair<const Key, Data> > >
+class hash_map : public std::map<Key, Data, HashFcn, Alloc> {
+ typedef std::map<Key, Data, HashFcn, Alloc> BaseClass;
+
+ public:
+ hash_map(int a = 0, const HashFcn& b = HashFcn(),
+ const EqualKey& c = EqualKey(),
+ const Alloc& d = Alloc()) : BaseClass(b, d) {}
+
+ HashFcn hash_function() const { return HashFcn(); }
+};
+
+template <typename Key,
+ typename HashFcn = hash<Key>,
+ typename EqualKey = std::equal_to<Key> >
+class hash_set : public std::set<Key, HashFcn> {
+ public:
+ hash_set(int = 0) {}
+
+ HashFcn hash_function() const { return HashFcn(); }
+};
+
+#elif defined(_MSC_VER) && !defined(_STLPORT_VERSION)
+
+template <typename Key>
+struct hash : public GOOGLE_PROTOBUF_HASH_COMPARE<Key> {
+};
+
+// MSVC's hash_compare<const char*> hashes based on the string contents but
+// compares based on the string pointer. WTF?
+class CstringLess {
+ public:
+ inline bool operator()(const char* a, const char* b) const {
+ return strcmp(a, b) < 0;
+ }
+};
+
+template <>
+struct hash<const char*>
+ : public GOOGLE_PROTOBUF_HASH_COMPARE<const char*, CstringLess> {};
+
+#ifdef GOOGLE_PROTOBUF_CONTAINERS_NEED_HASH_COMPARE
+
+template <typename Key, typename HashFcn, typename EqualKey>
+struct InternalHashCompare : public GOOGLE_PROTOBUF_HASH_COMPARE<Key> {
+ InternalHashCompare() {}
+ InternalHashCompare(HashFcn hashfcn, EqualKey equalkey)
+ : hashfcn_(hashfcn), equalkey_(equalkey) {}
+ size_t operator()(const Key& key) const { return hashfcn_(key); }
+ bool operator()(const Key& key1, const Key& key2) const {
+ return !equalkey_(key1, key2);
+ }
+ HashFcn hashfcn_;
+ EqualKey equalkey_;
+};
+
+template <typename Key, typename Data,
+ typename HashFcn = hash<Key>,
+ typename EqualKey = std::equal_to<Key>,
+ typename Alloc = std::allocator< std::pair<const Key, Data> > >
+class hash_map
+ : public GOOGLE_PROTOBUF_HASH_NAMESPACE::GOOGLE_PROTOBUF_HASH_MAP_CLASS<
+ Key, Data, InternalHashCompare<Key, HashFcn, EqualKey>, Alloc> {
+ typedef GOOGLE_PROTOBUF_HASH_NAMESPACE::GOOGLE_PROTOBUF_HASH_MAP_CLASS<
+ Key, Data, InternalHashCompare<Key, HashFcn, EqualKey>, Alloc> BaseClass;
+
+ public:
+ hash_map(int a = 0, const HashFcn& b = HashFcn(),
+ const EqualKey& c = EqualKey(), const Alloc& d = Alloc())
+ : BaseClass(InternalHashCompare<Key, HashFcn, EqualKey>(b, c), d) {}
+
+ HashFcn hash_function() const { return HashFcn(); }
+};
+
+template <typename Key, typename HashFcn = hash<Key>,
+ typename EqualKey = std::equal_to<Key> >
+class hash_set
+ : public GOOGLE_PROTOBUF_HASH_NAMESPACE::GOOGLE_PROTOBUF_HASH_SET_CLASS<
+ Key, InternalHashCompare<Key, HashFcn, EqualKey> > {
+ public:
+ hash_set(int = 0) {}
+
+ HashFcn hash_function() const { return HashFcn(); }
+};
+
+#else // GOOGLE_PROTOBUF_CONTAINERS_NEED_HASH_COMPARE
+
+template <typename Key, typename Data,
+ typename HashFcn = hash<Key>,
+ typename EqualKey = std::equal_to<Key>,
+ typename Alloc = std::allocator< std::pair<const Key, Data> > >
+class hash_map
+ : public GOOGLE_PROTOBUF_HASH_NAMESPACE::GOOGLE_PROTOBUF_HASH_MAP_CLASS<
+ Key, Data, HashFcn, EqualKey, Alloc> {
+ typedef GOOGLE_PROTOBUF_HASH_NAMESPACE::GOOGLE_PROTOBUF_HASH_MAP_CLASS<
+ Key, Data, HashFcn, EqualKey, Alloc> BaseClass;
+
+ public:
+ hash_map(int a = 0, const HashFcn& b = HashFcn(),
+ const EqualKey& c = EqualKey(),
+ const Alloc& d = Alloc()) : BaseClass(a, b, c, d) {}
+
+ HashFcn hash_function() const { return HashFcn(); }
+};
+
+template <typename Key, typename HashFcn = hash<Key>,
+ typename EqualKey = std::equal_to<Key> >
+class hash_set
+ : public GOOGLE_PROTOBUF_HASH_NAMESPACE::GOOGLE_PROTOBUF_HASH_SET_CLASS<
+ Key, HashFcn, EqualKey> {
+ public:
+ hash_set(int = 0) {}
+
+ HashFcn hash_function() const { return HashFcn(); }
+};
+#endif // GOOGLE_PROTOBUF_CONTAINERS_NEED_HASH_COMPARE
+
+#else // defined(_MSC_VER) && !defined(_STLPORT_VERSION)
+
+template <typename Key>
+struct hash : public GOOGLE_PROTOBUF_HASH_NAMESPACE::hash<Key> {
+};
+
+template <typename Key>
+struct hash<const Key*> {
+ inline size_t operator()(const Key* key) const {
+ return reinterpret_cast<size_t>(key);
+ }
+};
+
+// Unlike the old SGI version, the TR1 "hash" does not special-case char*. So,
+// we go ahead and provide our own implementation.
+template <>
+struct hash<const char*> {
+ inline size_t operator()(const char* str) const {
+ size_t result = 0;
+ for (; *str != '\0'; str++) {
+ result = 5 * result + *str;
+ }
+ return result;
+ }
+};
+
+template<>
+struct hash<bool> {
+ size_t operator()(bool x) const {
+ return static_cast<size_t>(x);
+ }
+};
+
+template <typename Key, typename Data,
+ typename HashFcn = hash<Key>,
+ typename EqualKey = std::equal_to<Key>,
+ typename Alloc = std::allocator< std::pair<const Key, Data> > >
+class hash_map
+ : public GOOGLE_PROTOBUF_HASH_NAMESPACE::GOOGLE_PROTOBUF_HASH_MAP_CLASS<
+ Key, Data, HashFcn, EqualKey, Alloc> {
+ typedef GOOGLE_PROTOBUF_HASH_NAMESPACE::GOOGLE_PROTOBUF_HASH_MAP_CLASS<
+ Key, Data, HashFcn, EqualKey, Alloc> BaseClass;
+
+ public:
+ hash_map(int a = 0, const HashFcn& b = HashFcn(),
+ const EqualKey& c = EqualKey(),
+ const Alloc& d = Alloc()) : BaseClass(a, b, c, d) {}
+
+ HashFcn hash_function() const { return HashFcn(); }
+};
+
+template <typename Key, typename HashFcn = hash<Key>,
+ typename EqualKey = std::equal_to<Key> >
+class hash_set
+ : public GOOGLE_PROTOBUF_HASH_NAMESPACE::GOOGLE_PROTOBUF_HASH_SET_CLASS<
+ Key, HashFcn, EqualKey> {
+ public:
+ hash_set(int = 0) {}
+
+ HashFcn hash_function() const { return HashFcn(); }
+};
+
+#endif // !GOOGLE_PROTOBUF_MISSING_HASH
+
+template <>
+struct hash<string> {
+ inline size_t operator()(const string& key) const {
+ return hash<const char*>()(key.c_str());
+ }
+
+ static const size_t bucket_size = 4;
+ static const size_t min_buckets = 8;
+ inline bool operator()(const string& a, const string& b) const {
+ return a < b;
+ }
+};
+
+template <typename First, typename Second>
+struct hash<pair<First, Second> > {
+ inline size_t operator()(const pair<First, Second>& key) const {
+ size_t first_hash = hash<First>()(key.first);
+ size_t second_hash = hash<Second>()(key.second);
+
+ // FIXME(kenton): What is the best way to compute this hash? I have
+ // no idea! This seems a bit better than an XOR.
+ return first_hash * ((1 << 16) - 1) + second_hash;
+ }
+
+ static const size_t bucket_size = 4;
+ static const size_t min_buckets = 8;
+ inline bool operator()(const pair<First, Second>& a,
+ const pair<First, Second>& b) const {
+ return a < b;
+ }
+};
+
+// Used by GCC/SGI STL only. (Why isn't this provided by the standard
+// library? :( )
+struct streq {
+ inline bool operator()(const char* a, const char* b) const {
+ return strcmp(a, b) == 0;
+ }
+};
+
+} // namespace protobuf
+} // namespace google
+
+#endif // GOOGLE_PROTOBUF_STUBS_HASH_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/logging.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/logging.h
new file mode 100644
index 0000000..f69605d
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/logging.h
@@ -0,0 +1,237 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_STUBS_LOGGING_H_
+#define GOOGLE_PROTOBUF_STUBS_LOGGING_H_
+
+#include <google/protobuf/stubs/macros.h>
+#include <google/protobuf/stubs/port.h>
+
+// ===================================================================
+// emulates google3/base/logging.h
+
+namespace google {
+namespace protobuf {
+
+enum LogLevel {
+ LOGLEVEL_INFO, // Informational. This is never actually used by
+ // libprotobuf.
+ LOGLEVEL_WARNING, // Warns about issues that, although not technically a
+ // problem now, could cause problems in the future. For
+ // example, a // warning will be printed when parsing a
+ // message that is near the message size limit.
+ LOGLEVEL_ERROR, // An error occurred which should never happen during
+ // normal use.
+ LOGLEVEL_FATAL, // An error occurred from which the library cannot
+ // recover. This usually indicates a programming error
+ // in the code which calls the library, especially when
+ // compiled in debug mode.
+
+#ifdef NDEBUG
+ LOGLEVEL_DFATAL = LOGLEVEL_ERROR
+#else
+ LOGLEVEL_DFATAL = LOGLEVEL_FATAL
+#endif
+};
+
+class StringPiece;
+namespace util {
+class Status;
+}
+class uint128;
+namespace internal {
+
+class LogFinisher;
+
+class LIBPROTOBUF_EXPORT LogMessage {
+ public:
+ LogMessage(LogLevel level, const char* filename, int line);
+ ~LogMessage();
+
+ LogMessage& operator<<(const std::string& value);
+ LogMessage& operator<<(const char* value);
+ LogMessage& operator<<(char value);
+ LogMessage& operator<<(int value);
+ LogMessage& operator<<(uint value);
+ LogMessage& operator<<(long value);
+ LogMessage& operator<<(unsigned long value);
+ LogMessage& operator<<(long long value);
+ LogMessage& operator<<(unsigned long long value);
+ LogMessage& operator<<(double value);
+ LogMessage& operator<<(void* value);
+ LogMessage& operator<<(const StringPiece& value);
+ LogMessage& operator<<(const ::google::protobuf::util::Status& status);
+ LogMessage& operator<<(const uint128& value);
+
+ private:
+ friend class LogFinisher;
+ void Finish();
+
+ LogLevel level_;
+ const char* filename_;
+ int line_;
+ std::string message_;
+};
+
+// Used to make the entire "LOG(BLAH) << etc." expression have a void return
+// type and print a newline after each message.
+class LIBPROTOBUF_EXPORT LogFinisher {
+ public:
+ void operator=(LogMessage& other);
+};
+
+template<typename T>
+bool IsOk(T status) { return status.ok(); }
+template<>
+inline bool IsOk(bool status) { return status; }
+
+} // namespace internal
+
+// Undef everything in case we're being mixed with some other Google library
+// which already defined them itself. Presumably all Google libraries will
+// support the same syntax for these so it should not be a big deal if they
+// end up using our definitions instead.
+#undef GOOGLE_LOG
+#undef GOOGLE_LOG_IF
+
+#undef GOOGLE_CHECK
+#undef GOOGLE_CHECK_OK
+#undef GOOGLE_CHECK_EQ
+#undef GOOGLE_CHECK_NE
+#undef GOOGLE_CHECK_LT
+#undef GOOGLE_CHECK_LE
+#undef GOOGLE_CHECK_GT
+#undef GOOGLE_CHECK_GE
+#undef GOOGLE_CHECK_NOTNULL
+
+#undef GOOGLE_DLOG
+#undef GOOGLE_DCHECK
+#undef GOOGLE_DCHECK_OK
+#undef GOOGLE_DCHECK_EQ
+#undef GOOGLE_DCHECK_NE
+#undef GOOGLE_DCHECK_LT
+#undef GOOGLE_DCHECK_LE
+#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_IF(LEVEL, CONDITION) \
+ !(CONDITION) ? (void)0 : GOOGLE_LOG(LEVEL)
+
+#define GOOGLE_CHECK(EXPRESSION) \
+ GOOGLE_LOG_IF(FATAL, !(EXPRESSION)) << "CHECK failed: " #EXPRESSION ": "
+#define GOOGLE_CHECK_OK(A) GOOGLE_CHECK(::google::protobuf::internal::IsOk(A))
+#define GOOGLE_CHECK_EQ(A, B) GOOGLE_CHECK((A) == (B))
+#define GOOGLE_CHECK_NE(A, B) GOOGLE_CHECK((A) != (B))
+#define GOOGLE_CHECK_LT(A, B) GOOGLE_CHECK((A) < (B))
+#define GOOGLE_CHECK_LE(A, B) GOOGLE_CHECK((A) <= (B))
+#define GOOGLE_CHECK_GT(A, B) GOOGLE_CHECK((A) > (B))
+#define GOOGLE_CHECK_GE(A, B) GOOGLE_CHECK((A) >= (B))
+
+namespace internal {
+template<typename T>
+T* CheckNotNull(const char* /* file */, int /* line */,
+ const char* name, T* val) {
+ if (val == NULL) {
+ GOOGLE_LOG(FATAL) << name;
+ }
+ return val;
+}
+} // namespace internal
+#define GOOGLE_CHECK_NOTNULL(A) \
+ ::google::protobuf::internal::CheckNotNull(\
+ __FILE__, __LINE__, "'" #A "' must not be NULL", (A))
+
+#ifdef NDEBUG
+
+#define GOOGLE_DLOG(LEVEL) GOOGLE_LOG_IF(LEVEL, false)
+
+#define GOOGLE_DCHECK(EXPRESSION) while(false) GOOGLE_CHECK(EXPRESSION)
+#define GOOGLE_DCHECK_OK(E) GOOGLE_DCHECK(::google::protobuf::internal::IsOk(E))
+#define GOOGLE_DCHECK_EQ(A, B) GOOGLE_DCHECK((A) == (B))
+#define GOOGLE_DCHECK_NE(A, B) GOOGLE_DCHECK((A) != (B))
+#define GOOGLE_DCHECK_LT(A, B) GOOGLE_DCHECK((A) < (B))
+#define GOOGLE_DCHECK_LE(A, B) GOOGLE_DCHECK((A) <= (B))
+#define GOOGLE_DCHECK_GT(A, B) GOOGLE_DCHECK((A) > (B))
+#define GOOGLE_DCHECK_GE(A, B) GOOGLE_DCHECK((A) >= (B))
+
+#else // NDEBUG
+
+#define GOOGLE_DLOG GOOGLE_LOG
+
+#define GOOGLE_DCHECK GOOGLE_CHECK
+#define GOOGLE_DCHECK_OK GOOGLE_CHECK_OK
+#define GOOGLE_DCHECK_EQ GOOGLE_CHECK_EQ
+#define GOOGLE_DCHECK_NE GOOGLE_CHECK_NE
+#define GOOGLE_DCHECK_LT GOOGLE_CHECK_LT
+#define GOOGLE_DCHECK_LE GOOGLE_CHECK_LE
+#define GOOGLE_DCHECK_GT GOOGLE_CHECK_GT
+#define GOOGLE_DCHECK_GE GOOGLE_CHECK_GE
+
+#endif // !NDEBUG
+
+typedef void LogHandler(LogLevel level, const char* filename, int line,
+ const std::string& message);
+
+// The protobuf library sometimes writes warning and error messages to
+// stderr. These messages are primarily useful for developers, but may
+// also help end users figure out a problem. If you would prefer that
+// these messages be sent somewhere other than stderr, call SetLogHandler()
+// to set your own handler. This returns the old handler. Set the handler
+// to NULL to ignore log messages (but see also LogSilencer, below).
+//
+// Obviously, SetLogHandler is not thread-safe. You should only call it
+// at initialization time, and probably not from library code. If you
+// simply want to suppress log messages temporarily (e.g. because you
+// have some code that tends to trigger them frequently and you know
+// the warnings are not important to you), use the LogSilencer class
+// below.
+LIBPROTOBUF_EXPORT LogHandler* SetLogHandler(LogHandler* new_func);
+
+// Create a LogSilencer if you want to temporarily suppress all log
+// messages. As long as any LogSilencer objects exist, non-fatal
+// log messages will be discarded (the current LogHandler will *not*
+// be called). Constructing a LogSilencer is thread-safe. You may
+// accidentally suppress log messages occurring in another thread, but
+// since messages are generally for debugging purposes only, this isn't
+// a big deal. If you want to intercept log messages, use SetLogHandler().
+class LIBPROTOBUF_EXPORT LogSilencer {
+ public:
+ LogSilencer();
+ ~LogSilencer();
+};
+
+} // namespace protobuf
+} // namespace google
+
+#endif // GOOGLE_PROTOBUF_STUBS_LOGGING_H_
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/macros.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/macros.h
new file mode 100644
index 0000000..0e9a9ec
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/macros.h
@@ -0,0 +1,168 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_MACROS_H__
+#define GOOGLE_PROTOBUF_MACROS_H__
+
+#include <google/protobuf/stubs/port.h>
+
+namespace google {
+namespace protobuf {
+
+#undef GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
+#define GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TypeName) \
+ TypeName(const TypeName&); \
+ void operator=(const TypeName&)
+
+#undef GOOGLE_DISALLOW_IMPLICIT_CONSTRUCTORS
+#define GOOGLE_DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
+ TypeName(); \
+ TypeName(const TypeName&); \
+ void operator=(const TypeName&)
+
+// ===================================================================
+// from google3/base/basictypes.h
+
+// The GOOGLE_ARRAYSIZE(arr) macro returns the # of elements in an array arr.
+// The expression is a compile-time constant, and therefore can be
+// used in defining new arrays, for example.
+//
+// GOOGLE_ARRAYSIZE catches a few type errors. If you see a compiler error
+//
+// "warning: division by zero in ..."
+//
+// when using GOOGLE_ARRAYSIZE, you are (wrongfully) giving it a pointer.
+// You should only use GOOGLE_ARRAYSIZE on statically allocated arrays.
+//
+// The following comments are on the implementation details, and can
+// be ignored by the users.
+//
+// ARRAYSIZE(arr) works by inspecting sizeof(arr) (the # of bytes in
+// the array) and sizeof(*(arr)) (the # of bytes in one array
+// element). If the former is divisible by the latter, perhaps arr is
+// indeed an array, in which case the division result is the # of
+// elements in the array. Otherwise, arr cannot possibly be an array,
+// and we generate a compiler error to prevent the code from
+// compiling.
+//
+// Since the size of bool is implementation-defined, we need to cast
+// !(sizeof(a) & sizeof(*(a))) to size_t in order to ensure the final
+// result has type size_t.
+//
+// This macro is not perfect as it wrongfully accepts certain
+// pointers, namely where the pointer size is divisible by the pointee
+// size. Since all our code has to go through a 32-bit compiler,
+// where a pointer is 4 bytes, this means all pointers to a type whose
+// size is 3 or greater than 4 will be (righteously) rejected.
+//
+// Kudos to Jorg Brown for this simple and elegant implementation.
+
+#undef GOOGLE_ARRAYSIZE
+#define GOOGLE_ARRAYSIZE(a) \
+ ((sizeof(a) / sizeof(*(a))) / \
+ static_cast<size_t>(!(sizeof(a) % sizeof(*(a)))))
+
+// The COMPILE_ASSERT macro can be used to verify that a compile time
+// expression is true. For example, you could use it to verify the
+// size of a static array:
+//
+// COMPILE_ASSERT(ARRAYSIZE(content_type_names) == CONTENT_NUM_TYPES,
+// content_type_names_incorrect_size);
+//
+// or to make sure a struct is smaller than a certain size:
+//
+// COMPILE_ASSERT(sizeof(foo) < 128, foo_too_large);
+//
+// The second argument to the macro is the name of the variable. If
+// the expression is false, most compilers will issue a warning/error
+// containing the name of the variable.
+
+namespace internal {
+
+template <bool>
+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<bool(expr)>
+//
+// 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
+
+#endif // GOOGLE_PROTOBUF_MACROS_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/mutex.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/mutex.h
new file mode 100644
index 0000000..7ef1cb6
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/mutex.h
@@ -0,0 +1,148 @@
+// Copyright (c) 2006, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_STUBS_MUTEX_H_
+#define GOOGLE_PROTOBUF_STUBS_MUTEX_H_
+
+#ifdef GOOGLE_PROTOBUF_NO_THREADLOCAL
+#include <pthread.h>
+#endif
+
+#include <google/protobuf/stubs/macros.h>
+
+// ===================================================================
+// emulates google3/base/mutex.h
+namespace google {
+namespace protobuf {
+namespace internal {
+
+// A Mutex is a non-reentrant (aka non-recursive) mutex. At most one thread T
+// may hold a mutex at a given time. If T attempts to Lock() the same Mutex
+// while holding it, T will deadlock.
+class LIBPROTOBUF_EXPORT Mutex {
+ public:
+ // Create a Mutex that is not held by anybody.
+ Mutex();
+
+ // Destructor
+ ~Mutex();
+
+ // Block if necessary until this Mutex is free, then acquire it exclusively.
+ void Lock();
+
+ // Release this Mutex. Caller must hold it exclusively.
+ void Unlock();
+
+ // Crash if this Mutex is not held exclusively by this thread.
+ // May fail to crash when it should; will never crash when it should not.
+ void AssertHeld();
+
+ private:
+ struct Internal;
+ Internal* mInternal;
+
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Mutex);
+};
+
+// Undefine the macros to workaround the conflicts with Google internal
+// MutexLock implementation.
+// TODO(liujisi): Remove the undef once internal macros are removed.
+#undef MutexLock
+#undef ReaderMutexLock
+#undef WriterMutexLock
+#undef MutexLockMaybe
+
+// MutexLock(mu) acquires mu when constructed and releases it when destroyed.
+class LIBPROTOBUF_EXPORT MutexLock {
+ public:
+ explicit MutexLock(Mutex *mu) : mu_(mu) { this->mu_->Lock(); }
+ ~MutexLock() { this->mu_->Unlock(); }
+ private:
+ Mutex *const mu_;
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MutexLock);
+};
+
+// TODO(kenton): Implement these? Hard to implement portably.
+typedef MutexLock ReaderMutexLock;
+typedef MutexLock WriterMutexLock;
+
+// MutexLockMaybe is like MutexLock, but is a no-op when mu is NULL.
+class LIBPROTOBUF_EXPORT MutexLockMaybe {
+ public:
+ explicit MutexLockMaybe(Mutex *mu) :
+ mu_(mu) { if (this->mu_ != NULL) { this->mu_->Lock(); } }
+ ~MutexLockMaybe() { if (this->mu_ != NULL) { this->mu_->Unlock(); } }
+ private:
+ Mutex *const mu_;
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MutexLockMaybe);
+};
+
+#if defined(GOOGLE_PROTOBUF_NO_THREADLOCAL)
+template<typename T>
+class ThreadLocalStorage {
+ public:
+ ThreadLocalStorage() {
+ pthread_key_create(&key_, &ThreadLocalStorage::Delete);
+ }
+ ~ThreadLocalStorage() {
+ pthread_key_delete(key_);
+ }
+ T* Get() {
+ T* result = static_cast<T*>(pthread_getspecific(key_));
+ if (result == NULL) {
+ result = new T();
+ pthread_setspecific(key_, result);
+ }
+ return result;
+ }
+ private:
+ static void Delete(void* value) {
+ delete static_cast<T*>(value);
+ }
+ pthread_key_t key_;
+
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ThreadLocalStorage);
+};
+#endif
+
+} // namespace internal
+
+// We made these internal so that they would show up as such in the docs,
+// but we don't want to stick "internal::" in front of them everywhere.
+using internal::Mutex;
+using internal::MutexLock;
+using internal::ReaderMutexLock;
+using internal::WriterMutexLock;
+using internal::MutexLockMaybe;
+
+
+} // namespace protobuf
+} // namespace google
+
+#endif // GOOGLE_PROTOBUF_STUBS_MUTEX_H_
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/once.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/once.h
index cc62bba..1f082c3 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/once.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/once.h
@@ -79,6 +79,7 @@
#define GOOGLE_PROTOBUF_STUBS_ONCE_H__
#include <google/protobuf/stubs/atomicops.h>
+#include <google/protobuf/stubs/callback.h>
#include <google/protobuf/stubs/common.h>
namespace google {
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/platform_macros.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/platform_macros.h
index 7956d07..4ba4b34 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/platform_macros.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/platform_macros.h
@@ -31,8 +31,6 @@
#ifndef GOOGLE_PROTOBUF_PLATFORM_MACROS_H_
#define GOOGLE_PROTOBUF_PLATFORM_MACROS_H_
-#include <google/protobuf/stubs/common.h>
-
#define GOOGLE_PROTOBUF_PLATFORM_ERROR \
#error "Host platform was not detected as supported by protobuf"
@@ -67,11 +65,17 @@
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
#elif defined(sparc)
#define GOOGLE_PROTOBUF_ARCH_SPARC 1
-#ifdef SOLARIS_64BIT_ENABLED
+#if defined(__sparc_v9__) || defined(__sparcv9) || defined(__arch64__)
#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
#else
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
#endif
+#elif defined(_POWER) || defined(__powerpc64__) || defined(__PPC64__)
+#define GOOGLE_PROTOBUF_ARCH_POWER 1
+#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+#elif defined(__PPC__)
+#define GOOGLE_PROTOBUF_ARCH_PPC 1
+#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
#elif defined(__GNUC__)
# if (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4))
// We fallback to the generic Clang/GCC >= 4.7 implementation in atomicops.h
@@ -92,12 +96,30 @@
#if defined(__APPLE__)
#define GOOGLE_PROTOBUF_OS_APPLE
+#include <TargetConditionals.h>
+#if TARGET_OS_IPHONE
+#define GOOGLE_PROTOBUF_OS_IPHONE
+#endif
+#elif defined(__EMSCRIPTEN__)
+#define GOOGLE_PROTOBUF_OS_EMSCRIPTEN
#elif defined(__native_client__)
#define GOOGLE_PROTOBUF_OS_NACL
#elif defined(sun)
#define GOOGLE_PROTOBUF_OS_SOLARIS
+#elif defined(_AIX)
+#define GOOGLE_PROTOBUF_OS_AIX
+#elif defined(__ANDROID__)
+#define GOOGLE_PROTOBUF_OS_ANDROID
#endif
#undef GOOGLE_PROTOBUF_PLATFORM_ERROR
+#if defined(GOOGLE_PROTOBUF_OS_ANDROID) || defined(GOOGLE_PROTOBUF_OS_IPHONE)
+// Android ndk does not support the __thread keyword very well yet. Here
+// we use pthread_key_create()/pthread_getspecific()/... methods for
+// TLS support on android.
+// iOS also does not support the __thread keyword.
+#define GOOGLE_PROTOBUF_NO_THREADLOCAL
+#endif
+
#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/port.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/port.h
new file mode 100644
index 0000000..0e65fc8
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/port.h
@@ -0,0 +1,382 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_STUBS_PORT_H_
+#define GOOGLE_PROTOBUF_STUBS_PORT_H_
+
+#include <assert.h>
+#include <stdlib.h>
+#include <cstddef>
+#include <string>
+#include <string.h>
+#if defined(__osf__)
+// Tru64 lacks stdint.h, but has inttypes.h which defines a superset of
+// what stdint.h would define.
+#include <inttypes.h>
+#elif !defined(_MSC_VER)
+#include <stdint.h>
+#endif
+
+#undef PROTOBUF_LITTLE_ENDIAN
+#ifdef _WIN32
+ // Assuming windows is always little-endian.
+ // TODO(xiaofeng): The PROTOBUF_LITTLE_ENDIAN is not only used for
+ // optimization but also for correctness. We should define an
+ // different macro to test the big-endian code path in coded_stream.
+ #if !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
+ #define PROTOBUF_LITTLE_ENDIAN 1
+ #endif
+ #if _MSC_VER >= 1300 && !defined(__INTEL_COMPILER)
+ // If MSVC has "/RTCc" set, it will complain about truncating casts at
+ // runtime. This file contains some intentional truncating casts.
+ #pragma runtime_checks("c", off)
+ #endif
+#else
+ #include <sys/param.h> // __BYTE_ORDER
+ #if ((defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)) || \
+ (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN)) && \
+ !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
+ #define PROTOBUF_LITTLE_ENDIAN 1
+ #endif
+#endif
+#if defined(_MSC_VER) && defined(PROTOBUF_USE_DLLS)
+ #ifdef LIBPROTOBUF_EXPORTS
+ #define LIBPROTOBUF_EXPORT __declspec(dllexport)
+ #else
+ #define LIBPROTOBUF_EXPORT __declspec(dllimport)
+ #endif
+ #ifdef LIBPROTOC_EXPORTS
+ #define LIBPROTOC_EXPORT __declspec(dllexport)
+ #else
+ #define LIBPROTOC_EXPORT __declspec(dllimport)
+ #endif
+#else
+ #define LIBPROTOBUF_EXPORT
+ #define LIBPROTOC_EXPORT
+#endif
+
+// These #includes are for the byte swap functions declared later on.
+#ifdef _MSC_VER
+#include <stdlib.h> // NOLINT(build/include)
+#elif defined(__APPLE__)
+#include <libkern/OSByteOrder.h>
+#elif defined(__GLIBC__) || defined(__CYGWIN__)
+#include <byteswap.h> // IWYU pragma: export
+#endif
+
+// ===================================================================
+// from google3/base/port.h
+namespace google {
+namespace protobuf {
+
+typedef unsigned int uint;
+
+#ifdef _MSC_VER
+typedef signed __int8 int8;
+typedef __int16 int16;
+typedef __int32 int32;
+typedef __int64 int64;
+
+typedef unsigned __int8 uint8;
+typedef unsigned __int16 uint16;
+typedef unsigned __int32 uint32;
+typedef unsigned __int64 uint64;
+#else
+typedef signed char int8;
+typedef short int16;
+typedef int int32;
+typedef long long int64;
+
+typedef unsigned char uint8;
+typedef unsigned short uint16;
+typedef unsigned int uint32;
+typedef unsigned long long uint64;
+#endif
+
+// long long macros to be used because gcc and vc++ use different suffixes,
+// and different size specifiers in format strings
+#undef GOOGLE_LONGLONG
+#undef GOOGLE_ULONGLONG
+#undef GOOGLE_LL_FORMAT
+
+#ifdef _MSC_VER
+#define GOOGLE_LONGLONG(x) x##I64
+#define GOOGLE_ULONGLONG(x) x##UI64
+#define GOOGLE_LL_FORMAT "I64" // As in printf("%I64d", ...)
+#else
+#define GOOGLE_LONGLONG(x) x##LL
+#define GOOGLE_ULONGLONG(x) x##ULL
+#define GOOGLE_LL_FORMAT "ll" // As in "%lld". Note that "q" is poor form also.
+#endif
+
+static const int32 kint32max = 0x7FFFFFFF;
+static const int32 kint32min = -kint32max - 1;
+static const int64 kint64max = GOOGLE_LONGLONG(0x7FFFFFFFFFFFFFFF);
+static const int64 kint64min = -kint64max - 1;
+static const uint32 kuint32max = 0xFFFFFFFFu;
+static const uint64 kuint64max = GOOGLE_ULONGLONG(0xFFFFFFFFFFFFFFFF);
+
+// -------------------------------------------------------------------
+// Annotations: Some parts of the code have been annotated in ways that might
+// be useful to some compilers or tools, but are not supported universally.
+// You can #define these annotations yourself if the default implementation
+// is not right for you.
+
+#ifndef GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+#if defined(__GNUC__) && (__GNUC__ > 3 ||(__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
+// For functions we want to force inline.
+// Introduced in gcc 3.1.
+#define GOOGLE_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((always_inline))
+#else
+// Other compilers will have to figure it out for themselves.
+#define GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+#endif
+#endif
+
+#ifndef GOOGLE_ATTRIBUTE_NOINLINE
+#if defined(__GNUC__) && (__GNUC__ > 3 ||(__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
+// For functions we want to force not inline.
+// Introduced in gcc 3.1.
+#define GOOGLE_ATTRIBUTE_NOINLINE __attribute__ ((noinline))
+#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
+// Seems to have been around since at least Visual Studio 2005
+#define GOOGLE_ATTRIBUTE_NOINLINE __declspec(noinline)
+#else
+// Other compilers will have to figure it out for themselves.
+#define GOOGLE_ATTRIBUTE_NOINLINE
+#endif
+#endif
+
+#ifndef GOOGLE_ATTRIBUTE_DEPRECATED
+#ifdef __GNUC__
+// If the method/variable/type is used anywhere, produce a warning.
+#define GOOGLE_ATTRIBUTE_DEPRECATED __attribute__((deprecated))
+#else
+#define GOOGLE_ATTRIBUTE_DEPRECATED
+#endif
+#endif
+
+#ifndef GOOGLE_PREDICT_TRUE
+#ifdef __GNUC__
+// Provided at least since GCC 3.0.
+#define GOOGLE_PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))
+#else
+#define GOOGLE_PREDICT_TRUE(x) (x)
+#endif
+#endif
+
+#ifndef GOOGLE_PREDICT_FALSE
+#ifdef __GNUC__
+// Provided at least since GCC 3.0.
+#define GOOGLE_PREDICT_FALSE(x) (__builtin_expect(x, 0))
+#else
+#define GOOGLE_PREDICT_FALSE(x) (x)
+#endif
+#endif
+
+// Delimits a block of code which may write to memory which is simultaneously
+// written by other threads, but which has been determined to be thread-safe
+// (e.g. because it is an idempotent write).
+#ifndef GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN
+#define GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN()
+#endif
+#ifndef GOOGLE_SAFE_CONCURRENT_WRITES_END
+#define GOOGLE_SAFE_CONCURRENT_WRITES_END()
+#endif
+
+#if defined(__clang__) && defined(__has_cpp_attribute) \
+ && !defined(GOOGLE_PROTOBUF_OS_APPLE)
+# if defined(GOOGLE_PROTOBUF_OS_NACL) || defined(EMSCRIPTEN) || \
+ __has_cpp_attribute(clang::fallthrough)
+# define GOOGLE_FALLTHROUGH_INTENDED [[clang::fallthrough]]
+# endif
+#endif
+
+#ifndef GOOGLE_FALLTHROUGH_INTENDED
+# define GOOGLE_FALLTHROUGH_INTENDED
+#endif
+
+#define GOOGLE_GUARDED_BY(x)
+#define GOOGLE_ATTRIBUTE_COLD
+
+// x86 and x86-64 can perform unaligned loads/stores directly.
+#if defined(_M_X64) || defined(__x86_64__) || \
+ defined(_M_IX86) || defined(__i386__)
+
+#define GOOGLE_UNALIGNED_LOAD16(_p) (*reinterpret_cast<const uint16 *>(_p))
+#define GOOGLE_UNALIGNED_LOAD32(_p) (*reinterpret_cast<const uint32 *>(_p))
+#define GOOGLE_UNALIGNED_LOAD64(_p) (*reinterpret_cast<const uint64 *>(_p))
+
+#define GOOGLE_UNALIGNED_STORE16(_p, _val) (*reinterpret_cast<uint16 *>(_p) = (_val))
+#define GOOGLE_UNALIGNED_STORE32(_p, _val) (*reinterpret_cast<uint32 *>(_p) = (_val))
+#define GOOGLE_UNALIGNED_STORE64(_p, _val) (*reinterpret_cast<uint64 *>(_p) = (_val))
+
+#else
+inline uint16 GOOGLE_UNALIGNED_LOAD16(const void *p) {
+ uint16 t;
+ memcpy(&t, p, sizeof t);
+ return t;
+}
+
+inline uint32 GOOGLE_UNALIGNED_LOAD32(const void *p) {
+ uint32 t;
+ memcpy(&t, p, sizeof t);
+ return t;
+}
+
+inline uint64 GOOGLE_UNALIGNED_LOAD64(const void *p) {
+ uint64 t;
+ memcpy(&t, p, sizeof t);
+ return t;
+}
+
+inline void GOOGLE_UNALIGNED_STORE16(void *p, uint16 v) {
+ memcpy(p, &v, sizeof v);
+}
+
+inline void GOOGLE_UNALIGNED_STORE32(void *p, uint32 v) {
+ memcpy(p, &v, sizeof v);
+}
+
+inline void GOOGLE_UNALIGNED_STORE64(void *p, uint64 v) {
+ memcpy(p, &v, sizeof v);
+}
+#endif
+
+#if defined(_MSC_VER)
+#define GOOGLE_THREAD_LOCAL __declspec(thread)
+#else
+#define GOOGLE_THREAD_LOCAL __thread
+#endif
+
+// The following guarantees declaration of the byte swap functions.
+#ifdef _MSC_VER
+#define bswap_16(x) _byteswap_ushort(x)
+#define bswap_32(x) _byteswap_ulong(x)
+#define bswap_64(x) _byteswap_uint64(x)
+
+#elif defined(__APPLE__)
+// Mac OS X / Darwin features
+#define bswap_16(x) OSSwapInt16(x)
+#define bswap_32(x) OSSwapInt32(x)
+#define bswap_64(x) OSSwapInt64(x)
+
+#elif !defined(__GLIBC__) && !defined(__CYGWIN__)
+
+static inline uint16 bswap_16(uint16 x) {
+ return static_cast<uint16>(((x & 0xFF) << 8) | ((x & 0xFF00) >> 8));
+}
+#define bswap_16(x) bswap_16(x)
+static inline uint32 bswap_32(uint32 x) {
+ return (((x & 0xFF) << 24) |
+ ((x & 0xFF00) << 8) |
+ ((x & 0xFF0000) >> 8) |
+ ((x & 0xFF000000) >> 24));
+}
+#define bswap_32(x) bswap_32(x)
+static inline uint64 bswap_64(uint64 x) {
+ return (((x & GOOGLE_ULONGLONG(0xFF)) << 56) |
+ ((x & GOOGLE_ULONGLONG(0xFF00)) << 40) |
+ ((x & GOOGLE_ULONGLONG(0xFF0000)) << 24) |
+ ((x & GOOGLE_ULONGLONG(0xFF000000)) << 8) |
+ ((x & GOOGLE_ULONGLONG(0xFF00000000)) >> 8) |
+ ((x & GOOGLE_ULONGLONG(0xFF0000000000)) >> 24) |
+ ((x & GOOGLE_ULONGLONG(0xFF000000000000)) >> 40) |
+ ((x & GOOGLE_ULONGLONG(0xFF00000000000000)) >> 56));
+}
+#define bswap_64(x) bswap_64(x)
+
+#endif
+
+// ===================================================================
+// from google3/util/endian/endian.h
+LIBPROTOBUF_EXPORT uint32 ghtonl(uint32 x);
+
+class BigEndian {
+ public:
+#ifdef PROTOBUF_LITTLE_ENDIAN
+
+ static uint16 FromHost16(uint16 x) { return bswap_16(x); }
+ static uint16 ToHost16(uint16 x) { return bswap_16(x); }
+
+ static uint32 FromHost32(uint32 x) { return bswap_32(x); }
+ static uint32 ToHost32(uint32 x) { return bswap_32(x); }
+
+ static uint64 FromHost64(uint64 x) { return bswap_64(x); }
+ static uint64 ToHost64(uint64 x) { return bswap_64(x); }
+
+ static bool IsLittleEndian() { return true; }
+
+#else
+
+ static uint16 FromHost16(uint16 x) { return x; }
+ static uint16 ToHost16(uint16 x) { return x; }
+
+ static uint32 FromHost32(uint32 x) { return x; }
+ static uint32 ToHost32(uint32 x) { return x; }
+
+ static uint64 FromHost64(uint64 x) { return x; }
+ static uint64 ToHost64(uint64 x) { return x; }
+
+ static bool IsLittleEndian() { return false; }
+
+#endif /* ENDIAN */
+
+ // Functions to do unaligned loads and stores in big-endian order.
+ static uint16 Load16(const void *p) {
+ return ToHost16(GOOGLE_UNALIGNED_LOAD16(p));
+ }
+
+ static void Store16(void *p, uint16 v) {
+ GOOGLE_UNALIGNED_STORE16(p, FromHost16(v));
+ }
+
+ static uint32 Load32(const void *p) {
+ return ToHost32(GOOGLE_UNALIGNED_LOAD32(p));
+ }
+
+ static void Store32(void *p, uint32 v) {
+ GOOGLE_UNALIGNED_STORE32(p, FromHost32(v));
+ }
+
+ static uint64 Load64(const void *p) {
+ return ToHost64(GOOGLE_UNALIGNED_LOAD64(p));
+ }
+
+ static void Store64(void *p, uint64 v) {
+ GOOGLE_UNALIGNED_STORE64(p, FromHost64(v));
+ }
+};
+
+
+} // namespace protobuf
+} // namespace google
+
+#endif // GOOGLE_PROTOBUF_STUBS_PORT_H_
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/scoped_ptr.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/scoped_ptr.h
new file mode 100644
index 0000000..4423c11
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/scoped_ptr.h
@@ -0,0 +1,236 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_STUBS_SCOPED_PTR_H_
+#define GOOGLE_PROTOBUF_STUBS_SCOPED_PTR_H_
+
+#include <google/protobuf/stubs/port.h>
+
+namespace google {
+namespace protobuf {
+
+// ===================================================================
+// from google3/base/scoped_ptr.h
+
+namespace internal {
+
+// This is an implementation designed to match the anticipated future TR2
+// implementation of the scoped_ptr class, and its closely-related brethren,
+// scoped_array, scoped_ptr_malloc, and make_scoped_ptr.
+
+template <class C> class scoped_ptr;
+template <class C> class scoped_array;
+
+// A scoped_ptr<T> is like a T*, except that the destructor of scoped_ptr<T>
+// automatically deletes the pointer it holds (if any).
+// That is, scoped_ptr<T> owns the T object that it points to.
+// Like a T*, a scoped_ptr<T> may hold either NULL or a pointer to a T object.
+//
+// The size of a scoped_ptr is small:
+// sizeof(scoped_ptr<C>) == sizeof(C*)
+template <class C>
+class scoped_ptr {
+ public:
+
+ // The element type
+ typedef C element_type;
+
+ // Constructor. Defaults to initializing with NULL.
+ // There is no way to create an uninitialized scoped_ptr.
+ // The input parameter must be allocated with new.
+ explicit scoped_ptr(C* p = NULL) : ptr_(p) { }
+
+ // Destructor. If there is a C object, delete it.
+ // We don't need to test ptr_ == NULL because C++ does that for us.
+ ~scoped_ptr() {
+ enum { type_must_be_complete = sizeof(C) };
+ delete ptr_;
+ }
+
+ // Reset. Deletes the current owned object, if any.
+ // Then takes ownership of a new object, if given.
+ // this->reset(this->get()) works.
+ void reset(C* p = NULL) {
+ if (p != ptr_) {
+ enum { type_must_be_complete = sizeof(C) };
+ delete ptr_;
+ ptr_ = p;
+ }
+ }
+
+ // Accessors to get the owned object.
+ // operator* and operator-> will assert() if there is no current object.
+ C& operator*() const {
+ assert(ptr_ != NULL);
+ return *ptr_;
+ }
+ C* operator->() const {
+ assert(ptr_ != NULL);
+ return ptr_;
+ }
+ C* get() const { return ptr_; }
+
+ // Comparison operators.
+ // These return whether two scoped_ptr refer to the same object, not just to
+ // two different but equal objects.
+ bool operator==(C* p) const { return ptr_ == p; }
+ bool operator!=(C* p) const { return ptr_ != p; }
+
+ // Swap two scoped pointers.
+ void swap(scoped_ptr& p2) {
+ C* tmp = ptr_;
+ ptr_ = p2.ptr_;
+ p2.ptr_ = tmp;
+ }
+
+ // Release a pointer.
+ // The return value is the current pointer held by this object.
+ // If this object holds a NULL pointer, the return value is NULL.
+ // After this operation, this object will hold a NULL pointer,
+ // and will not own the object any more.
+ C* release() {
+ C* retVal = ptr_;
+ ptr_ = NULL;
+ return retVal;
+ }
+
+ private:
+ C* ptr_;
+
+ // Forbid comparison of scoped_ptr types. If C2 != C, it totally doesn't
+ // make sense, and if C2 == C, it still doesn't make sense because you should
+ // never have the same object owned by two different scoped_ptrs.
+ template <class C2> bool operator==(scoped_ptr<C2> const& p2) const;
+ template <class C2> bool operator!=(scoped_ptr<C2> const& p2) const;
+
+ // Disallow evil constructors
+ scoped_ptr(const scoped_ptr&);
+ void operator=(const scoped_ptr&);
+};
+
+// scoped_array<C> is like scoped_ptr<C>, except that the caller must allocate
+// with new [] and the destructor deletes objects with delete [].
+//
+// As with scoped_ptr<C>, a scoped_array<C> either points to an object
+// or is NULL. A scoped_array<C> owns the object that it points to.
+//
+// Size: sizeof(scoped_array<C>) == sizeof(C*)
+template <class C>
+class scoped_array {
+ public:
+
+ // The element type
+ typedef C element_type;
+
+ // Constructor. Defaults to initializing with NULL.
+ // There is no way to create an uninitialized scoped_array.
+ // The input parameter must be allocated with new [].
+ explicit scoped_array(C* p = NULL) : array_(p) { }
+
+ // Destructor. If there is a C object, delete it.
+ // We don't need to test ptr_ == NULL because C++ does that for us.
+ ~scoped_array() {
+ enum { type_must_be_complete = sizeof(C) };
+ delete[] array_;
+ }
+
+ // Reset. Deletes the current owned object, if any.
+ // Then takes ownership of a new object, if given.
+ // this->reset(this->get()) works.
+ void reset(C* p = NULL) {
+ if (p != array_) {
+ enum { type_must_be_complete = sizeof(C) };
+ delete[] array_;
+ array_ = p;
+ }
+ }
+
+ // Get one element of the current object.
+ // Will assert() if there is no current object, or index i is negative.
+ C& operator[](std::ptrdiff_t i) const {
+ assert(i >= 0);
+ assert(array_ != NULL);
+ return array_[i];
+ }
+
+ // Get a pointer to the zeroth element of the current object.
+ // If there is no current object, return NULL.
+ C* get() const {
+ return array_;
+ }
+
+ // Comparison operators.
+ // These return whether two scoped_array refer to the same object, not just to
+ // two different but equal objects.
+ bool operator==(C* p) const { return array_ == p; }
+ bool operator!=(C* p) const { return array_ != p; }
+
+ // Swap two scoped arrays.
+ void swap(scoped_array& p2) {
+ C* tmp = array_;
+ array_ = p2.array_;
+ p2.array_ = tmp;
+ }
+
+ // Release an array.
+ // The return value is the current pointer held by this object.
+ // If this object holds a NULL pointer, the return value is NULL.
+ // After this operation, this object will hold a NULL pointer,
+ // and will not own the object any more.
+ C* release() {
+ C* retVal = array_;
+ array_ = NULL;
+ return retVal;
+ }
+
+ private:
+ C* array_;
+
+ // Forbid comparison of different scoped_array types.
+ template <class C2> bool operator==(scoped_array<C2> const& p2) const;
+ template <class C2> bool operator!=(scoped_array<C2> const& p2) const;
+
+ // Disallow evil constructors
+ scoped_array(const scoped_array&);
+ void operator=(const scoped_array&);
+};
+
+} // namespace internal
+
+// We made these internal so that they would show up as such in the docs,
+// but we don't want to stick "internal::" in front of them everywhere.
+using internal::scoped_ptr;
+using internal::scoped_array;
+
+
+} // namespace protobuf
+} // namespace google
+
+#endif // GOOGLE_PROTOBUF_STUBS_SCOPED_PTR_H_
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/shared_ptr.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/shared_ptr.h
new file mode 100644
index 0000000..d250bf4
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/shared_ptr.h
@@ -0,0 +1,470 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2014 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// from google3/util/gtl/shared_ptr.h
+
+#ifndef GOOGLE_PROTOBUF_STUBS_SHARED_PTR_H__
+#define GOOGLE_PROTOBUF_STUBS_SHARED_PTR_H__
+
+#include <google/protobuf/stubs/atomicops.h>
+
+#include <algorithm> // for swap
+#include <stddef.h>
+#include <memory>
+
+namespace google {
+namespace protobuf {
+namespace internal {
+
+// Alias to std::shared_ptr for any C++11 platform,
+// and for any supported MSVC compiler.
+#if !defined(UTIL_GTL_USE_STD_SHARED_PTR) && \
+ (defined(COMPILER_MSVC) || defined(LANG_CXX11))
+#define UTIL_GTL_USE_STD_SHARED_PTR 1
+#endif
+
+#if defined(UTIL_GTL_USE_STD_SHARED_PTR) && UTIL_GTL_USE_STD_SHARED_PTR
+
+// These are transitional. They will be going away soon.
+// Please just #include <memory> and just type std::shared_ptr yourself, instead
+// of relying on this file.
+//
+// Migration doc: http://go/std-shared-ptr-lsc
+using std::enable_shared_from_this;
+using std::shared_ptr;
+using std::static_pointer_cast;
+using std::weak_ptr;
+
+#else // below, UTIL_GTL_USE_STD_SHARED_PTR not set or set to 0.
+
+// For everything else there is the google3 implementation.
+inline bool RefCountDec(volatile Atomic32 *ptr) {
+ return Barrier_AtomicIncrement(ptr, -1) != 0;
+}
+
+inline void RefCountInc(volatile Atomic32 *ptr) {
+ NoBarrier_AtomicIncrement(ptr, 1);
+}
+
+template <typename T> class shared_ptr;
+template <typename T> class weak_ptr;
+
+// This class is an internal implementation detail for shared_ptr. If two
+// shared_ptrs point to the same object, they also share a control block.
+// An "empty" shared_pointer refers to NULL and also has a NULL control block.
+// It contains all of the state that's needed for reference counting or any
+// other kind of resource management. In this implementation the control block
+// happens to consist of two atomic words, the reference count (the number
+// of shared_ptrs that share ownership of the object) and the weak count
+// (the number of weak_ptrs that observe the object, plus 1 if the
+// refcount is nonzero).
+//
+// The "plus 1" is to prevent a race condition in the shared_ptr and
+// weak_ptr destructors. We need to make sure the control block is
+// only deleted once, so we need to make sure that at most one
+// object sees the weak count decremented from 1 to 0.
+class SharedPtrControlBlock {
+ template <typename T> friend class shared_ptr;
+ template <typename T> friend class weak_ptr;
+ private:
+ SharedPtrControlBlock() : refcount_(1), weak_count_(1) { }
+ Atomic32 refcount_;
+ Atomic32 weak_count_;
+};
+
+// Forward declaration. The class is defined below.
+template <typename T> class enable_shared_from_this;
+
+template <typename T>
+class shared_ptr {
+ template <typename U> friend class weak_ptr;
+ public:
+ typedef T element_type;
+
+ shared_ptr() : ptr_(NULL), control_block_(NULL) {}
+
+ explicit shared_ptr(T* ptr)
+ : ptr_(ptr),
+ control_block_(ptr != NULL ? new SharedPtrControlBlock : NULL) {
+ // If p is non-null and T inherits from enable_shared_from_this, we
+ // set up the data that shared_from_this needs.
+ MaybeSetupWeakThis(ptr);
+ }
+
+ // Copy constructor: makes this object a copy of ptr, and increments
+ // the reference count.
+ template <typename U>
+ shared_ptr(const shared_ptr<U>& ptr)
+ : ptr_(NULL),
+ control_block_(NULL) {
+ Initialize(ptr);
+ }
+ // Need non-templated version to prevent the compiler-generated default
+ shared_ptr(const shared_ptr<T>& ptr)
+ : ptr_(NULL),
+ control_block_(NULL) {
+ Initialize(ptr);
+ }
+
+ // Assignment operator. Replaces the existing shared_ptr with ptr.
+ // Increment ptr's reference count and decrement the one being replaced.
+ template <typename U>
+ shared_ptr<T>& operator=(const shared_ptr<U>& ptr) {
+ if (ptr_ != ptr.ptr_) {
+ shared_ptr<T> me(ptr); // will hold our previous state to be destroyed.
+ swap(me);
+ }
+ return *this;
+ }
+
+ // Need non-templated version to prevent the compiler-generated default
+ shared_ptr<T>& operator=(const shared_ptr<T>& ptr) {
+ if (ptr_ != ptr.ptr_) {
+ shared_ptr<T> me(ptr); // will hold our previous state to be destroyed.
+ swap(me);
+ }
+ return *this;
+ }
+
+ // TODO(austern): Consider providing this constructor. The draft C++ standard
+ // (20.8.10.2.1) includes it. However, it says that this constructor throws
+ // a bad_weak_ptr exception when ptr is expired. Is it better to provide this
+ // constructor and make it do something else, like fail with a CHECK, or to
+ // leave this constructor out entirely?
+ //
+ // template <typename U>
+ // shared_ptr(const weak_ptr<U>& ptr);
+
+ ~shared_ptr() {
+ if (ptr_ != NULL) {
+ if (!RefCountDec(&control_block_->refcount_)) {
+ delete ptr_;
+
+ // weak_count_ is defined as the number of weak_ptrs that observe
+ // ptr_, plus 1 if refcount_ is nonzero.
+ if (!RefCountDec(&control_block_->weak_count_)) {
+ delete control_block_;
+ }
+ }
+ }
+ }
+
+ // Replaces underlying raw pointer with the one passed in. The reference
+ // count is set to one (or zero if the pointer is NULL) for the pointer
+ // being passed in and decremented for the one being replaced.
+ //
+ // If you have a compilation error with this code, make sure you aren't
+ // passing NULL, nullptr, or 0 to this function. Call reset without an
+ // argument to reset to a null ptr.
+ template <typename Y>
+ void reset(Y* p) {
+ if (p != ptr_) {
+ shared_ptr<T> tmp(p);
+ tmp.swap(*this);
+ }
+ }
+
+ void reset() {
+ reset(static_cast<T*>(NULL));
+ }
+
+ // Exchanges the contents of this with the contents of r. This function
+ // supports more efficient swapping since it eliminates the need for a
+ // temporary shared_ptr object.
+ void swap(shared_ptr<T>& r) {
+ using std::swap; // http://go/using-std-swap
+ swap(ptr_, r.ptr_);
+ swap(control_block_, r.control_block_);
+ }
+
+ // The following function is useful for gaining access to the underlying
+ // pointer when a shared_ptr remains in scope so the reference-count is
+ // known to be > 0 (e.g. for parameter passing).
+ T* get() const {
+ return ptr_;
+ }
+
+ T& operator*() const {
+ return *ptr_;
+ }
+
+ T* operator->() const {
+ return ptr_;
+ }
+
+ long use_count() const {
+ return control_block_ ? control_block_->refcount_ : 1;
+ }
+
+ bool unique() const {
+ return use_count() == 1;
+ }
+
+ private:
+ // If r is non-empty, initialize *this to share ownership with r,
+ // increasing the underlying reference count.
+ // If r is empty, *this remains empty.
+ // Requires: this is empty, namely this->ptr_ == NULL.
+ template <typename U>
+ void Initialize(const shared_ptr<U>& r) {
+ // This performs a static_cast on r.ptr_ to U*, which is a no-op since it
+ // is already a U*. So initialization here requires that r.ptr_ is
+ // implicitly convertible to T*.
+ InitializeWithStaticCast<U>(r);
+ }
+
+ // Initializes *this as described in Initialize, but additionally performs a
+ // static_cast from r.ptr_ (V*) to U*.
+ // NOTE(gfc): We'd need a more general form to support const_pointer_cast and
+ // dynamic_pointer_cast, but those operations are sufficiently discouraged
+ // that supporting static_pointer_cast is sufficient.
+ template <typename U, typename V>
+ void InitializeWithStaticCast(const shared_ptr<V>& r) {
+ if (r.control_block_ != NULL) {
+ RefCountInc(&r.control_block_->refcount_);
+
+ ptr_ = static_cast<U*>(r.ptr_);
+ control_block_ = r.control_block_;
+ }
+ }
+
+ // Helper function for the constructor that takes a raw pointer. If T
+ // doesn't inherit from enable_shared_from_this<T> then we have nothing to
+ // do, so this function is trivial and inline. The other version is declared
+ // out of line, after the class definition of enable_shared_from_this.
+ void MaybeSetupWeakThis(enable_shared_from_this<T>* ptr);
+ void MaybeSetupWeakThis(...) { }
+
+ T* ptr_;
+ SharedPtrControlBlock* control_block_;
+
+#ifndef SWIG
+ template <typename U>
+ friend class shared_ptr;
+
+ template <typename U, typename V>
+ friend shared_ptr<U> static_pointer_cast(const shared_ptr<V>& rhs);
+#endif
+};
+
+// Matches the interface of std::swap as an aid to generic programming.
+template <typename T> void swap(shared_ptr<T>& r, shared_ptr<T>& s) {
+ r.swap(s);
+}
+
+template <typename T, typename U>
+shared_ptr<T> static_pointer_cast(const shared_ptr<U>& rhs) {
+ shared_ptr<T> lhs;
+ lhs.template InitializeWithStaticCast<T>(rhs);
+ return lhs;
+}
+
+// See comments at the top of the file for a description of why this
+// class exists, and the draft C++ standard (as of July 2009 the
+// latest draft is N2914) for the detailed specification.
+template <typename T>
+class weak_ptr {
+ template <typename U> friend class weak_ptr;
+ public:
+ typedef T element_type;
+
+ // Create an empty (i.e. already expired) weak_ptr.
+ weak_ptr() : ptr_(NULL), control_block_(NULL) { }
+
+ // Create a weak_ptr that observes the same object that ptr points
+ // to. Note that there is no race condition here: we know that the
+ // control block can't disappear while we're looking at it because
+ // it is owned by at least one shared_ptr, ptr.
+ template <typename U> weak_ptr(const shared_ptr<U>& ptr) {
+ CopyFrom(ptr.ptr_, ptr.control_block_);
+ }
+
+ // Copy a weak_ptr. The object it points to might disappear, but we
+ // don't care: we're only working with the control block, and it can't
+ // disappear while we're looking at because it's owned by at least one
+ // weak_ptr, ptr.
+ template <typename U> weak_ptr(const weak_ptr<U>& ptr) {
+ CopyFrom(ptr.ptr_, ptr.control_block_);
+ }
+
+ // Need non-templated version to prevent default copy constructor
+ weak_ptr(const weak_ptr& ptr) {
+ CopyFrom(ptr.ptr_, ptr.control_block_);
+ }
+
+ // Destroy the weak_ptr. If no shared_ptr owns the control block, and if
+ // we are the last weak_ptr to own it, then it can be deleted. Note that
+ // weak_count_ is defined as the number of weak_ptrs sharing this control
+ // block, plus 1 if there are any shared_ptrs. We therefore know that it's
+ // safe to delete the control block when weak_count_ reaches 0, without
+ // having to perform any additional tests.
+ ~weak_ptr() {
+ if (control_block_ != NULL &&
+ !RefCountDec(&control_block_->weak_count_)) {
+ delete control_block_;
+ }
+ }
+
+ weak_ptr& operator=(const weak_ptr& ptr) {
+ if (&ptr != this) {
+ weak_ptr tmp(ptr);
+ tmp.swap(*this);
+ }
+ return *this;
+ }
+ template <typename U> weak_ptr& operator=(const weak_ptr<U>& ptr) {
+ weak_ptr tmp(ptr);
+ tmp.swap(*this);
+ return *this;
+ }
+ template <typename U> weak_ptr& operator=(const shared_ptr<U>& ptr) {
+ weak_ptr tmp(ptr);
+ tmp.swap(*this);
+ return *this;
+ }
+
+ void swap(weak_ptr& ptr) {
+ using std::swap; // http://go/using-std-swap
+ swap(ptr_, ptr.ptr_);
+ swap(control_block_, ptr.control_block_);
+ }
+
+ void reset() {
+ weak_ptr tmp;
+ tmp.swap(*this);
+ }
+
+ // Return the number of shared_ptrs that own the object we are observing.
+ // Note that this number can be 0 (if this pointer has expired).
+ long use_count() const {
+ return control_block_ != NULL ? control_block_->refcount_ : 0;
+ }
+
+ bool expired() const { return use_count() == 0; }
+
+ // Return a shared_ptr that owns the object we are observing. If we
+ // have expired, the shared_ptr will be empty. We have to be careful
+ // about concurrency, though, since some other thread might be
+ // destroying the last owning shared_ptr while we're in this
+ // function. We want to increment the refcount only if it's nonzero
+ // and get the new value, and we want that whole operation to be
+ // atomic.
+ shared_ptr<T> lock() const {
+ shared_ptr<T> result;
+ if (control_block_ != NULL) {
+ Atomic32 old_refcount;
+ do {
+ old_refcount = control_block_->refcount_;
+ if (old_refcount == 0)
+ break;
+ } while (old_refcount !=
+ NoBarrier_CompareAndSwap(
+ &control_block_->refcount_, old_refcount,
+ old_refcount + 1));
+ if (old_refcount > 0) {
+ result.ptr_ = ptr_;
+ result.control_block_ = control_block_;
+ }
+ }
+
+ return result;
+ }
+
+ private:
+ void CopyFrom(T* ptr, SharedPtrControlBlock* control_block) {
+ ptr_ = ptr;
+ control_block_ = control_block;
+ if (control_block_ != NULL)
+ RefCountInc(&control_block_->weak_count_);
+ }
+
+ private:
+ element_type* ptr_;
+ SharedPtrControlBlock* control_block_;
+};
+
+template <typename T> void swap(weak_ptr<T>& r, weak_ptr<T>& s) {
+ r.swap(s);
+}
+
+// See comments at the top of the file for a description of why this class
+// exists, and section 20.8.10.5 of the draft C++ standard (as of July 2009
+// the latest draft is N2914) for the detailed specification.
+template <typename T>
+class enable_shared_from_this {
+ friend class shared_ptr<T>;
+ public:
+ // Precondition: there must be a shared_ptr that owns *this and that was
+ // created, directly or indirectly, from a raw pointer of type T*. (The
+ // latter part of the condition is technical but not quite redundant; it
+ // rules out some complicated uses involving inheritance hierarchies.)
+ shared_ptr<T> shared_from_this() {
+ // Behavior is undefined if the precondition isn't satisfied; we choose
+ // to die with a CHECK failure.
+ CHECK(!weak_this_.expired()) << "No shared_ptr owns this object";
+ return weak_this_.lock();
+ }
+ shared_ptr<const T> shared_from_this() const {
+ CHECK(!weak_this_.expired()) << "No shared_ptr owns this object";
+ return weak_this_.lock();
+ }
+
+ protected:
+ enable_shared_from_this() { }
+ enable_shared_from_this(const enable_shared_from_this& other) { }
+ enable_shared_from_this& operator=(const enable_shared_from_this& other) {
+ return *this;
+ }
+ ~enable_shared_from_this() { }
+
+ private:
+ weak_ptr<T> weak_this_;
+};
+
+// This is a helper function called by shared_ptr's constructor from a raw
+// pointer. If T inherits from enable_shared_from_this<T>, it sets up
+// weak_this_ so that shared_from_this works correctly. If T does not inherit
+// from weak_this we get a different overload, defined inline, which does
+// nothing.
+template<typename T>
+void shared_ptr<T>::MaybeSetupWeakThis(enable_shared_from_this<T>* ptr) {
+ if (ptr) {
+ CHECK(ptr->weak_this_.expired()) << "Object already owned by a shared_ptr";
+ ptr->weak_this_ = *this;
+ }
+}
+
+#endif // UTIL_GTL_USE_STD_SHARED_PTR
+
+} // internal
+} // namespace protobuf
+} // namespace google
+
+#endif // GOOGLE_PROTOBUF_STUBS_SHARED_PTR_H__
diff --git a/linux-x86_64/protoc/include/google/protobuf/io/strtod.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/singleton.h
similarity index 67%
copy from linux-x86_64/protoc/include/google/protobuf/io/strtod.h
copy to darwin-x86_64/protoc/include/google/protobuf/stubs/singleton.h
index c2efc8d..9301f54 100644
--- a/linux-x86_64/protoc/include/google/protobuf/io/strtod.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/singleton.h
@@ -1,5 +1,5 @@
// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
+// Copyright 2014 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
@@ -27,24 +27,42 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#ifndef GOOGLE_PROTOBUF_STUBS_SINGLETON_H__
+#define GOOGLE_PROTOBUF_STUBS_SINGLETON_H__
-// A locale-independent version of strtod(), used to parse floating
-// point default values in .proto files, where the decimal separator
-// is always a dot.
-
-#ifndef GOOGLE_PROTOBUF_IO_STRTOD_H__
-#define GOOGLE_PROTOBUF_IO_STRTOD_H__
+#include <google/protobuf/stubs/atomicops.h>
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/once.h>
namespace google {
namespace protobuf {
-namespace io {
+namespace internal {
+template<typename T>
+class Singleton {
+ public:
+ static T* get() {
+ GoogleOnceInit(&once_, &Singleton<T>::Init);
+ return instance_;
+ }
+ static void ShutDown() {
+ delete instance_;
+ instance_ = NULL;
+ }
+ private:
+ static void Init() {
+ instance_ = new T();
+ }
+ static ProtobufOnceType once_;
+ static T* instance_;
+};
-// A locale-independent version of the standard strtod(), which always
-// uses a dot as the decimal separator.
-double NoLocaleStrtod(const char* str, char** endptr);
+template<typename T>
+ProtobufOnceType Singleton<T>::once_;
-} // namespace io
+template<typename T>
+T* Singleton<T>::instance_ = NULL;
+} // namespace internal
} // namespace protobuf
-
} // namespace google
-#endif // GOOGLE_PROTOBUF_IO_STRTOD_H__
+
+#endif // GOOGLE_PROTOBUF_STUBS_SINGLETON_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/status.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/status.h
new file mode 100644
index 0000000..614ab99
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/status.h
@@ -0,0 +1,116 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#ifndef GOOGLE_PROTOBUF_STUBS_STATUS_H_
+#define GOOGLE_PROTOBUF_STUBS_STATUS_H_
+
+#include <iosfwd>
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/stringpiece.h>
+
+namespace google {
+namespace protobuf {
+namespace util {
+namespace error {
+// These values must match error codes defined in google/rpc/code.proto.
+enum Code {
+ OK = 0,
+ CANCELLED = 1,
+ UNKNOWN = 2,
+ INVALID_ARGUMENT = 3,
+ DEADLINE_EXCEEDED = 4,
+ NOT_FOUND = 5,
+ ALREADY_EXISTS = 6,
+ PERMISSION_DENIED = 7,
+ UNAUTHENTICATED = 16,
+ RESOURCE_EXHAUSTED = 8,
+ FAILED_PRECONDITION = 9,
+ ABORTED = 10,
+ OUT_OF_RANGE = 11,
+ UNIMPLEMENTED = 12,
+ INTERNAL = 13,
+ UNAVAILABLE = 14,
+ DATA_LOSS = 15,
+};
+} // namespace error
+
+class LIBPROTOBUF_EXPORT Status {
+ public:
+ // Creates a "successful" status.
+ Status();
+
+ // Create a status in the canonical error space with the specified
+ // code, and error message. If "code == 0", error_message is
+ // ignored and a Status object identical to Status::OK is
+ // constructed.
+ Status(error::Code error_code, StringPiece error_message);
+ Status(const Status&);
+ Status& operator=(const Status& x);
+ ~Status() {}
+
+ // Some pre-defined Status objects
+ static const Status OK; // Identical to 0-arg constructor
+ static const Status CANCELLED;
+ static const Status UNKNOWN;
+
+ // Accessor
+ bool ok() const {
+ return error_code_ == error::OK;
+ }
+ int error_code() const {
+ return error_code_;
+ }
+ StringPiece error_message() const {
+ return error_message_;
+ }
+
+ bool operator==(const Status& x) const;
+ bool operator!=(const Status& x) const {
+ return !operator==(x);
+ }
+
+ // Return a combination of the error code name and message.
+ string ToString() const;
+
+ private:
+ error::Code error_code_;
+ string error_message_;
+};
+
+// Prints a human-readable representation of 'x' to 'os'.
+LIBPROTOBUF_EXPORT ostream& operator<<(ostream& os, const Status& x);
+
+#define EXPECT_OK(value) EXPECT_TRUE((value).ok())
+
+} // namespace util
+} // namespace protobuf
+} // namespace google
+#endif // GOOGLE_PROTOBUF_STUBS_STATUS_H_
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/stringpiece.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/stringpiece.h
new file mode 100644
index 0000000..9167165
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/stringpiece.h
@@ -0,0 +1,491 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// A StringPiece points to part or all of a string, Cord, double-quoted string
+// literal, or other string-like object. A StringPiece does *not* own the
+// string to which it points. A StringPiece is not null-terminated.
+//
+// You can use StringPiece as a function or method parameter. A StringPiece
+// parameter can receive a double-quoted string literal argument, a "const
+// char*" argument, a string argument, or a StringPiece argument with no data
+// copying. Systematic use of StringPiece for arguments reduces data
+// copies and strlen() calls.
+//
+// Prefer passing StringPieces by value:
+// void MyFunction(StringPiece arg);
+// If circumstances require, you may also pass by const reference:
+// void MyFunction(const StringPiece& arg); // not preferred
+// Both of these have the same lifetime semantics. Passing by value
+// generates slightly smaller code. For more discussion, see the thread
+// go/stringpiecebyvalue on c-users.
+//
+// StringPiece is also suitable for local variables if you know that
+// the lifetime of the underlying object is longer than the lifetime
+// of your StringPiece variable.
+//
+// Beware of binding a StringPiece to a temporary:
+// StringPiece sp = obj.MethodReturningString(); // BAD: lifetime problem
+//
+// This code is okay:
+// string str = obj.MethodReturningString(); // str owns its contents
+// StringPiece sp(str); // GOOD, because str outlives sp
+//
+// StringPiece is sometimes a poor choice for a return value and usually a poor
+// choice for a data member. If you do use a StringPiece this way, it is your
+// responsibility to ensure that the object pointed to by the StringPiece
+// outlives the StringPiece.
+//
+// A StringPiece may represent just part of a string; thus the name "Piece".
+// For example, when splitting a string, vector<StringPiece> is a natural data
+// type for the output. For another example, a Cord is a non-contiguous,
+// potentially very long string-like object. The Cord class has an interface
+// that iteratively provides StringPiece objects that point to the
+// successive pieces of a Cord object.
+//
+// A StringPiece is not null-terminated. If you write code that scans a
+// StringPiece, you must check its length before reading any characters.
+// Common idioms that work on null-terminated strings do not work on
+// StringPiece objects.
+//
+// There are several ways to create a null StringPiece:
+// StringPiece()
+// StringPiece(NULL)
+// StringPiece(NULL, 0)
+// For all of the above, sp.data() == NULL, sp.length() == 0,
+// and sp.empty() == true. Also, if you create a StringPiece with
+// a non-NULL pointer then sp.data() != NULL. Once created,
+// sp.data() will stay either NULL or not-NULL, except if you call
+// sp.clear() or sp.set().
+//
+// Thus, you can use StringPiece(NULL) to signal an out-of-band value
+// that is different from other StringPiece values. This is similar
+// to the way that const char* p1 = NULL; is different from
+// const char* p2 = "";.
+//
+// There are many ways to create an empty StringPiece:
+// StringPiece()
+// StringPiece(NULL)
+// StringPiece(NULL, 0)
+// StringPiece("")
+// StringPiece("", 0)
+// StringPiece("abcdef", 0)
+// StringPiece("abcdef"+6, 0)
+// For all of the above, sp.length() will be 0 and sp.empty() will be true.
+// For some empty StringPiece values, sp.data() will be NULL.
+// For some empty StringPiece values, sp.data() will not be NULL.
+//
+// Be careful not to confuse: null StringPiece and empty StringPiece.
+// The set of empty StringPieces properly includes the set of null StringPieces.
+// That is, every null StringPiece is an empty StringPiece,
+// but some non-null StringPieces are empty Stringpieces too.
+//
+// All empty StringPiece values compare equal to each other.
+// Even a null StringPieces compares equal to a non-null empty StringPiece:
+// StringPiece() == StringPiece("", 0)
+// StringPiece(NULL) == StringPiece("abc", 0)
+// StringPiece(NULL, 0) == StringPiece("abcdef"+6, 0)
+//
+// Look carefully at this example:
+// StringPiece("") == NULL
+// True or false? TRUE, because StringPiece::operator== converts
+// the right-hand side from NULL to StringPiece(NULL),
+// and then compares two zero-length spans of characters.
+// However, we are working to make this example produce a compile error.
+//
+// Suppose you want to write:
+// bool TestWhat?(StringPiece sp) { return sp == NULL; } // BAD
+// Do not do that. Write one of these instead:
+// bool TestNull(StringPiece sp) { return sp.data() == NULL; }
+// bool TestEmpty(StringPiece sp) { return sp.empty(); }
+// The intent of TestWhat? is unclear. Did you mean TestNull or TestEmpty?
+// Right now, TestWhat? behaves likes TestEmpty.
+// We are working to make TestWhat? produce a compile error.
+// TestNull is good to test for an out-of-band signal.
+// TestEmpty is good to test for an empty StringPiece.
+//
+// Caveats (again):
+// (1) The lifetime of the pointed-to string (or piece of a string)
+// must be longer than the lifetime of the StringPiece.
+// (2) There may or may not be a '\0' character after the end of
+// StringPiece data.
+// (3) A null StringPiece is empty.
+// An empty StringPiece may or may not be a null StringPiece.
+
+#ifndef GOOGLE_PROTOBUF_STUBS_STRINGPIECE_H_
+#define GOOGLE_PROTOBUF_STUBS_STRINGPIECE_H_
+
+#include <assert.h>
+#include <stddef.h>
+#include <string.h>
+#include <iosfwd>
+#include <limits>
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/hash.h>
+
+namespace google {
+namespace protobuf {
+// StringPiece has *two* size types.
+// StringPiece::size_type
+// is unsigned
+// is 32 bits in LP32, 64 bits in LP64, 64 bits in LLP64
+// no future changes intended
+// stringpiece_ssize_type
+// is signed
+// is 32 bits in LP32, 64 bits in LP64, 64 bits in LLP64
+// future changes intended: http://go/64BitStringPiece
+//
+typedef string::difference_type stringpiece_ssize_type;
+
+// STRINGPIECE_CHECK_SIZE protects us from 32-bit overflows.
+// TODO(mec): delete this after stringpiece_ssize_type goes 64 bit.
+#if !defined(NDEBUG)
+#define STRINGPIECE_CHECK_SIZE 1
+#elif defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0
+#define STRINGPIECE_CHECK_SIZE 1
+#else
+#define STRINGPIECE_CHECK_SIZE 0
+#endif
+
+class LIBPROTOBUF_EXPORT StringPiece {
+ private:
+ const char* ptr_;
+ stringpiece_ssize_type length_;
+
+ // Prevent overflow in debug mode or fortified mode.
+ // sizeof(stringpiece_ssize_type) may be smaller than sizeof(size_t).
+ static stringpiece_ssize_type CheckedSsizeTFromSizeT(size_t size) {
+#if STRINGPIECE_CHECK_SIZE > 0
+#ifdef max
+#undef max
+#endif
+ if (size > static_cast<size_t>(
+ std::numeric_limits<stringpiece_ssize_type>::max())) {
+ // Some people grep for this message in logs
+ // so take care if you ever change it.
+ LogFatalSizeTooBig(size, "size_t to int conversion");
+ }
+#endif
+ return static_cast<stringpiece_ssize_type>(size);
+ }
+
+ // Out-of-line error path.
+ static void LogFatalSizeTooBig(size_t size, const char* details);
+
+ public:
+ // We provide non-explicit singleton constructors so users can pass
+ // in a "const char*" or a "string" wherever a "StringPiece" is
+ // expected.
+ //
+ // Style guide exception granted:
+ // http://goto/style-guide-exception-20978288
+ StringPiece() : ptr_(NULL), length_(0) {}
+
+ StringPiece(const char* str) // NOLINT(runtime/explicit)
+ : ptr_(str), length_(0) {
+ if (str != NULL) {
+ length_ = CheckedSsizeTFromSizeT(strlen(str));
+ }
+ }
+
+ template <class Allocator>
+ StringPiece( // NOLINT(runtime/explicit)
+ const std::basic_string<char, std::char_traits<char>, Allocator>& str)
+ : ptr_(str.data()), length_(0) {
+ length_ = CheckedSsizeTFromSizeT(str.size());
+ }
+#if defined(HAS_GLOBAL_STRING)
+ template <class Allocator>
+ StringPiece( // NOLINT(runtime/explicit)
+ const basic_string<char, std::char_traits<char>, Allocator>& str)
+ : ptr_(str.data()), length_(0) {
+ length_ = CheckedSsizeTFromSizeT(str.size());
+ }
+#endif
+
+ StringPiece(const char* offset, stringpiece_ssize_type len)
+ : ptr_(offset), length_(len) {
+ assert(len >= 0);
+ }
+
+ // Substring of another StringPiece.
+ // pos must be non-negative and <= x.length().
+ StringPiece(StringPiece x, stringpiece_ssize_type pos);
+ // Substring of another StringPiece.
+ // pos must be non-negative and <= x.length().
+ // len must be non-negative and will be pinned to at most x.length() - pos.
+ StringPiece(StringPiece x,
+ stringpiece_ssize_type pos,
+ stringpiece_ssize_type len);
+
+ // data() may return a pointer to a buffer with embedded NULs, and the
+ // returned buffer may or may not be null terminated. Therefore it is
+ // typically a mistake to pass data() to a routine that expects a NUL
+ // terminated string.
+ const char* data() const { return ptr_; }
+ stringpiece_ssize_type size() const { return length_; }
+ stringpiece_ssize_type length() const { return length_; }
+ bool empty() const { return length_ == 0; }
+
+ void clear() {
+ ptr_ = NULL;
+ length_ = 0;
+ }
+
+ void set(const char* data, stringpiece_ssize_type len) {
+ assert(len >= 0);
+ ptr_ = data;
+ length_ = len;
+ }
+
+ void set(const char* str) {
+ ptr_ = str;
+ if (str != NULL)
+ length_ = CheckedSsizeTFromSizeT(strlen(str));
+ else
+ length_ = 0;
+ }
+
+ void set(const void* data, stringpiece_ssize_type len) {
+ ptr_ = reinterpret_cast<const char*>(data);
+ length_ = len;
+ }
+
+ char operator[](stringpiece_ssize_type i) const {
+ assert(0 <= i);
+ assert(i < length_);
+ return ptr_[i];
+ }
+
+ void remove_prefix(stringpiece_ssize_type n) {
+ assert(length_ >= n);
+ ptr_ += n;
+ length_ -= n;
+ }
+
+ void remove_suffix(stringpiece_ssize_type n) {
+ assert(length_ >= n);
+ length_ -= n;
+ }
+
+ // returns {-1, 0, 1}
+ int compare(StringPiece x) const {
+ const stringpiece_ssize_type min_size =
+ length_ < x.length_ ? length_ : x.length_;
+ int r = memcmp(ptr_, x.ptr_, min_size);
+ if (r < 0) return -1;
+ if (r > 0) return 1;
+ if (length_ < x.length_) return -1;
+ if (length_ > x.length_) return 1;
+ return 0;
+ }
+
+ string as_string() const {
+ return ToString();
+ }
+ // We also define ToString() here, since many other string-like
+ // interfaces name the routine that converts to a C++ string
+ // "ToString", and it's confusing to have the method that does that
+ // for a StringPiece be called "as_string()". We also leave the
+ // "as_string()" method defined here for existing code.
+ string ToString() const {
+ if (ptr_ == NULL) return string();
+ return string(data(), size());
+ }
+
+ operator string() const {
+ return ToString();
+ }
+
+ void CopyToString(string* target) const;
+ void AppendToString(string* target) const;
+
+ bool starts_with(StringPiece x) const {
+ return (length_ >= x.length_) && (memcmp(ptr_, x.ptr_, x.length_) == 0);
+ }
+
+ bool ends_with(StringPiece x) const {
+ return ((length_ >= x.length_) &&
+ (memcmp(ptr_ + (length_-x.length_), x.ptr_, x.length_) == 0));
+ }
+
+ // Checks whether StringPiece starts with x and if so advances the beginning
+ // of it to past the match. It's basically a shortcut for starts_with
+ // followed by remove_prefix.
+ bool Consume(StringPiece x);
+ // Like above but for the end of the string.
+ bool ConsumeFromEnd(StringPiece x);
+
+ // standard STL container boilerplate
+ typedef char value_type;
+ typedef const char* pointer;
+ typedef const char& reference;
+ typedef const char& const_reference;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ static const size_type npos;
+ typedef const char* const_iterator;
+ typedef const char* iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ iterator begin() const { return ptr_; }
+ iterator end() const { return ptr_ + length_; }
+ const_reverse_iterator rbegin() const {
+ return const_reverse_iterator(ptr_ + length_);
+ }
+ const_reverse_iterator rend() const {
+ return const_reverse_iterator(ptr_);
+ }
+ stringpiece_ssize_type max_size() const { return length_; }
+ stringpiece_ssize_type capacity() const { return length_; }
+
+ // cpplint.py emits a false positive [build/include_what_you_use]
+ stringpiece_ssize_type copy(char* buf, size_type n, size_type pos = 0) const; // NOLINT
+
+ bool contains(StringPiece s) const;
+
+ stringpiece_ssize_type find(StringPiece s, size_type pos = 0) const;
+ stringpiece_ssize_type find(char c, size_type pos = 0) const;
+ stringpiece_ssize_type rfind(StringPiece s, size_type pos = npos) const;
+ stringpiece_ssize_type rfind(char c, size_type pos = npos) const;
+
+ stringpiece_ssize_type find_first_of(StringPiece s, size_type pos = 0) const;
+ stringpiece_ssize_type find_first_of(char c, size_type pos = 0) const {
+ return find(c, pos);
+ }
+ stringpiece_ssize_type find_first_not_of(StringPiece s,
+ size_type pos = 0) const;
+ stringpiece_ssize_type find_first_not_of(char c, size_type pos = 0) const;
+ stringpiece_ssize_type find_last_of(StringPiece s,
+ size_type pos = npos) const;
+ stringpiece_ssize_type find_last_of(char c, size_type pos = npos) const {
+ return rfind(c, pos);
+ }
+ stringpiece_ssize_type find_last_not_of(StringPiece s,
+ size_type pos = npos) const;
+ stringpiece_ssize_type find_last_not_of(char c, size_type pos = npos) const;
+
+ StringPiece substr(size_type pos, size_type n = npos) const;
+};
+
+// This large function is defined inline so that in a fairly common case where
+// one of the arguments is a literal, the compiler can elide a lot of the
+// following comparisons.
+inline bool operator==(StringPiece x, StringPiece y) {
+ stringpiece_ssize_type len = x.size();
+ if (len != y.size()) {
+ return false;
+ }
+
+ return x.data() == y.data() || len <= 0 ||
+ memcmp(x.data(), y.data(), len) == 0;
+}
+
+inline bool operator!=(StringPiece x, StringPiece y) {
+ return !(x == y);
+}
+
+inline bool operator<(StringPiece x, StringPiece y) {
+ const stringpiece_ssize_type min_size =
+ x.size() < y.size() ? x.size() : y.size();
+ const int r = memcmp(x.data(), y.data(), min_size);
+ return (r < 0) || (r == 0 && x.size() < y.size());
+}
+
+inline bool operator>(StringPiece x, StringPiece y) {
+ return y < x;
+}
+
+inline bool operator<=(StringPiece x, StringPiece y) {
+ return !(x > y);
+}
+
+inline bool operator>=(StringPiece x, StringPiece y) {
+ return !(x < y);
+}
+
+// allow StringPiece to be logged
+extern std::ostream& operator<<(std::ostream& o, StringPiece piece);
+
+namespace internal {
+// StringPiece is not a POD and can not be used in an union (pre C++11). We
+// need a POD version of it.
+struct StringPiecePod {
+ // Create from a StringPiece.
+ static StringPiecePod CreateFromStringPiece(StringPiece str) {
+ StringPiecePod pod;
+ pod.data_ = str.data();
+ pod.size_ = str.size();
+ return pod;
+ }
+
+ // Cast to StringPiece.
+ operator StringPiece() const { return StringPiece(data_, size_); }
+
+ bool operator==(const char* value) const {
+ return StringPiece(data_, size_) == StringPiece(value);
+ }
+
+ char operator[](stringpiece_ssize_type i) const {
+ assert(0 <= i);
+ assert(i < size_);
+ return data_[i];
+ }
+
+ const char* data() const { return data_; }
+
+ stringpiece_ssize_type size() const {
+ return size_;
+ }
+
+ std::string ToString() const { return std::string(data_, size_); }
+ private:
+ const char* data_;
+ stringpiece_ssize_type size_;
+};
+
+} // namespace internal
+} // namespace protobuf
+} // namespace google
+
+GOOGLE_PROTOBUF_HASH_NAMESPACE_DECLARATION_START
+template<> struct hash<StringPiece> {
+ size_t operator()(const StringPiece& s) const {
+ size_t result = 0;
+ for (const char *str = s.data(), *end = str + s.size(); str < end; str++) {
+ result = 5 * result + *str;
+ }
+ return result;
+ }
+};
+GOOGLE_PROTOBUF_HASH_NAMESPACE_DECLARATION_END
+
+#endif // STRINGS_STRINGPIECE_H_
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/template_util.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/template_util.h
index 4f30ffa..feef904 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/template_util.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/template_util.h
@@ -37,7 +37,7 @@
// any changes here, make sure that you're not breaking any platforms.
//
//
-// The names choosen here reflect those used in tr1 and the boost::mpl
+// The names chosen here reflect those used in tr1 and the boost::mpl
// library, there are similar operations used in the Loki library as
// well. I prefer the boost names for 2 reasons:
// 1. I think that portions of the Boost libraries are more likely to
diff --git a/darwin-x86_64/protoc/include/google/protobuf/stubs/type_traits.h b/darwin-x86_64/protoc/include/google/protobuf/stubs/type_traits.h
index e41f5e6..0d8127e 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/stubs/type_traits.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/stubs/type_traits.h
@@ -35,6 +35,7 @@
// any changes here, make sure that you're not breaking any platforms.
//
// Define a small subset of tr1 type traits. The traits we define are:
+// enable_if
// is_integral
// is_floating_point
// is_pointer
@@ -58,6 +59,7 @@
#ifndef GOOGLE_PROTOBUF_TYPE_TRAITS_H_
#define GOOGLE_PROTOBUF_TYPE_TRAITS_H_
+#include <cstddef> // for NULL
#include <utility> // For pair
#include <google/protobuf/stubs/template_util.h> // For true_type and false_type
@@ -66,6 +68,24 @@
namespace protobuf {
namespace internal {
+template<typename B, typename D>
+struct is_base_of {
+ typedef char (&yes)[1];
+ typedef char (&no)[2];
+
+ // BEGIN GOOGLE LOCAL MODIFICATION -- check is a #define on Mac.
+ #undef check
+ // END GOOGLE LOCAL MODIFICATION
+
+ static yes check(const B*);
+ static no check(const void*);
+
+ enum {
+ value = sizeof(check(static_cast<const D*>(NULL))) == sizeof(yes),
+ };
+};
+
+template <bool cond, class T = void> struct enable_if;
template <class T> struct is_integral;
template <class T> struct is_floating_point;
template <class T> struct is_pointer;
@@ -87,10 +107,17 @@
template <class T> struct add_reference;
template <class T> struct remove_pointer;
template <class T, class U> struct is_same;
-#if !defined(_MSC_VER) && !(defined(__GNUC__) && __GNUC__ <= 3)
+#if !(defined(__GNUC__) && __GNUC__ <= 3)
template <class From, class To> struct is_convertible;
#endif
+// enable_if, equivalent semantics to c++11 std::enable_if, specifically:
+// "If B is true, the member typedef type shall equal T; otherwise, there
+// shall be no member typedef type."
+// Specified by 20.9.7.6 [Other transformations]
+
+template<bool cond, class T> struct enable_if { typedef T type; };
+template<class T> struct enable_if<false, T> {};
// is_integral is false except for the built-in integer types. A
// cv-qualified type is integral if and only if the underlying type is.
template <class T> struct is_integral : false_type { };
@@ -144,7 +171,7 @@
#if !defined(_MSC_VER) && !(defined(__GNUC__) && __GNUC__ <= 3)
-namespace internal {
+namespace type_traits_internal {
template <class T> struct is_class_or_union {
template <class U> static small_ tester(void (U::*)());
@@ -159,7 +186,7 @@
template <class T> struct is_enum_impl<true, T> : false_type { };
-} // namespace internal
+} // namespace type_traits_internal
// Specified by TR1 [4.5.1] primary type categories.
@@ -177,12 +204,12 @@
// because it can't be used with some types (e.g. void or classes with
// inaccessible conversion operators).
template <class T> struct is_enum
- : internal::is_enum_impl<
+ : type_traits_internal::is_enum_impl<
is_same<T, void>::value ||
is_integral<T>::value ||
is_floating_point<T>::value ||
is_reference<T>::value ||
- internal::is_class_or_union<T>::value,
+ type_traits_internal::is_class_or_union<T>::value,
T> { };
template <class T> struct is_enum<const T> : is_enum<T> { };
@@ -299,8 +326,8 @@
template<typename T> struct is_same<T, T> : public true_type { };
// Specified by TR1 [4.6] Relationships between types
-#if !defined(_MSC_VER) && !(defined(__GNUC__) && __GNUC__ <= 3)
-namespace internal {
+#if !(defined(__GNUC__) && __GNUC__ <= 3)
+namespace type_traits_internal {
// This class is an implementation detail for is_convertible, and you
// don't need to know how it works to use is_convertible. For those
@@ -316,16 +343,17 @@
static small_ Test(To);
static big_ Test(...);
static From Create();
+ enum {
+ value = sizeof(Test(Create())) == sizeof(small_)
+ };
};
-} // namespace internal
+} // namespace type_traits_internal
// Inherits from true_type if From is convertible to To, false_type otherwise.
template <typename From, typename To>
struct is_convertible
: integral_constant<bool,
- sizeof(internal::ConvertHelper<From, To>::Test(
- internal::ConvertHelper<From, To>::Create()))
- == sizeof(small_)> {
+ type_traits_internal::ConvertHelper<From, To>::value> {
};
#endif
diff --git a/darwin-x86_64/protoc/include/google/protobuf/text_format.h b/darwin-x86_64/protoc/include/google/protobuf/text_format.h
index 2954941..ef3d4a8 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/text_format.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/text_format.h
@@ -40,6 +40,9 @@
#include <map>
#include <memory>
+#ifndef _SHARED_PTR_H
+#include <google/protobuf/stubs/shared_ptr.h>
+#endif
#include <string>
#include <vector>
@@ -205,6 +208,29 @@
print_message_fields_in_index_order;
}
+ // If expand==true, expand google.protobuf.Any payloads. The output
+ // will be of form
+ // [type_url] { <value_printed_in_text> }
+ //
+ // If expand==false, print Any using the default printer. The output will
+ // look like
+ // type_url: "<type_url>" value: "serialized_content"
+ void SetExpandAny(bool expand) {
+ expand_any_ = expand;
+ }
+
+ // 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
+ // cannot fully recover the original string field any more.
+ void SetTruncateStringFieldLongerThan(
+ const int64 truncate_string_field_longer_than) {
+ truncate_string_field_longer_than_ = truncate_string_field_longer_than;
+ }
+
// Register a custom field-specific FieldValuePrinter for fields
// with a particular FieldDescriptor.
// Returns "true" if the registration succeeded, or "false", if there is
@@ -256,6 +282,8 @@
void PrintUnknownFields(const UnknownFieldSet& unknown_fields,
TextGenerator& generator) const;
+ bool PrintAny(const Message& message, TextGenerator& generator) const;
+
int initial_indent_level_;
bool single_line_mode_;
@@ -268,15 +296,31 @@
bool print_message_fields_in_index_order_;
- scoped_ptr<const FieldValuePrinter> default_field_value_printer_;
+ bool expand_any_;
+
+ int64 truncate_string_field_longer_than_;
+
+ google::protobuf::scoped_ptr<const FieldValuePrinter> default_field_value_printer_;
typedef map<const FieldDescriptor*,
const FieldValuePrinter*> CustomPrinterMap;
CustomPrinterMap custom_printers_;
};
// Parses a text-format protocol message from the given input stream to
- // the given message object. This function parses the format written
- // by Print().
+ // the given message object. This function parses the human-readable format
+ // written by Print(). Returns true on success. The message is cleared first,
+ // even if the function fails -- See Merge() to avoid this behavior.
+ //
+ // Example input: "user {\n id: 123 extra { gender: MALE language: 'en' }\n}"
+ //
+ // One use for this function is parsing handwritten strings in test code.
+ // Another use is to parse the output from google::protobuf::Message::DebugString()
+ // (or ShortDebugString()), because these functions output using
+ // google::protobuf::TextFormat::Print().
+ //
+ // If you would like to read a protocol buffer serialized in the
+ // (non-human-readable) binary wire format, see
+ // google::protobuf::MessageLite::ParseFromString().
static bool Parse(io::ZeroCopyInputStream* input, Message* output);
// Like Parse(), but reads directly from a string.
static bool ParseFromString(const string& input, Message* output);
diff --git a/darwin-x86_64/protoc/include/google/protobuf/timestamp.pb.h b/darwin-x86_64/protoc/include/google/protobuf/timestamp.pb.h
new file mode 100644
index 0000000..7bf6259
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/timestamp.pb.h
@@ -0,0 +1,185 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/protobuf/timestamp.proto
+
+#ifndef PROTOBUF_google_2fprotobuf_2ftimestamp_2eproto__INCLUDED
+#define PROTOBUF_google_2fprotobuf_2ftimestamp_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 3000000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/arena.h>
+#include <google/protobuf/arenastring.h>
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/metadata.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/unknown_field_set.h>
+// @@protoc_insertion_point(includes)
+
+namespace google {
+namespace protobuf {
+
+// Internal implementation detail -- do not call these.
+void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftimestamp_2eproto();
+void protobuf_AssignDesc_google_2fprotobuf_2ftimestamp_2eproto();
+void protobuf_ShutdownFile_google_2fprotobuf_2ftimestamp_2eproto();
+
+class Timestamp;
+
+// ===================================================================
+
+class LIBPROTOBUF_EXPORT Timestamp : public ::google::protobuf::Message {
+ public:
+ Timestamp();
+ virtual ~Timestamp();
+
+ Timestamp(const Timestamp& from);
+
+ inline Timestamp& operator=(const Timestamp& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
+ inline void* GetMaybeArenaPointer() const {
+ return MaybeArenaPtr();
+ }
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const Timestamp& default_instance();
+
+ void UnsafeArenaSwap(Timestamp* other);
+ void Swap(Timestamp* other);
+
+ // implements Message ----------------------------------------------
+
+ inline Timestamp* New() const { return New(NULL); }
+
+ Timestamp* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const Timestamp& from);
+ void MergeFrom(const Timestamp& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(Timestamp* other);
+ protected:
+ explicit Timestamp(::google::protobuf::Arena* arena);
+ private:
+ static void ArenaDtor(void* object);
+ inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional int64 seconds = 1;
+ void clear_seconds();
+ static const int kSecondsFieldNumber = 1;
+ ::google::protobuf::int64 seconds() const;
+ void set_seconds(::google::protobuf::int64 value);
+
+ // optional int32 nanos = 2;
+ void clear_nanos();
+ static const int kNanosFieldNumber = 2;
+ ::google::protobuf::int32 nanos() const;
+ void set_nanos(::google::protobuf::int32 value);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.Timestamp)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ friend class ::google::protobuf::Arena;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
+ bool _is_default_instance_;
+ ::google::protobuf::int64 seconds_;
+ ::google::protobuf::int32 nanos_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftimestamp_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2ftimestamp_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2ftimestamp_2eproto();
+
+ void InitAsDefaultInstance();
+ static Timestamp* default_instance_;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+#if !PROTOBUF_INLINE_NOT_IN_HEADERS
+// Timestamp
+
+// optional int64 seconds = 1;
+inline void Timestamp::clear_seconds() {
+ seconds_ = GOOGLE_LONGLONG(0);
+}
+inline ::google::protobuf::int64 Timestamp::seconds() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Timestamp.seconds)
+ return seconds_;
+}
+inline void Timestamp::set_seconds(::google::protobuf::int64 value) {
+
+ seconds_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.Timestamp.seconds)
+}
+
+// optional int32 nanos = 2;
+inline void Timestamp::clear_nanos() {
+ nanos_ = 0;
+}
+inline ::google::protobuf::int32 Timestamp::nanos() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Timestamp.nanos)
+ return nanos_;
+}
+inline void Timestamp::set_nanos(::google::protobuf::int32 value) {
+
+ nanos_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.Timestamp.nanos)
+}
+
+#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace protobuf
+} // namespace google
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_google_2fprotobuf_2ftimestamp_2eproto__INCLUDED
diff --git a/darwin-x86_64/protoc/include/google/protobuf/timestamp.proto b/darwin-x86_64/protoc/include/google/protobuf/timestamp.proto
new file mode 100644
index 0000000..7992a85
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/timestamp.proto
@@ -0,0 +1,111 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option cc_enable_arenas = true;
+option go_package = "github.com/golang/protobuf/ptypes/timestamp";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "TimestampProto";
+option java_multiple_files = true;
+option java_generate_equals_and_hash = true;
+option objc_class_prefix = "GPB";
+
+// A Timestamp represents a point in time independent of any time zone
+// or calendar, represented as seconds and fractions of seconds at
+// nanosecond resolution in UTC Epoch time. It is encoded using the
+// Proleptic Gregorian Calendar which extends the Gregorian calendar
+// backwards to year one. It is encoded assuming all minutes are 60
+// seconds long, i.e. leap seconds are "smeared" so that no leap second
+// table is needed for interpretation. Range is from
+// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
+// By restricting to that range, we ensure that we can convert to
+// and from RFC 3339 date strings.
+// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
+//
+// Example 1: Compute Timestamp from POSIX `time()`.
+//
+// Timestamp timestamp;
+// timestamp.set_seconds(time(NULL));
+// timestamp.set_nanos(0);
+//
+// Example 2: Compute Timestamp from POSIX `gettimeofday()`.
+//
+// struct timeval tv;
+// gettimeofday(&tv, NULL);
+//
+// Timestamp timestamp;
+// timestamp.set_seconds(tv.tv_sec);
+// timestamp.set_nanos(tv.tv_usec * 1000);
+//
+// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
+//
+// FILETIME ft;
+// GetSystemTimeAsFileTime(&ft);
+// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
+//
+// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
+// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
+// Timestamp timestamp;
+// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
+// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
+//
+// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
+//
+// long millis = System.currentTimeMillis();
+//
+// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
+// .setNanos((int) ((millis % 1000) * 1000000)).build();
+//
+//
+// Example 5: Compute Timestamp from current time in Python.
+//
+// now = time.time()
+// seconds = int(now)
+// nanos = int((now - seconds) * 10**9)
+// timestamp = Timestamp(seconds=seconds, nanos=nanos)
+//
+//
+message Timestamp {
+
+ // Represents seconds of UTC time since Unix epoch
+ // 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to
+ // 9999-12-31T23:59:59Z inclusive.
+ int64 seconds = 1;
+
+ // Non-negative fractions of a second at nanosecond resolution. Negative
+ // second values with fractions must still have non-negative nanos values
+ // that count forward in time. Must be from 0 to 999,999,999
+ // inclusive.
+ int32 nanos = 2;
+}
diff --git a/darwin-x86_64/protoc/include/google/protobuf/type.pb.h b/darwin-x86_64/protoc/include/google/protobuf/type.pb.h
new file mode 100644
index 0000000..4255fa8
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/type.pb.h
@@ -0,0 +1,1731 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/protobuf/type.proto
+
+#ifndef PROTOBUF_google_2fprotobuf_2ftype_2eproto__INCLUDED
+#define PROTOBUF_google_2fprotobuf_2ftype_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 3000000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/arena.h>
+#include <google/protobuf/arenastring.h>
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/metadata.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/generated_enum_reflection.h>
+#include <google/protobuf/unknown_field_set.h>
+#include <google/protobuf/any.pb.h>
+#include <google/protobuf/source_context.pb.h>
+// @@protoc_insertion_point(includes)
+
+namespace google {
+namespace protobuf {
+
+// Internal implementation detail -- do not call these.
+void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
+void protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto();
+void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto();
+
+class Enum;
+class EnumValue;
+class Field;
+class Option;
+class Type;
+
+enum Field_Kind {
+ Field_Kind_TYPE_UNKNOWN = 0,
+ Field_Kind_TYPE_DOUBLE = 1,
+ Field_Kind_TYPE_FLOAT = 2,
+ Field_Kind_TYPE_INT64 = 3,
+ Field_Kind_TYPE_UINT64 = 4,
+ Field_Kind_TYPE_INT32 = 5,
+ Field_Kind_TYPE_FIXED64 = 6,
+ Field_Kind_TYPE_FIXED32 = 7,
+ Field_Kind_TYPE_BOOL = 8,
+ Field_Kind_TYPE_STRING = 9,
+ Field_Kind_TYPE_GROUP = 10,
+ Field_Kind_TYPE_MESSAGE = 11,
+ Field_Kind_TYPE_BYTES = 12,
+ Field_Kind_TYPE_UINT32 = 13,
+ Field_Kind_TYPE_ENUM = 14,
+ Field_Kind_TYPE_SFIXED32 = 15,
+ Field_Kind_TYPE_SFIXED64 = 16,
+ Field_Kind_TYPE_SINT32 = 17,
+ Field_Kind_TYPE_SINT64 = 18,
+ Field_Kind_Field_Kind_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min,
+ Field_Kind_Field_Kind_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max
+};
+LIBPROTOBUF_EXPORT bool Field_Kind_IsValid(int value);
+const Field_Kind Field_Kind_Kind_MIN = Field_Kind_TYPE_UNKNOWN;
+const Field_Kind Field_Kind_Kind_MAX = Field_Kind_TYPE_SINT64;
+const int Field_Kind_Kind_ARRAYSIZE = Field_Kind_Kind_MAX + 1;
+
+LIBPROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* Field_Kind_descriptor();
+inline const ::std::string& Field_Kind_Name(Field_Kind value) {
+ return ::google::protobuf::internal::NameOfEnum(
+ Field_Kind_descriptor(), value);
+}
+inline bool Field_Kind_Parse(
+ const ::std::string& name, Field_Kind* value) {
+ return ::google::protobuf::internal::ParseNamedEnum<Field_Kind>(
+ Field_Kind_descriptor(), name, value);
+}
+enum Field_Cardinality {
+ Field_Cardinality_CARDINALITY_UNKNOWN = 0,
+ Field_Cardinality_CARDINALITY_OPTIONAL = 1,
+ Field_Cardinality_CARDINALITY_REQUIRED = 2,
+ Field_Cardinality_CARDINALITY_REPEATED = 3,
+ Field_Cardinality_Field_Cardinality_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min,
+ Field_Cardinality_Field_Cardinality_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max
+};
+LIBPROTOBUF_EXPORT bool Field_Cardinality_IsValid(int value);
+const Field_Cardinality Field_Cardinality_Cardinality_MIN = Field_Cardinality_CARDINALITY_UNKNOWN;
+const Field_Cardinality Field_Cardinality_Cardinality_MAX = Field_Cardinality_CARDINALITY_REPEATED;
+const int Field_Cardinality_Cardinality_ARRAYSIZE = Field_Cardinality_Cardinality_MAX + 1;
+
+LIBPROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* Field_Cardinality_descriptor();
+inline const ::std::string& Field_Cardinality_Name(Field_Cardinality value) {
+ return ::google::protobuf::internal::NameOfEnum(
+ Field_Cardinality_descriptor(), value);
+}
+inline bool Field_Cardinality_Parse(
+ const ::std::string& name, Field_Cardinality* value) {
+ return ::google::protobuf::internal::ParseNamedEnum<Field_Cardinality>(
+ Field_Cardinality_descriptor(), name, value);
+}
+enum Syntax {
+ SYNTAX_PROTO2 = 0,
+ SYNTAX_PROTO3 = 1,
+ Syntax_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min,
+ Syntax_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max
+};
+LIBPROTOBUF_EXPORT bool Syntax_IsValid(int value);
+const Syntax Syntax_MIN = SYNTAX_PROTO2;
+const Syntax Syntax_MAX = SYNTAX_PROTO3;
+const int Syntax_ARRAYSIZE = Syntax_MAX + 1;
+
+LIBPROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* Syntax_descriptor();
+inline const ::std::string& Syntax_Name(Syntax value) {
+ return ::google::protobuf::internal::NameOfEnum(
+ Syntax_descriptor(), value);
+}
+inline bool Syntax_Parse(
+ const ::std::string& name, Syntax* value) {
+ return ::google::protobuf::internal::ParseNamedEnum<Syntax>(
+ Syntax_descriptor(), name, value);
+}
+// ===================================================================
+
+class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message {
+ public:
+ Type();
+ virtual ~Type();
+
+ Type(const Type& from);
+
+ inline Type& operator=(const Type& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const Type& default_instance();
+
+ void Swap(Type* other);
+
+ // implements Message ----------------------------------------------
+
+ inline Type* New() const { return New(NULL); }
+
+ Type* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const Type& from);
+ void MergeFrom(const Type& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(Type* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional string name = 1;
+ void clear_name();
+ static const int kNameFieldNumber = 1;
+ const ::std::string& name() const;
+ void set_name(const ::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);
+
+ // repeated .google.protobuf.Field fields = 2;
+ int fields_size() const;
+ void clear_fields();
+ static const int kFieldsFieldNumber = 2;
+ const ::google::protobuf::Field& fields(int index) const;
+ ::google::protobuf::Field* mutable_fields(int index);
+ ::google::protobuf::Field* add_fields();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >*
+ mutable_fields();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >&
+ fields() const;
+
+ // repeated string oneofs = 3;
+ int oneofs_size() const;
+ void clear_oneofs();
+ static const int kOneofsFieldNumber = 3;
+ const ::std::string& oneofs(int index) const;
+ ::std::string* mutable_oneofs(int index);
+ void set_oneofs(int index, const ::std::string& value);
+ void set_oneofs(int index, const char* value);
+ void set_oneofs(int index, const char* value, size_t size);
+ ::std::string* add_oneofs();
+ void add_oneofs(const ::std::string& value);
+ void add_oneofs(const char* value);
+ void add_oneofs(const char* value, size_t size);
+ const ::google::protobuf::RepeatedPtrField< ::std::string>& oneofs() const;
+ ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_oneofs();
+
+ // repeated .google.protobuf.Option options = 4;
+ int options_size() const;
+ void clear_options();
+ static const int kOptionsFieldNumber = 4;
+ const ::google::protobuf::Option& options(int index) const;
+ ::google::protobuf::Option* mutable_options(int index);
+ ::google::protobuf::Option* add_options();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
+ mutable_options();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
+ options() const;
+
+ // optional .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* mutable_source_context();
+ ::google::protobuf::SourceContext* release_source_context();
+ void set_allocated_source_context(::google::protobuf::SourceContext* source_context);
+
+ // optional .google.protobuf.Syntax syntax = 6;
+ void clear_syntax();
+ static const int kSyntaxFieldNumber = 6;
+ ::google::protobuf::Syntax syntax() const;
+ void set_syntax(::google::protobuf::Syntax value);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.Type)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ bool _is_default_instance_;
+ ::google::protobuf::internal::ArenaStringPtr name_;
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field > fields_;
+ ::google::protobuf::RepeatedPtrField< ::std::string> oneofs_;
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option > options_;
+ ::google::protobuf::SourceContext* source_context_;
+ int syntax_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto();
+
+ void InitAsDefaultInstance();
+ static Type* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message {
+ public:
+ Field();
+ virtual ~Field();
+
+ Field(const Field& from);
+
+ inline Field& operator=(const Field& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const Field& default_instance();
+
+ void Swap(Field* other);
+
+ // implements Message ----------------------------------------------
+
+ inline Field* New() const { return New(NULL); }
+
+ Field* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const Field& from);
+ void MergeFrom(const Field& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(Field* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ typedef Field_Kind Kind;
+ static const Kind TYPE_UNKNOWN =
+ Field_Kind_TYPE_UNKNOWN;
+ static const Kind TYPE_DOUBLE =
+ Field_Kind_TYPE_DOUBLE;
+ static const Kind TYPE_FLOAT =
+ Field_Kind_TYPE_FLOAT;
+ static const Kind TYPE_INT64 =
+ Field_Kind_TYPE_INT64;
+ static const Kind TYPE_UINT64 =
+ Field_Kind_TYPE_UINT64;
+ static const Kind TYPE_INT32 =
+ Field_Kind_TYPE_INT32;
+ static const Kind TYPE_FIXED64 =
+ Field_Kind_TYPE_FIXED64;
+ static const Kind TYPE_FIXED32 =
+ Field_Kind_TYPE_FIXED32;
+ static const Kind TYPE_BOOL =
+ Field_Kind_TYPE_BOOL;
+ static const Kind TYPE_STRING =
+ Field_Kind_TYPE_STRING;
+ static const Kind TYPE_GROUP =
+ Field_Kind_TYPE_GROUP;
+ static const Kind TYPE_MESSAGE =
+ Field_Kind_TYPE_MESSAGE;
+ static const Kind TYPE_BYTES =
+ Field_Kind_TYPE_BYTES;
+ static const Kind TYPE_UINT32 =
+ Field_Kind_TYPE_UINT32;
+ static const Kind TYPE_ENUM =
+ Field_Kind_TYPE_ENUM;
+ static const Kind TYPE_SFIXED32 =
+ Field_Kind_TYPE_SFIXED32;
+ static const Kind TYPE_SFIXED64 =
+ Field_Kind_TYPE_SFIXED64;
+ static const Kind TYPE_SINT32 =
+ Field_Kind_TYPE_SINT32;
+ static const Kind TYPE_SINT64 =
+ Field_Kind_TYPE_SINT64;
+ static inline bool Kind_IsValid(int value) {
+ return Field_Kind_IsValid(value);
+ }
+ static const Kind Kind_MIN =
+ Field_Kind_Kind_MIN;
+ static const Kind Kind_MAX =
+ Field_Kind_Kind_MAX;
+ static const int Kind_ARRAYSIZE =
+ Field_Kind_Kind_ARRAYSIZE;
+ static inline const ::google::protobuf::EnumDescriptor*
+ Kind_descriptor() {
+ return Field_Kind_descriptor();
+ }
+ static inline const ::std::string& Kind_Name(Kind value) {
+ return Field_Kind_Name(value);
+ }
+ static inline bool Kind_Parse(const ::std::string& name,
+ Kind* value) {
+ return Field_Kind_Parse(name, value);
+ }
+
+ typedef Field_Cardinality Cardinality;
+ static const Cardinality CARDINALITY_UNKNOWN =
+ Field_Cardinality_CARDINALITY_UNKNOWN;
+ static const Cardinality CARDINALITY_OPTIONAL =
+ Field_Cardinality_CARDINALITY_OPTIONAL;
+ static const Cardinality CARDINALITY_REQUIRED =
+ Field_Cardinality_CARDINALITY_REQUIRED;
+ static const Cardinality CARDINALITY_REPEATED =
+ Field_Cardinality_CARDINALITY_REPEATED;
+ static inline bool Cardinality_IsValid(int value) {
+ return Field_Cardinality_IsValid(value);
+ }
+ static const Cardinality Cardinality_MIN =
+ Field_Cardinality_Cardinality_MIN;
+ static const Cardinality Cardinality_MAX =
+ Field_Cardinality_Cardinality_MAX;
+ static const int Cardinality_ARRAYSIZE =
+ Field_Cardinality_Cardinality_ARRAYSIZE;
+ static inline const ::google::protobuf::EnumDescriptor*
+ Cardinality_descriptor() {
+ return Field_Cardinality_descriptor();
+ }
+ static inline const ::std::string& Cardinality_Name(Cardinality value) {
+ return Field_Cardinality_Name(value);
+ }
+ static inline bool Cardinality_Parse(const ::std::string& name,
+ Cardinality* value) {
+ return Field_Cardinality_Parse(name, value);
+ }
+
+ // accessors -------------------------------------------------------
+
+ // optional .google.protobuf.Field.Kind kind = 1;
+ void clear_kind();
+ static const int kKindFieldNumber = 1;
+ ::google::protobuf::Field_Kind kind() const;
+ void set_kind(::google::protobuf::Field_Kind value);
+
+ // optional .google.protobuf.Field.Cardinality cardinality = 2;
+ void clear_cardinality();
+ static const int kCardinalityFieldNumber = 2;
+ ::google::protobuf::Field_Cardinality cardinality() const;
+ void set_cardinality(::google::protobuf::Field_Cardinality value);
+
+ // optional int32 number = 3;
+ void clear_number();
+ static const int kNumberFieldNumber = 3;
+ ::google::protobuf::int32 number() const;
+ void set_number(::google::protobuf::int32 value);
+
+ // optional string name = 4;
+ void clear_name();
+ static const int kNameFieldNumber = 4;
+ const ::std::string& name() const;
+ void set_name(const ::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);
+
+ // optional string type_url = 6;
+ void clear_type_url();
+ static const int kTypeUrlFieldNumber = 6;
+ const ::std::string& type_url() const;
+ void set_type_url(const ::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);
+
+ // optional int32 oneof_index = 7;
+ void clear_oneof_index();
+ static const int kOneofIndexFieldNumber = 7;
+ ::google::protobuf::int32 oneof_index() const;
+ void set_oneof_index(::google::protobuf::int32 value);
+
+ // optional bool packed = 8;
+ void clear_packed();
+ static const int kPackedFieldNumber = 8;
+ bool packed() const;
+ void set_packed(bool value);
+
+ // repeated .google.protobuf.Option options = 9;
+ int options_size() const;
+ void clear_options();
+ static const int kOptionsFieldNumber = 9;
+ const ::google::protobuf::Option& options(int index) const;
+ ::google::protobuf::Option* mutable_options(int index);
+ ::google::protobuf::Option* add_options();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
+ mutable_options();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
+ options() const;
+
+ // optional string json_name = 10;
+ void clear_json_name();
+ static const int kJsonNameFieldNumber = 10;
+ const ::std::string& json_name() const;
+ void set_json_name(const ::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);
+
+ // optional string default_value = 11;
+ void clear_default_value();
+ static const int kDefaultValueFieldNumber = 11;
+ const ::std::string& default_value() const;
+ void set_default_value(const ::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);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.Field)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ bool _is_default_instance_;
+ int kind_;
+ int cardinality_;
+ ::google::protobuf::internal::ArenaStringPtr name_;
+ ::google::protobuf::int32 number_;
+ ::google::protobuf::int32 oneof_index_;
+ ::google::protobuf::internal::ArenaStringPtr type_url_;
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option > options_;
+ ::google::protobuf::internal::ArenaStringPtr json_name_;
+ ::google::protobuf::internal::ArenaStringPtr default_value_;
+ bool packed_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto();
+
+ void InitAsDefaultInstance();
+ static Field* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message {
+ public:
+ Enum();
+ virtual ~Enum();
+
+ Enum(const Enum& from);
+
+ inline Enum& operator=(const Enum& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const Enum& default_instance();
+
+ void Swap(Enum* other);
+
+ // implements Message ----------------------------------------------
+
+ inline Enum* New() const { return New(NULL); }
+
+ Enum* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const Enum& from);
+ void MergeFrom(const Enum& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(Enum* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional string name = 1;
+ void clear_name();
+ static const int kNameFieldNumber = 1;
+ const ::std::string& name() const;
+ void set_name(const ::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);
+
+ // repeated .google.protobuf.EnumValue enumvalue = 2;
+ int enumvalue_size() const;
+ void clear_enumvalue();
+ static const int kEnumvalueFieldNumber = 2;
+ const ::google::protobuf::EnumValue& enumvalue(int index) const;
+ ::google::protobuf::EnumValue* mutable_enumvalue(int index);
+ ::google::protobuf::EnumValue* add_enumvalue();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >*
+ mutable_enumvalue();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >&
+ enumvalue() const;
+
+ // repeated .google.protobuf.Option options = 3;
+ int options_size() const;
+ void clear_options();
+ static const int kOptionsFieldNumber = 3;
+ const ::google::protobuf::Option& options(int index) const;
+ ::google::protobuf::Option* mutable_options(int index);
+ ::google::protobuf::Option* add_options();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
+ mutable_options();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
+ options() const;
+
+ // optional .google.protobuf.SourceContext source_context = 4;
+ bool has_source_context() const;
+ void clear_source_context();
+ static const int kSourceContextFieldNumber = 4;
+ const ::google::protobuf::SourceContext& source_context() const;
+ ::google::protobuf::SourceContext* mutable_source_context();
+ ::google::protobuf::SourceContext* release_source_context();
+ void set_allocated_source_context(::google::protobuf::SourceContext* source_context);
+
+ // optional .google.protobuf.Syntax syntax = 5;
+ void clear_syntax();
+ static const int kSyntaxFieldNumber = 5;
+ ::google::protobuf::Syntax syntax() const;
+ void set_syntax(::google::protobuf::Syntax value);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.Enum)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ bool _is_default_instance_;
+ ::google::protobuf::internal::ArenaStringPtr name_;
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue > enumvalue_;
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option > options_;
+ ::google::protobuf::SourceContext* source_context_;
+ int syntax_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto();
+
+ void InitAsDefaultInstance();
+ static Enum* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message {
+ public:
+ EnumValue();
+ virtual ~EnumValue();
+
+ EnumValue(const EnumValue& from);
+
+ inline EnumValue& operator=(const EnumValue& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const EnumValue& default_instance();
+
+ void Swap(EnumValue* other);
+
+ // implements Message ----------------------------------------------
+
+ inline EnumValue* New() const { return New(NULL); }
+
+ EnumValue* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const EnumValue& from);
+ void MergeFrom(const EnumValue& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(EnumValue* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional string name = 1;
+ void clear_name();
+ static const int kNameFieldNumber = 1;
+ const ::std::string& name() const;
+ void set_name(const ::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);
+
+ // optional int32 number = 2;
+ void clear_number();
+ static const int kNumberFieldNumber = 2;
+ ::google::protobuf::int32 number() const;
+ void set_number(::google::protobuf::int32 value);
+
+ // repeated .google.protobuf.Option options = 3;
+ int options_size() const;
+ void clear_options();
+ static const int kOptionsFieldNumber = 3;
+ const ::google::protobuf::Option& options(int index) const;
+ ::google::protobuf::Option* mutable_options(int index);
+ ::google::protobuf::Option* add_options();
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
+ mutable_options();
+ const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
+ options() const;
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.EnumValue)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ bool _is_default_instance_;
+ ::google::protobuf::internal::ArenaStringPtr name_;
+ ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option > options_;
+ ::google::protobuf::int32 number_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto();
+
+ void InitAsDefaultInstance();
+ static EnumValue* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class LIBPROTOBUF_EXPORT Option : public ::google::protobuf::Message {
+ public:
+ Option();
+ virtual ~Option();
+
+ Option(const Option& from);
+
+ inline Option& operator=(const Option& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const Option& default_instance();
+
+ void Swap(Option* other);
+
+ // implements Message ----------------------------------------------
+
+ inline Option* New() const { return New(NULL); }
+
+ Option* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const Option& from);
+ void MergeFrom(const Option& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(Option* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional string name = 1;
+ void clear_name();
+ static const int kNameFieldNumber = 1;
+ const ::std::string& name() const;
+ void set_name(const ::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);
+
+ // optional .google.protobuf.Any value = 2;
+ bool has_value() const;
+ void clear_value();
+ static const int kValueFieldNumber = 2;
+ const ::google::protobuf::Any& value() const;
+ ::google::protobuf::Any* mutable_value();
+ ::google::protobuf::Any* release_value();
+ void set_allocated_value(::google::protobuf::Any* value);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.Option)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ bool _is_default_instance_;
+ ::google::protobuf::internal::ArenaStringPtr name_;
+ ::google::protobuf::Any* value_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto();
+
+ void InitAsDefaultInstance();
+ static Option* default_instance_;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+#if !PROTOBUF_INLINE_NOT_IN_HEADERS
+// Type
+
+// optional string name = 1;
+inline void Type::clear_name() {
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Type::name() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Type.name)
+ return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Type::set_name(const ::std::string& value) {
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.Type.name)
+}
+inline void Type::set_name(const char* value) {
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@protoc_insertion_point(field_set_char:google.protobuf.Type.name)
+}
+inline void Type::set_name(const char* value, size_t size) {
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.Type.name)
+}
+inline ::std::string* Type::mutable_name() {
+
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Type.name)
+ return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Type::release_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.Type.name)
+
+ return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Type::set_allocated_name(::std::string* name) {
+ if (name != NULL) {
+
+ } else {
+
+ }
+ name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Type.name)
+}
+
+// repeated .google.protobuf.Field fields = 2;
+inline int Type::fields_size() const {
+ return fields_.size();
+}
+inline void Type::clear_fields() {
+ fields_.Clear();
+}
+inline const ::google::protobuf::Field& Type::fields(int index) const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Type.fields)
+ return fields_.Get(index);
+}
+inline ::google::protobuf::Field* Type::mutable_fields(int index) {
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Type.fields)
+ return fields_.Mutable(index);
+}
+inline ::google::protobuf::Field* Type::add_fields() {
+ // @@protoc_insertion_point(field_add:google.protobuf.Type.fields)
+ return fields_.Add();
+}
+inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >*
+Type::mutable_fields() {
+ // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.fields)
+ return &fields_;
+}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >&
+Type::fields() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.Type.fields)
+ return fields_;
+}
+
+// repeated string oneofs = 3;
+inline int Type::oneofs_size() const {
+ return oneofs_.size();
+}
+inline void Type::clear_oneofs() {
+ oneofs_.Clear();
+}
+inline const ::std::string& Type::oneofs(int index) const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Type.oneofs)
+ return oneofs_.Get(index);
+}
+inline ::std::string* Type::mutable_oneofs(int index) {
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Type.oneofs)
+ return oneofs_.Mutable(index);
+}
+inline void Type::set_oneofs(int index, const ::std::string& value) {
+ // @@protoc_insertion_point(field_set:google.protobuf.Type.oneofs)
+ oneofs_.Mutable(index)->assign(value);
+}
+inline void Type::set_oneofs(int index, const char* value) {
+ oneofs_.Mutable(index)->assign(value);
+ // @@protoc_insertion_point(field_set_char:google.protobuf.Type.oneofs)
+}
+inline void Type::set_oneofs(int index, const char* value, size_t size) {
+ oneofs_.Mutable(index)->assign(
+ reinterpret_cast<const char*>(value), size);
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.Type.oneofs)
+}
+inline ::std::string* Type::add_oneofs() {
+ // @@protoc_insertion_point(field_add_mutable:google.protobuf.Type.oneofs)
+ return oneofs_.Add();
+}
+inline void Type::add_oneofs(const ::std::string& value) {
+ oneofs_.Add()->assign(value);
+ // @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs)
+}
+inline void Type::add_oneofs(const char* value) {
+ oneofs_.Add()->assign(value);
+ // @@protoc_insertion_point(field_add_char:google.protobuf.Type.oneofs)
+}
+inline void Type::add_oneofs(const char* value, size_t size) {
+ oneofs_.Add()->assign(reinterpret_cast<const char*>(value), size);
+ // @@protoc_insertion_point(field_add_pointer:google.protobuf.Type.oneofs)
+}
+inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
+Type::oneofs() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.Type.oneofs)
+ return oneofs_;
+}
+inline ::google::protobuf::RepeatedPtrField< ::std::string>*
+Type::mutable_oneofs() {
+ // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.oneofs)
+ return &oneofs_;
+}
+
+// repeated .google.protobuf.Option options = 4;
+inline int Type::options_size() const {
+ return options_.size();
+}
+inline void Type::clear_options() {
+ options_.Clear();
+}
+inline const ::google::protobuf::Option& Type::options(int index) const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Type.options)
+ return options_.Get(index);
+}
+inline ::google::protobuf::Option* Type::mutable_options(int index) {
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Type.options)
+ return options_.Mutable(index);
+}
+inline ::google::protobuf::Option* Type::add_options() {
+ // @@protoc_insertion_point(field_add:google.protobuf.Type.options)
+ return options_.Add();
+}
+inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
+Type::mutable_options() {
+ // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.options)
+ return &options_;
+}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
+Type::options() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.Type.options)
+ return options_;
+}
+
+// optional .google.protobuf.SourceContext source_context = 5;
+inline bool Type::has_source_context() const {
+ return !_is_default_instance_ && source_context_ != NULL;
+}
+inline void Type::clear_source_context() {
+ if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_;
+ source_context_ = NULL;
+}
+inline const ::google::protobuf::SourceContext& Type::source_context() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Type.source_context)
+ return source_context_ != NULL ? *source_context_ : *default_instance_->source_context_;
+}
+inline ::google::protobuf::SourceContext* Type::mutable_source_context() {
+
+ if (source_context_ == NULL) {
+ source_context_ = new ::google::protobuf::SourceContext;
+ }
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Type.source_context)
+ return source_context_;
+}
+inline ::google::protobuf::SourceContext* Type::release_source_context() {
+ // @@protoc_insertion_point(field_release:google.protobuf.Type.source_context)
+
+ ::google::protobuf::SourceContext* temp = source_context_;
+ source_context_ = NULL;
+ return temp;
+}
+inline void Type::set_allocated_source_context(::google::protobuf::SourceContext* source_context) {
+ delete source_context_;
+ source_context_ = source_context;
+ if (source_context) {
+
+ } else {
+
+ }
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Type.source_context)
+}
+
+// optional .google.protobuf.Syntax syntax = 6;
+inline void Type::clear_syntax() {
+ syntax_ = 0;
+}
+inline ::google::protobuf::Syntax Type::syntax() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Type.syntax)
+ return static_cast< ::google::protobuf::Syntax >(syntax_);
+}
+inline void Type::set_syntax(::google::protobuf::Syntax value) {
+
+ syntax_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.Type.syntax)
+}
+
+// -------------------------------------------------------------------
+
+// Field
+
+// optional .google.protobuf.Field.Kind kind = 1;
+inline void Field::clear_kind() {
+ kind_ = 0;
+}
+inline ::google::protobuf::Field_Kind Field::kind() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Field.kind)
+ return static_cast< ::google::protobuf::Field_Kind >(kind_);
+}
+inline void Field::set_kind(::google::protobuf::Field_Kind value) {
+
+ kind_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.Field.kind)
+}
+
+// optional .google.protobuf.Field.Cardinality cardinality = 2;
+inline void Field::clear_cardinality() {
+ cardinality_ = 0;
+}
+inline ::google::protobuf::Field_Cardinality Field::cardinality() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Field.cardinality)
+ return static_cast< ::google::protobuf::Field_Cardinality >(cardinality_);
+}
+inline void Field::set_cardinality(::google::protobuf::Field_Cardinality value) {
+
+ cardinality_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.Field.cardinality)
+}
+
+// optional int32 number = 3;
+inline void Field::clear_number() {
+ number_ = 0;
+}
+inline ::google::protobuf::int32 Field::number() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Field.number)
+ return number_;
+}
+inline void Field::set_number(::google::protobuf::int32 value) {
+
+ number_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.Field.number)
+}
+
+// optional string name = 4;
+inline void Field::clear_name() {
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Field::name() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Field.name)
+ return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Field::set_name(const ::std::string& value) {
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.Field.name)
+}
+inline void Field::set_name(const char* value) {
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@protoc_insertion_point(field_set_char:google.protobuf.Field.name)
+}
+inline void Field::set_name(const char* value, size_t size) {
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.name)
+}
+inline ::std::string* Field::mutable_name() {
+
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Field.name)
+ return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Field::release_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.Field.name)
+
+ return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Field::set_allocated_name(::std::string* name) {
+ if (name != NULL) {
+
+ } else {
+
+ }
+ name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.name)
+}
+
+// optional string type_url = 6;
+inline void Field::clear_type_url() {
+ type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Field::type_url() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Field.type_url)
+ return type_url_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Field::set_type_url(const ::std::string& value) {
+
+ type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.Field.type_url)
+}
+inline void Field::set_type_url(const char* value) {
+
+ type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@protoc_insertion_point(field_set_char:google.protobuf.Field.type_url)
+}
+inline void Field::set_type_url(const char* value, size_t size) {
+
+ type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.type_url)
+}
+inline ::std::string* Field::mutable_type_url() {
+
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Field.type_url)
+ return type_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Field::release_type_url() {
+ // @@protoc_insertion_point(field_release:google.protobuf.Field.type_url)
+
+ return type_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Field::set_allocated_type_url(::std::string* type_url) {
+ if (type_url != NULL) {
+
+ } else {
+
+ }
+ type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_url);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.type_url)
+}
+
+// optional int32 oneof_index = 7;
+inline void Field::clear_oneof_index() {
+ oneof_index_ = 0;
+}
+inline ::google::protobuf::int32 Field::oneof_index() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Field.oneof_index)
+ return oneof_index_;
+}
+inline void Field::set_oneof_index(::google::protobuf::int32 value) {
+
+ oneof_index_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.Field.oneof_index)
+}
+
+// optional bool packed = 8;
+inline void Field::clear_packed() {
+ packed_ = false;
+}
+inline bool Field::packed() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Field.packed)
+ return packed_;
+}
+inline void Field::set_packed(bool value) {
+
+ packed_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.Field.packed)
+}
+
+// repeated .google.protobuf.Option options = 9;
+inline int Field::options_size() const {
+ return options_.size();
+}
+inline void Field::clear_options() {
+ options_.Clear();
+}
+inline const ::google::protobuf::Option& Field::options(int index) const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Field.options)
+ return options_.Get(index);
+}
+inline ::google::protobuf::Option* Field::mutable_options(int index) {
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Field.options)
+ return options_.Mutable(index);
+}
+inline ::google::protobuf::Option* Field::add_options() {
+ // @@protoc_insertion_point(field_add:google.protobuf.Field.options)
+ return options_.Add();
+}
+inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
+Field::mutable_options() {
+ // @@protoc_insertion_point(field_mutable_list:google.protobuf.Field.options)
+ return &options_;
+}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
+Field::options() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.Field.options)
+ return options_;
+}
+
+// optional string json_name = 10;
+inline void Field::clear_json_name() {
+ json_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Field::json_name() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Field.json_name)
+ return json_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Field::set_json_name(const ::std::string& value) {
+
+ json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.Field.json_name)
+}
+inline void Field::set_json_name(const char* value) {
+
+ json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@protoc_insertion_point(field_set_char:google.protobuf.Field.json_name)
+}
+inline void Field::set_json_name(const char* value, size_t size) {
+
+ json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.json_name)
+}
+inline ::std::string* Field::mutable_json_name() {
+
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Field.json_name)
+ return json_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Field::release_json_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.Field.json_name)
+
+ return json_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Field::set_allocated_json_name(::std::string* json_name) {
+ if (json_name != NULL) {
+
+ } else {
+
+ }
+ json_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), json_name);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.json_name)
+}
+
+// optional string default_value = 11;
+inline void Field::clear_default_value() {
+ default_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Field::default_value() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Field.default_value)
+ return default_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Field::set_default_value(const ::std::string& value) {
+
+ default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.Field.default_value)
+}
+inline void Field::set_default_value(const char* value) {
+
+ default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@protoc_insertion_point(field_set_char:google.protobuf.Field.default_value)
+}
+inline void Field::set_default_value(const char* value, size_t size) {
+
+ default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.default_value)
+}
+inline ::std::string* Field::mutable_default_value() {
+
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Field.default_value)
+ return default_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Field::release_default_value() {
+ // @@protoc_insertion_point(field_release:google.protobuf.Field.default_value)
+
+ return default_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Field::set_allocated_default_value(::std::string* default_value) {
+ if (default_value != NULL) {
+
+ } else {
+
+ }
+ default_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), default_value);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.default_value)
+}
+
+// -------------------------------------------------------------------
+
+// Enum
+
+// optional string name = 1;
+inline void Enum::clear_name() {
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Enum::name() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Enum.name)
+ return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Enum::set_name(const ::std::string& value) {
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.Enum.name)
+}
+inline void Enum::set_name(const char* value) {
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@protoc_insertion_point(field_set_char:google.protobuf.Enum.name)
+}
+inline void Enum::set_name(const char* value, size_t size) {
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.Enum.name)
+}
+inline ::std::string* Enum::mutable_name() {
+
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.name)
+ return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Enum::release_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.Enum.name)
+
+ return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Enum::set_allocated_name(::std::string* name) {
+ if (name != NULL) {
+
+ } else {
+
+ }
+ name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Enum.name)
+}
+
+// repeated .google.protobuf.EnumValue enumvalue = 2;
+inline int Enum::enumvalue_size() const {
+ return enumvalue_.size();
+}
+inline void Enum::clear_enumvalue() {
+ enumvalue_.Clear();
+}
+inline const ::google::protobuf::EnumValue& Enum::enumvalue(int index) const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Enum.enumvalue)
+ return enumvalue_.Get(index);
+}
+inline ::google::protobuf::EnumValue* Enum::mutable_enumvalue(int index) {
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.enumvalue)
+ return enumvalue_.Mutable(index);
+}
+inline ::google::protobuf::EnumValue* Enum::add_enumvalue() {
+ // @@protoc_insertion_point(field_add:google.protobuf.Enum.enumvalue)
+ return enumvalue_.Add();
+}
+inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >*
+Enum::mutable_enumvalue() {
+ // @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.enumvalue)
+ return &enumvalue_;
+}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >&
+Enum::enumvalue() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.Enum.enumvalue)
+ return enumvalue_;
+}
+
+// repeated .google.protobuf.Option options = 3;
+inline int Enum::options_size() const {
+ return options_.size();
+}
+inline void Enum::clear_options() {
+ options_.Clear();
+}
+inline const ::google::protobuf::Option& Enum::options(int index) const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Enum.options)
+ return options_.Get(index);
+}
+inline ::google::protobuf::Option* Enum::mutable_options(int index) {
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.options)
+ return options_.Mutable(index);
+}
+inline ::google::protobuf::Option* Enum::add_options() {
+ // @@protoc_insertion_point(field_add:google.protobuf.Enum.options)
+ return options_.Add();
+}
+inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
+Enum::mutable_options() {
+ // @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.options)
+ return &options_;
+}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
+Enum::options() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.Enum.options)
+ return options_;
+}
+
+// optional .google.protobuf.SourceContext source_context = 4;
+inline bool Enum::has_source_context() const {
+ return !_is_default_instance_ && source_context_ != NULL;
+}
+inline void Enum::clear_source_context() {
+ if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_;
+ source_context_ = NULL;
+}
+inline const ::google::protobuf::SourceContext& Enum::source_context() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Enum.source_context)
+ return source_context_ != NULL ? *source_context_ : *default_instance_->source_context_;
+}
+inline ::google::protobuf::SourceContext* Enum::mutable_source_context() {
+
+ if (source_context_ == NULL) {
+ source_context_ = new ::google::protobuf::SourceContext;
+ }
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.source_context)
+ return source_context_;
+}
+inline ::google::protobuf::SourceContext* Enum::release_source_context() {
+ // @@protoc_insertion_point(field_release:google.protobuf.Enum.source_context)
+
+ ::google::protobuf::SourceContext* temp = source_context_;
+ source_context_ = NULL;
+ return temp;
+}
+inline void Enum::set_allocated_source_context(::google::protobuf::SourceContext* source_context) {
+ delete source_context_;
+ source_context_ = source_context;
+ if (source_context) {
+
+ } else {
+
+ }
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Enum.source_context)
+}
+
+// optional .google.protobuf.Syntax syntax = 5;
+inline void Enum::clear_syntax() {
+ syntax_ = 0;
+}
+inline ::google::protobuf::Syntax Enum::syntax() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Enum.syntax)
+ return static_cast< ::google::protobuf::Syntax >(syntax_);
+}
+inline void Enum::set_syntax(::google::protobuf::Syntax value) {
+
+ syntax_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.Enum.syntax)
+}
+
+// -------------------------------------------------------------------
+
+// EnumValue
+
+// optional string name = 1;
+inline void EnumValue::clear_name() {
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& EnumValue::name() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.name)
+ return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void EnumValue::set_name(const ::std::string& value) {
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.EnumValue.name)
+}
+inline void EnumValue::set_name(const char* value) {
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@protoc_insertion_point(field_set_char:google.protobuf.EnumValue.name)
+}
+inline void EnumValue::set_name(const char* value, size_t size) {
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumValue.name)
+}
+inline ::std::string* EnumValue::mutable_name() {
+
+ // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValue.name)
+ return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* EnumValue::release_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.EnumValue.name)
+
+ return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void EnumValue::set_allocated_name(::std::string* name) {
+ if (name != NULL) {
+
+ } else {
+
+ }
+ name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValue.name)
+}
+
+// optional int32 number = 2;
+inline void EnumValue::clear_number() {
+ number_ = 0;
+}
+inline ::google::protobuf::int32 EnumValue::number() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.number)
+ return number_;
+}
+inline void EnumValue::set_number(::google::protobuf::int32 value) {
+
+ number_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.EnumValue.number)
+}
+
+// repeated .google.protobuf.Option options = 3;
+inline int EnumValue::options_size() const {
+ return options_.size();
+}
+inline void EnumValue::clear_options() {
+ options_.Clear();
+}
+inline const ::google::protobuf::Option& EnumValue::options(int index) const {
+ // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.options)
+ return options_.Get(index);
+}
+inline ::google::protobuf::Option* EnumValue::mutable_options(int index) {
+ // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValue.options)
+ return options_.Mutable(index);
+}
+inline ::google::protobuf::Option* EnumValue::add_options() {
+ // @@protoc_insertion_point(field_add:google.protobuf.EnumValue.options)
+ return options_.Add();
+}
+inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
+EnumValue::mutable_options() {
+ // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValue.options)
+ return &options_;
+}
+inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
+EnumValue::options() const {
+ // @@protoc_insertion_point(field_list:google.protobuf.EnumValue.options)
+ return options_;
+}
+
+// -------------------------------------------------------------------
+
+// Option
+
+// optional string name = 1;
+inline void Option::clear_name() {
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Option::name() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Option.name)
+ return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Option::set_name(const ::std::string& value) {
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.Option.name)
+}
+inline void Option::set_name(const char* value) {
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@protoc_insertion_point(field_set_char:google.protobuf.Option.name)
+}
+inline void Option::set_name(const char* value, size_t size) {
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.Option.name)
+}
+inline ::std::string* Option::mutable_name() {
+
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Option.name)
+ return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Option::release_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.Option.name)
+
+ return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Option::set_allocated_name(::std::string* name) {
+ if (name != NULL) {
+
+ } else {
+
+ }
+ name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Option.name)
+}
+
+// optional .google.protobuf.Any value = 2;
+inline bool Option::has_value() const {
+ return !_is_default_instance_ && value_ != NULL;
+}
+inline void Option::clear_value() {
+ if (GetArenaNoVirtual() == NULL && value_ != NULL) delete value_;
+ value_ = NULL;
+}
+inline const ::google::protobuf::Any& Option::value() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Option.value)
+ return value_ != NULL ? *value_ : *default_instance_->value_;
+}
+inline ::google::protobuf::Any* Option::mutable_value() {
+
+ if (value_ == NULL) {
+ value_ = new ::google::protobuf::Any;
+ }
+ // @@protoc_insertion_point(field_mutable:google.protobuf.Option.value)
+ return value_;
+}
+inline ::google::protobuf::Any* Option::release_value() {
+ // @@protoc_insertion_point(field_release:google.protobuf.Option.value)
+
+ ::google::protobuf::Any* temp = value_;
+ value_ = NULL;
+ return temp;
+}
+inline void Option::set_allocated_value(::google::protobuf::Any* value) {
+ delete value_;
+ value_ = value;
+ if (value) {
+
+ } else {
+
+ }
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.Option.value)
+}
+
+#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace protobuf
+} // namespace google
+
+#ifndef SWIG
+namespace google {
+namespace protobuf {
+
+template <> struct is_proto_enum< ::google::protobuf::Field_Kind> : ::google::protobuf::internal::true_type {};
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::Field_Kind>() {
+ return ::google::protobuf::Field_Kind_descriptor();
+}
+template <> struct is_proto_enum< ::google::protobuf::Field_Cardinality> : ::google::protobuf::internal::true_type {};
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::Field_Cardinality>() {
+ return ::google::protobuf::Field_Cardinality_descriptor();
+}
+template <> struct is_proto_enum< ::google::protobuf::Syntax> : ::google::protobuf::internal::true_type {};
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::Syntax>() {
+ return ::google::protobuf::Syntax_descriptor();
+}
+
+} // namespace protobuf
+} // namespace google
+#endif // SWIG
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_google_2fprotobuf_2ftype_2eproto__INCLUDED
diff --git a/darwin-x86_64/protoc/include/google/protobuf/type.proto b/darwin-x86_64/protoc/include/google/protobuf/type.proto
new file mode 100644
index 0000000..1c9cf53
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/type.proto
@@ -0,0 +1,180 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+import "google/protobuf/any.proto";
+import "google/protobuf/source_context.proto";
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "TypeProto";
+option java_multiple_files = true;
+option java_generate_equals_and_hash = true;
+option objc_class_prefix = "GPB";
+
+// A protocol buffer message type.
+message Type {
+ // The fully qualified message name.
+ string name = 1;
+ // The list of fields.
+ repeated Field fields = 2;
+ // The list of types appearing in `oneof` definitions in this type.
+ repeated string oneofs = 3;
+ // The protocol buffer options.
+ repeated Option options = 4;
+ // The source context.
+ SourceContext source_context = 5;
+ // The source syntax.
+ Syntax syntax = 6;
+}
+
+// A single field of a message type.
+message Field {
+ // Basic field types.
+ enum Kind {
+ // Field type unknown.
+ TYPE_UNKNOWN = 0;
+ // Field type double.
+ TYPE_DOUBLE = 1;
+ // Field type float.
+ TYPE_FLOAT = 2;
+ // Field type int64.
+ TYPE_INT64 = 3;
+ // Field type uint64.
+ TYPE_UINT64 = 4;
+ // Field type int32.
+ TYPE_INT32 = 5;
+ // Field type fixed64.
+ TYPE_FIXED64 = 6;
+ // Field type fixed32.
+ TYPE_FIXED32 = 7;
+ // Field type bool.
+ TYPE_BOOL = 8;
+ // Field type string.
+ TYPE_STRING = 9;
+ // Field type group. Proto2 syntax only, and deprecated.
+ TYPE_GROUP = 10;
+ // Field type message.
+ TYPE_MESSAGE = 11;
+ // Field type bytes.
+ TYPE_BYTES = 12;
+ // Field type uint32.
+ TYPE_UINT32 = 13;
+ // Field type enum.
+ TYPE_ENUM = 14;
+ // Field type sfixed32.
+ TYPE_SFIXED32 = 15;
+ // Field type sfixed64.
+ TYPE_SFIXED64 = 16;
+ // Field type sint32.
+ TYPE_SINT32 = 17;
+ // Field type sint64.
+ TYPE_SINT64 = 18;
+ };
+
+ // Whether a field is optional, required, or repeated.
+ enum Cardinality {
+ // For fields with unknown cardinality.
+ CARDINALITY_UNKNOWN = 0;
+ // For optional fields.
+ CARDINALITY_OPTIONAL = 1;
+ // For required fields. Proto2 syntax only.
+ CARDINALITY_REQUIRED = 2;
+ // For repeated fields.
+ CARDINALITY_REPEATED = 3;
+ };
+
+ // The field type.
+ Kind kind = 1;
+ // The field cardinality.
+ Cardinality cardinality = 2;
+ // The field number.
+ int32 number = 3;
+ // The field name.
+ string name = 4;
+ // The field type URL, without the scheme, for message or enumeration
+ // types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+ string type_url = 6;
+ // The index of the field type in `Type.oneofs`, for message or enumeration
+ // types. The first type has index 1; zero means the type is not in the list.
+ int32 oneof_index = 7;
+ // Whether to use alternative packed wire representation.
+ bool packed = 8;
+ // The protocol buffer options.
+ repeated Option options = 9;
+ // The field JSON name.
+ string json_name = 10;
+ // The string value of the default value of this field. Proto2 syntax only.
+ string default_value = 11;
+}
+
+// Enum type definition.
+message Enum {
+ // Enum type name.
+ string name = 1;
+ // Enum value definitions.
+ repeated EnumValue enumvalue = 2;
+ // Protocol buffer options.
+ repeated Option options = 3;
+ // The source context.
+ SourceContext source_context = 4;
+ // The source syntax.
+ Syntax syntax = 5;
+}
+
+// Enum value definition.
+message EnumValue {
+ // Enum value name.
+ string name = 1;
+ // Enum value number.
+ int32 number = 2;
+ // Protocol buffer options.
+ repeated Option options = 3;
+}
+
+// A protocol buffer option, which can be attached to a message, field,
+// enumeration, etc.
+message Option {
+ // The option's name. For example, `"java_package"`.
+ string name = 1;
+ // The option's value. For example, `"com.google.protobuf"`.
+ Any value = 2;
+}
+
+// The syntax in which a protocol buffer element is defined.
+enum Syntax {
+ // Syntax `proto2`.
+ SYNTAX_PROTO2 = 0;
+ // Syntax `proto3`.
+ SYNTAX_PROTO3 = 1;
+}
diff --git a/darwin-x86_64/protoc/include/google/protobuf/unknown_field_set.h b/darwin-x86_64/protoc/include/google/protobuf/unknown_field_set.h
index ba202eb..612a942 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/unknown_field_set.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/unknown_field_set.h
@@ -42,6 +42,7 @@
#include <string>
#include <vector>
#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/logging.h>
namespace google {
namespace protobuf {
@@ -88,6 +89,9 @@
// Merge the contents of some other UnknownFieldSet with this one.
void MergeFrom(const UnknownFieldSet& other);
+ // Similar to above, but this function will destroy the contents of other.
+ void MergeFromAndDestroy(UnknownFieldSet* other);
+
// Swaps the contents of some other UnknownFieldSet with this one.
inline void Swap(UnknownFieldSet* x);
@@ -141,12 +145,22 @@
return ParseFromArray(data.data(), static_cast<int>(data.size()));
}
+ static const UnknownFieldSet* default_instance();
private:
-
+ // For InternalMergeFrom
+ friend class UnknownField;
+ // Merges from other UnknownFieldSet. This method assumes, that this object
+ // is newly created and has fields_ == NULL;
+ void InternalMergeFrom(const UnknownFieldSet& other);
void ClearFallback();
- vector<UnknownField>* fields_;
-
+ // fields_ is either NULL, or a pointer to a vector that is *non-empty*. We
+ // never hold the empty vector because we want the 'do we have any unknown
+ // fields' check to be fast, and avoid a cache miss: the UFS instance gets
+ // embedded in the message object, so 'fields_ != NULL' tests a member
+ // variable hot in the cache, without the need to go touch a vector somewhere
+ // else in memory.
+ std::vector<UnknownField>* fields_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(UnknownFieldSet);
};
@@ -198,22 +212,28 @@
// If this UnknownField contains a pointer, delete it.
void Delete();
+ // Reset all the underlying pointers to NULL. A special function to be only
+ // used while merging from a temporary UFS.
+ void Reset();
+
// Make a deep copy of any pointers in this UnknownField.
- void DeepCopy();
+ void DeepCopy(const UnknownField& other);
// Set the wire type of this UnknownField. Should only be used when this
// UnknownField is being created.
inline void SetType(Type type);
+ union LengthDelimited {
+ string* string_value_;
+ };
+
uint32 number_;
uint32 type_;
union {
uint64 varint_;
uint32 fixed32_;
uint64 fixed64_;
- mutable union {
- string* string_value_;
- } length_delimited_;
+ mutable union LengthDelimited length_delimited_;
UnknownFieldSet* group_;
};
};
@@ -222,13 +242,14 @@
// inline implementations
inline void UnknownFieldSet::Clear() {
- if (fields_ != NULL) {
+ if (fields_) {
ClearFallback();
}
}
inline bool UnknownFieldSet::empty() const {
- return fields_ == NULL || fields_->empty();
+ // Invariant: fields_ is never empty if present.
+ return !fields_;
}
inline void UnknownFieldSet::Swap(UnknownFieldSet* x) {
@@ -236,9 +257,10 @@
}
inline int UnknownFieldSet::field_count() const {
- return (fields_ == NULL) ? 0 : static_cast<int>(fields_->size());
+ return fields_ ? static_cast<int>(fields_->size()) : 0;
}
inline const UnknownField& UnknownFieldSet::field(int index) const {
+ GOOGLE_DCHECK(fields_ != NULL);
return (*fields_)[index];
}
inline UnknownField* UnknownFieldSet::mutable_field(int index) {
diff --git a/darwin-x86_64/protoc/include/google/protobuf/util/field_comparator.h b/darwin-x86_64/protoc/include/google/protobuf/util/field_comparator.h
new file mode 100644
index 0000000..1b4d65b
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/util/field_comparator.h
@@ -0,0 +1,259 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Author: ksroka@google.com (Krzysztof Sroka)
+
+#ifndef GOOGLE_PROTOBUF_UTIL_FIELD_COMPARATOR_H__
+#define GOOGLE_PROTOBUF_UTIL_FIELD_COMPARATOR_H__
+
+#include <map>
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+namespace google {
+namespace protobuf {
+
+class Message;
+class EnumValueDescriptor;
+class FieldDescriptor;
+
+namespace util {
+
+class FieldContext;
+
+// Base class specifying the interface for comparing protocol buffer fields.
+// Regular users should consider using or subclassing DefaultFieldComparator
+// rather than this interface.
+// Currently, this does not support comparing unknown fields.
+class LIBPROTOBUF_EXPORT FieldComparator {
+ public:
+ FieldComparator();
+ virtual ~FieldComparator();
+
+ enum ComparisonResult {
+ SAME, // Compared fields are equal. In case of comparing submessages,
+ // user should not recursively compare their contents.
+ DIFFERENT, // Compared fields are different. In case of comparing
+ // submessages, user should not recursively compare their
+ // contents.
+ RECURSE, // Compared submessages need to be compared recursively.
+ // FieldComparator does not specify the semantics of recursive
+ // comparison. This value should not be returned for simple
+ // values.
+ };
+
+ // Compares the values of a field in two protocol buffer messages.
+ // Returns SAME or DIFFERENT for simple values, and SAME, DIFFERENT or RECURSE
+ // for submessages. Returning RECURSE for fields not being submessages is
+ // illegal.
+ // In case the given FieldDescriptor points to a repeated field, the indices
+ // need to be valid. Otherwise they should be ignored.
+ //
+ // FieldContext contains information about the specific instances of the
+ // fields being compared, versus FieldDescriptor which only contains general
+ // type information about the fields.
+ virtual ComparisonResult Compare(
+ const google::protobuf::Message& message_1,
+ const google::protobuf::Message& message_2,
+ const google::protobuf::FieldDescriptor* field,
+ int index_1, int index_2,
+ const google::protobuf::util::FieldContext* field_context) = 0;
+
+ private:
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldComparator);
+};
+
+// Basic implementation of FieldComparator. Supports three modes of floating
+// point value comparison: exact, approximate using MathUtil::AlmostEqual
+// method, and arbitrarily precise using MathUtil::WithinFractionOrMargin.
+class LIBPROTOBUF_EXPORT DefaultFieldComparator : public FieldComparator {
+ public:
+ enum FloatComparison {
+ EXACT, // Floats and doubles are compared exactly.
+ APPROXIMATE, // Floats and doubles are compared using the
+ // MathUtil::AlmostEqual method or
+ // MathUtil::WithinFractionOrMargin method.
+ // TODO(ksroka): Introduce third value to differenciate uses of AlmostEqual
+ // and WithinFractionOrMargin.
+ };
+
+ // Creates new comparator with float comparison set to EXACT.
+ DefaultFieldComparator();
+
+ virtual ~DefaultFieldComparator();
+
+ virtual ComparisonResult Compare(
+ const google::protobuf::Message& message_1,
+ const google::protobuf::Message& message_2,
+ const google::protobuf::FieldDescriptor* field,
+ int index_1, int index_2,
+ const google::protobuf::util::FieldContext* field_context);
+
+ void set_float_comparison(FloatComparison float_comparison) {
+ float_comparison_ = float_comparison;
+ }
+
+ FloatComparison float_comparison() const {
+ return float_comparison_;
+ }
+
+ // Set whether the FieldComparator shall treat floats or doubles that are both
+ // NaN as equal (treat_nan_as_equal = true) or as different
+ // (treat_nan_as_equal = false). Default is treating NaNs always as different.
+ void set_treat_nan_as_equal(bool treat_nan_as_equal) {
+ treat_nan_as_equal_ = treat_nan_as_equal;
+ }
+
+ bool treat_nan_as_equal() const {
+ return treat_nan_as_equal_;
+ }
+
+ // Sets the fraction and margin for the float comparison of a given field.
+ // Uses MathUtil::WithinFractionOrMargin to compare the values.
+ //
+ // REQUIRES: field->cpp_type == FieldDescriptor::CPPTYPE_DOUBLE or
+ // field->cpp_type == FieldDescriptor::CPPTYPE_FLOAT
+ // REQUIRES: float_comparison_ == APPROXIMATE
+ void SetFractionAndMargin(const FieldDescriptor* field, double fraction,
+ double margin);
+
+ // Sets the fraction and margin for the float comparison of all float and
+ // double fields, unless a field has been given a specific setting via
+ // SetFractionAndMargin() above.
+ // Uses MathUtil::WithinFractionOrMargin to compare the values.
+ //
+ // REQUIRES: float_comparison_ == APPROXIMATE
+ void SetDefaultFractionAndMargin(double fraction, double margin);
+
+ private:
+ // Defines the tolerance for floating point comparison (fraction and margin).
+ struct Tolerance {
+ double fraction;
+ double margin;
+ Tolerance()
+ : fraction(0.0),
+ margin(0.0) {}
+ Tolerance(double f, double m)
+ : fraction(f),
+ margin(m) {}
+ };
+
+ // Defines the map to store the tolerances for floating point comparison.
+ typedef map<const FieldDescriptor*, Tolerance> ToleranceMap;
+
+ // The following methods get executed when CompareFields is called for the
+ // basic types (instead of submessages). They return true on success. One
+ // can use ResultFromBoolean() to convert that boolean to a ComparisonResult
+ // value.
+ bool CompareBool(const google::protobuf::FieldDescriptor& field,
+ bool value_1, bool value_2) {
+ return value_1 == value_2;
+ }
+
+ // Uses CompareDoubleOrFloat, a helper function used by both CompareDouble and
+ // CompareFloat.
+ bool CompareDouble(const google::protobuf::FieldDescriptor& field,
+ double value_1, double value_2);
+
+ bool CompareEnum(const google::protobuf::FieldDescriptor& field,
+ const EnumValueDescriptor* value_1,
+ const EnumValueDescriptor* value_2);
+
+ // Uses CompareDoubleOrFloat, a helper function used by both CompareDouble and
+ // CompareFloat.
+ bool CompareFloat(const google::protobuf::FieldDescriptor& field,
+ float value_1, float value_2);
+
+ bool CompareInt32(const google::protobuf::FieldDescriptor& field,
+ int32 value_1, int32 value_2) {
+ return value_1 == value_2;
+ }
+
+ bool CompareInt64(const google::protobuf::FieldDescriptor& field,
+ int64 value_1, int64 value_2) {
+ return value_1 == value_2;
+ }
+
+ bool CompareString(const google::protobuf::FieldDescriptor& field,
+ const string& value_1, const string& value_2) {
+ return value_1 == value_2;
+ }
+
+ bool CompareUInt32(const google::protobuf::FieldDescriptor& field,
+ uint32 value_1, uint32 value_2) {
+ return value_1 == value_2;
+ }
+
+ bool CompareUInt64(const google::protobuf::FieldDescriptor& field,
+ uint64 value_1, uint64 value_2) {
+ return value_1 == value_2;
+ }
+
+ // This function is used by CompareDouble and CompareFloat to avoid code
+ // duplication. There are no checks done against types of the values passed,
+ // but it's likely to fail if passed non-numeric arguments.
+ template<typename T>
+ bool CompareDoubleOrFloat(const google::protobuf::FieldDescriptor& field,
+ T value_1, T value_2);
+
+ // Returns FieldComparator::SAME if boolean_result is true and
+ // FieldComparator::DIFFERENT otherwise.
+ ComparisonResult ResultFromBoolean(bool boolean_result) const;
+
+ FloatComparison float_comparison_;
+
+ // If true, floats and doubles that are both NaN are considered to be
+ // equal. Otherwise, two floats or doubles that are NaN are considered to be
+ // different.
+ bool treat_nan_as_equal_;
+
+ // True iff default_tolerance_ has been explicitly set.
+ //
+ // If false, then the default tolerance for flaots and doubles is that which
+ // is used by MathUtil::AlmostEquals().
+ bool has_default_tolerance_;
+
+ // Default float/double tolerance. Only meaningful if
+ // has_default_tolerance_ == true.
+ Tolerance default_tolerance_;
+
+ // Field-specific float/double tolerances, which override any default for
+ // those particular fields.
+ ToleranceMap map_tolerance_;
+
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DefaultFieldComparator);
+};
+
+} // namespace util
+} // namespace protobuf
+
+} // namespace google
+#endif // GOOGLE_PROTOBUF_UTIL_FIELD_COMPARATOR_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/util/field_mask_util.h b/darwin-x86_64/protoc/include/google/protobuf/util/field_mask_util.h
new file mode 100644
index 0000000..644161b
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/util/field_mask_util.h
@@ -0,0 +1,183 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_UTIL_FIELD_MASK_UTIL_H__
+#define GOOGLE_PROTOBUF_UTIL_FIELD_MASK_UTIL_H__
+
+#include <string>
+
+#include <google/protobuf/descriptor.h>
+#include <google/protobuf/field_mask.pb.h>
+#include <google/protobuf/stubs/stringpiece.h>
+
+namespace google {
+namespace protobuf {
+namespace util {
+
+class LIBPROTOBUF_EXPORT FieldMaskUtil {
+ typedef google::protobuf::FieldMask FieldMask;
+
+ public:
+ // Converts FieldMask to/from string, formatted by separating each path
+ // with a comma (e.g., "foo_bar,baz.quz").
+ static string ToString(const FieldMask& mask);
+ static void FromString(StringPiece str, FieldMask* out);
+
+ // Converts FieldMask to/from string, formatted according to proto3 JSON
+ // spec for FieldMask (e.g., "fooBar,baz.quz"). If the field name is not
+ // style conforming (i.e., not snake_case when converted to string, or not
+ // camelCase when converted from string), the conversion will fail.
+ static bool ToJsonString(const FieldMask& mask, string* out);
+ static bool FromJsonString(StringPiece str, FieldMask* out);
+
+ // Checks whether the given path is valid for type T.
+ template <typename T>
+ static bool IsValidPath(StringPiece path) {
+ return InternalIsValidPath(T::descriptor(), path);
+ }
+
+ // Checks whether the given FieldMask is valid for type T.
+ template <typename T>
+ static bool IsValidFieldMask(const FieldMask& mask) {
+ for (int i = 0; i < mask.paths_size(); ++i) {
+ if (!InternalIsValidPath(T::descriptor(), mask.paths(i))) return false;
+ }
+ return true;
+ }
+
+ // Adds a path to FieldMask after checking whether the given path is valid.
+ // This method check-fails if the path is not a valid path for type T.
+ template <typename T>
+ static void AddPathToFieldMask(StringPiece path, FieldMask* mask) {
+ GOOGLE_CHECK(IsValidPath<T>(path));
+ mask->add_paths(path);
+ }
+
+ // Creates a FieldMask with all fields of type T. This FieldMask only
+ // contains fields of T but not any sub-message fields.
+ template <typename T>
+ static void GetFieldMaskForAllFields(FieldMask* out) {
+ InternalGetFieldMaskForAllFields(T::descriptor(), out);
+ }
+
+ // Converts a FieldMask to the canonical form. It will:
+ // 1. Remove paths that are covered by another path. For example,
+ // "foo.bar" is covered by "foo" and will be removed if "foo"
+ // is also in the FieldMask.
+ // 2. Sort all paths in alphabetical order.
+ static void ToCanonicalForm(const FieldMask& mask, FieldMask* out);
+
+ // Creates an union of two FieldMasks.
+ static void Union(const FieldMask& mask1, const FieldMask& mask2,
+ FieldMask* out);
+
+ // Creates an intersection of two FieldMasks.
+ static void Intersect(const FieldMask& mask1, const FieldMask& mask2,
+ FieldMask* out);
+
+ // Returns true if path is covered by the given FieldMask. Note that path
+ // "foo.bar" covers all paths like "foo.bar.baz", "foo.bar.quz.x", etc.
+ static bool IsPathInFieldMask(StringPiece path, const FieldMask& mask);
+
+ class MergeOptions;
+ // Merges fields specified in a FieldMask into another message.
+ static void MergeMessageTo(const Message& source, const FieldMask& mask,
+ const MergeOptions& options, Message* destination);
+
+ private:
+ friend class SnakeCaseCamelCaseTest;
+ // Converts a field name from snake_case to camelCase:
+ // 1. Every character after "_" will be converted to uppercase.
+ // 2. All "_"s are removed.
+ // The conversion will fail if:
+ // 1. The field name contains uppercase letters.
+ // 2. Any character after a "_" is not a lowercase letter.
+ // If the conversion succeeds, it's guaranteed that the resulted
+ // camelCase name will yield the original snake_case name when
+ // converted using CamelCaseToSnakeCase().
+ //
+ // Note that the input can contain characters not allowed in C identifiers.
+ // For example, "foo_bar,baz_quz" will be converted to "fooBar,bazQuz"
+ // successfully.
+ static bool SnakeCaseToCamelCase(StringPiece input, string* output);
+ // Converts a field name from camelCase to snake_case:
+ // 1. Every uppercase letter is converted to lowercase with a additional
+ // preceding "-".
+ // The conversion will fail if:
+ // 1. The field name contains "_"s.
+ // If the conversion succeeds, it's guaranteed that the resulted
+ // snake_case name will yield the original camelCase name when
+ // converted using SnakeCaseToCamelCase().
+ //
+ // Note that the input can contain characters not allowed in C identifiers.
+ // For example, "fooBar,bazQuz" will be converted to "foo_bar,baz_quz"
+ // successfully.
+ static bool CamelCaseToSnakeCase(StringPiece input, string* output);
+
+ static bool InternalIsValidPath(const Descriptor* descriptor,
+ StringPiece path);
+
+ static void InternalGetFieldMaskForAllFields(const Descriptor* descriptor,
+ FieldMask* out);
+};
+
+class LIBPROTOBUF_EXPORT FieldMaskUtil::MergeOptions {
+ public:
+ MergeOptions()
+ : replace_message_fields_(false), replace_repeated_fields_(false) {}
+ // When merging message fields, the default behavior is to merge the
+ // content of two message fields together. If you instead want to use
+ // the field from the source message to replace the corresponding field
+ // in the destination message, set this flag to true. When this flag is set,
+ // specified submessage fields that are missing in source will be cleared in
+ // destination.
+ void set_replace_message_fields(bool value) {
+ replace_message_fields_ = value;
+ }
+ bool replace_message_fields() const { return replace_message_fields_; }
+ // The default merging behavior will append entries from the source
+ // repeated field to the destination repeated field. If you only want
+ // to keep the entries from the source repeated field, set this flag
+ // to true.
+ void set_replace_repeated_fields(bool value) {
+ replace_repeated_fields_ = value;
+ }
+ bool replace_repeated_fields() const { return replace_repeated_fields_; }
+
+ private:
+ bool replace_message_fields_;
+ bool replace_repeated_fields_;
+};
+
+} // namespace util
+} // namespace protobuf
+
+} // namespace google
+#endif // GOOGLE_PROTOBUF_UTIL_FIELD_MASK_UTIL_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/util/json_util.h b/darwin-x86_64/protoc/include/google/protobuf/util/json_util.h
new file mode 100644
index 0000000..1718bfb
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/util/json_util.h
@@ -0,0 +1,136 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Utility functions to convert between protobuf binary format and proto3 JSON
+// format.
+#ifndef GOOGLE_PROTOBUF_UTIL_JSON_UTIL_H__
+#define GOOGLE_PROTOBUF_UTIL_JSON_UTIL_H__
+
+#include <google/protobuf/util/type_resolver.h>
+#include <google/protobuf/stubs/bytestream.h>
+
+namespace google {
+namespace protobuf {
+namespace io {
+class ZeroCopyInputStream;
+class ZeroCopyOutputStream;
+} // namespace io
+namespace util {
+
+struct JsonOptions {
+ // Whether to add spaces, line breaks and indentation to make the JSON output
+ // easy to read.
+ bool add_whitespace;
+ // Whether to always print primitive fields. By default primitive fields with
+ // default values will be omitted in JSON joutput. For example, an int32 field
+ // set to 0 will be omitted. Set this flag to true will override the default
+ // behavior and print primitive fields regardless of their values.
+ bool always_print_primitive_fields;
+
+ JsonOptions() : add_whitespace(false),
+ always_print_primitive_fields(false) {
+ }
+};
+
+// Converts protobuf binary data to JSON.
+// The conversion will fail if:
+// 1. TypeResolver fails to resolve a type.
+// 2. input is not valid protobuf wire format, or conflicts with the type
+// information returned by TypeResolver.
+// Note that unknown fields will be discarded silently.
+util::Status BinaryToJsonStream(
+ TypeResolver* resolver,
+ const string& type_url,
+ io::ZeroCopyInputStream* binary_input,
+ io::ZeroCopyOutputStream* json_output,
+ const JsonOptions& options);
+
+inline util::Status BinaryToJsonStream(
+ TypeResolver* resolver, const string& type_url,
+ io::ZeroCopyInputStream* binary_input,
+ io::ZeroCopyOutputStream* json_output) {
+ return BinaryToJsonStream(resolver, type_url, binary_input, json_output,
+ JsonOptions());
+}
+
+LIBPROTOBUF_EXPORT util::Status BinaryToJsonString(
+ TypeResolver* resolver,
+ const string& type_url,
+ const string& binary_input,
+ string* json_output,
+ const JsonOptions& options);
+
+inline util::Status BinaryToJsonString(TypeResolver* resolver,
+ const string& type_url,
+ const string& binary_input,
+ string* json_output) {
+ return BinaryToJsonString(resolver, type_url, binary_input, json_output,
+ JsonOptions());
+}
+
+// Converts JSON data to protobuf binary format.
+// The conversion will fail if:
+// 1. TypeResolver fails to resolve a type.
+// 2. input is not valid JSON format, or conflicts with the type
+// information returned by TypeResolver.
+// 3. input has unknown fields.
+util::Status JsonToBinaryStream(
+ TypeResolver* resolver,
+ const string& type_url,
+ io::ZeroCopyInputStream* json_input,
+ io::ZeroCopyOutputStream* binary_output);
+
+LIBPROTOBUF_EXPORT util::Status JsonToBinaryString(
+ TypeResolver* resolver,
+ const string& type_url,
+ const string& json_input,
+ string* binary_output);
+
+namespace internal {
+// Internal helper class. Put in the header so we can write unit-tests for it.
+class LIBPROTOBUF_EXPORT ZeroCopyStreamByteSink : public strings::ByteSink {
+ public:
+ explicit ZeroCopyStreamByteSink(io::ZeroCopyOutputStream* stream)
+ : stream_(stream) {}
+
+ virtual void Append(const char* bytes, size_t len);
+
+ private:
+ io::ZeroCopyOutputStream* stream_;
+
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ZeroCopyStreamByteSink);
+};
+} // namespace internal
+
+} // namespace util
+} // namespace protobuf
+
+} // namespace google
+#endif // GOOGLE_PROTOBUF_UTIL_JSON_UTIL_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/util/message_differencer.h b/darwin-x86_64/protoc/include/google/protobuf/util/message_differencer.h
new file mode 100644
index 0000000..3ea74e6
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/util/message_differencer.h
@@ -0,0 +1,843 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Author: jschorr@google.com (Joseph Schorr)
+// Based on original Protocol Buffers design by
+// Sanjay Ghemawat, Jeff Dean, and others.
+//
+// This file defines static methods and classes for comparing Protocol
+// Messages.
+//
+// Aug. 2008: Added Unknown Fields Comparison for messages.
+// Aug. 2009: Added different options to compare repeated fields.
+// Apr. 2010: Moved field comparison to FieldComparator.
+
+#ifndef GOOGLE_PROTOBUF_UTIL_MESSAGE_DIFFERENCER_H__
+#define GOOGLE_PROTOBUF_UTIL_MESSAGE_DIFFERENCER_H__
+
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
+#include <google/protobuf/descriptor.h> // FieldDescriptor
+#include <google/protobuf/message.h> // Message
+#include <google/protobuf/unknown_field_set.h>
+#include <google/protobuf/util/field_comparator.h>
+
+namespace google {
+namespace protobuf {
+
+class DynamicMessageFactory;
+class FieldDescriptor;
+
+namespace io {
+class ZeroCopyOutputStream;
+class Printer;
+}
+
+namespace util {
+
+class FieldContext; // declared below MessageDifferencer
+
+// A basic differencer that can be used to determine
+// the differences between two specified Protocol Messages. If any differences
+// are found, the Compare method will return false, and any differencer reporter
+// specified via ReportDifferencesTo will have its reporting methods called (see
+// below for implementation of the report). Based off of the original
+// ProtocolDifferencer implementation in //net/proto/protocol-differencer.h
+// (Thanks Todd!).
+//
+// MessageDifferencer REQUIRES that compared messages be the same type, defined
+// as messages that share the same descriptor. If not, the behavior of this
+// class is undefined.
+//
+// People disagree on what MessageDifferencer should do when asked to compare
+// messages with different descriptors. Some people think it should always
+// return false. Others expect it to try to look for similar fields and
+// compare them anyway -- especially if the descriptors happen to be identical.
+// If we chose either of these behaviors, some set of people would find it
+// surprising, and could end up writing code expecting the other behavior
+// without realizing their error. Therefore, we forbid that usage.
+//
+// This class is implemented based on the proto2 reflection. The performance
+// should be good enough for normal usages. However, for places where the
+// performance is extremely sensitive, there are several alternatives:
+// - Comparing serialized string
+// Downside: false negatives (there are messages that are the same but their
+// serialized strings are different).
+// - Equals code generator by compiler plugin (net/proto2/contrib/equals_plugin)
+// Downside: more generated code; maintenance overhead for the additional rule
+// (must be in sync with the original proto_library).
+//
+// Note on handling of google.protobuf.Any: MessageDifferencer automatically
+// unpacks Any::value into a Message and compares its individual fields.
+// Messages encoded in a repeated Any cannot be compared using TreatAsMap.
+//
+//
+// Note on thread-safety: MessageDifferencer is *not* thread-safe. You need to
+// guard it with a lock to use the same MessageDifferencer instance from
+// multiple threads. Note that it's fine to call static comparison methods
+// (like MessageDifferencer::Equals) concurrently.
+class LIBPROTOBUF_EXPORT MessageDifferencer {
+ public:
+ // Determines whether the supplied messages are equal. Equality is defined as
+ // all fields within the two messages being set to the same value. Primitive
+ // fields and strings are compared by value while embedded messages/groups
+ // are compared as if via a recursive call. Use IgnoreField() and Compare()
+ // if some fields should be ignored in the comparison.
+ //
+ // This method REQUIRES that the two messages have the same
+ // Descriptor (message1.GetDescriptor() == message2.GetDescriptor()).
+ static bool Equals(const Message& message1, const Message& message2);
+
+ // Determines whether the supplied messages are equivalent. Equivalency is
+ // defined as all fields within the two messages having the same value. This
+ // differs from the Equals method above in that fields with default values
+ // are considered set to said value automatically. For details on how default
+ // values are defined for each field type, see http://shortn/_x2Gv6XFrWt.
+ // Also, Equivalent() ignores unknown fields. Use IgnoreField() and Compare()
+ // if some fields should be ignored in the comparison.
+ //
+ // This method REQUIRES that the two messages have the same
+ // Descriptor (message1.GetDescriptor() == message2.GetDescriptor()).
+ static bool Equivalent(const Message& message1, const Message& message2);
+
+ // Determines whether the supplied messages are approximately equal.
+ // Approximate equality is defined as all fields within the two messages
+ // being approximately equal. Primitive (non-float) fields and strings are
+ // compared by value, floats are compared using MathUtil::AlmostEquals() and
+ // embedded messages/groups are compared as if via a recursive call. Use
+ // IgnoreField() and Compare() if some fields should be ignored in the
+ // comparison.
+ //
+ // This method REQUIRES that the two messages have the same
+ // Descriptor (message1.GetDescriptor() == message2.GetDescriptor()).
+ static bool ApproximatelyEquals(const Message& message1,
+ const Message& message2);
+
+ // Determines whether the supplied messages are approximately equivalent.
+ // Approximate equivalency is defined as all fields within the two messages
+ // being approximately equivalent. As in
+ // MessageDifferencer::ApproximatelyEquals, primitive (non-float) fields and
+ // strings are compared by value, floats are compared using
+ // MathUtil::AlmostEquals() and embedded messages/groups are compared as if
+ // via a recursive call. However, fields with default values are considered
+ // set to said value, as per MessageDiffencer::Equivalent. Use IgnoreField()
+ // and Compare() if some fields should be ignored in the comparison.
+ //
+ // This method REQUIRES that the two messages have the same
+ // Descriptor (message1.GetDescriptor() == message2.GetDescriptor()).
+ static bool ApproximatelyEquivalent(const Message& message1,
+ const Message& message2);
+
+ // Identifies an individual field in a message instance. Used for field_path,
+ // below.
+ struct SpecificField {
+ // For known fields, "field" is filled in and "unknown_field_number" is -1.
+ // For unknown fields, "field" is NULL, "unknown_field_number" is the field
+ // number, and "unknown_field_type" is its type.
+ const FieldDescriptor* field;
+ int unknown_field_number;
+ UnknownField::Type unknown_field_type;
+
+ // If this a repeated field, "index" is the index within it. For unknown
+ // fields, this is the index of the field among all unknown fields of the
+ // same field number and type.
+ int index;
+
+ // If "field" is a repeated field which is being treated as a map or
+ // a set (see TreatAsMap() and TreatAsSet(), below), new_index indicates
+ // the index the position to which the element has moved. This only
+ // applies to ReportMoved() and (in the case of TreatAsMap())
+ // ReportModified(). In all other cases, "new_index" will have the same
+ // value as "index".
+ int new_index;
+
+ // For unknown fields, these are the pointers to the UnknownFieldSet
+ // containing the unknown fields. In certain cases (e.g. proto1's
+ // MessageSet, or nested groups of unknown fields), these may differ from
+ // the messages' internal UnknownFieldSets.
+ const UnknownFieldSet* unknown_field_set1;
+ const UnknownFieldSet* unknown_field_set2;
+
+ // For unknown fields, these are the index of the field within the
+ // UnknownFieldSets. One or the other will be -1 when
+ // reporting an addition or deletion.
+ int unknown_field_index1;
+ int unknown_field_index2;
+
+ SpecificField()
+ : field(NULL),
+ unknown_field_number(-1),
+ index(-1),
+ new_index(-1),
+ unknown_field_set1(NULL),
+ unknown_field_set2(NULL),
+ unknown_field_index1(-1),
+ unknown_field_index2(-1) {}
+ };
+
+ // Abstract base class from which all MessageDifferencer
+ // reporters derive. The five Report* methods below will be called when
+ // a field has been added, deleted, modified, moved, or matched. The third
+ // argument is a vector of FieldDescriptor pointers which describes the chain
+ // of fields that was taken to find the current field. For example, for a
+ // field found in an embedded message, the vector will contain two
+ // FieldDescriptors. The first will be the field of the embedded message
+ // itself and the second will be the actual field in the embedded message
+ // that was added/deleted/modified.
+ class LIBPROTOBUF_EXPORT Reporter {
+ public:
+ Reporter();
+ virtual ~Reporter();
+
+ // Reports that a field has been added into Message2.
+ virtual void ReportAdded(
+ const Message& message1, const Message& message2,
+ const vector<SpecificField>& field_path) = 0;
+
+ // Reports that a field has been deleted from Message1.
+ virtual void ReportDeleted(
+ const Message& message1,
+ const Message& message2,
+ const vector<SpecificField>& field_path) = 0;
+
+ // Reports that the value of a field has been modified.
+ virtual void ReportModified(
+ const Message& message1,
+ const Message& message2,
+ const vector<SpecificField>& field_path) = 0;
+
+ // Reports that a repeated field has been moved to another location. This
+ // only applies when using TreatAsSet or TreatAsMap() -- see below. Also
+ // note that for any given field, ReportModified and ReportMoved are
+ // mutually exclusive. If a field has been both moved and modified, then
+ // only ReportModified will be called.
+ virtual void ReportMoved(
+ const Message& message1,
+ const Message& message2,
+ const vector<SpecificField>& field_path) { }
+
+ // Reports that two fields match. Useful for doing side-by-side diffs.
+ // This function is mutually exclusive with ReportModified and ReportMoved.
+ // Note that you must call set_report_matches(true) before calling Compare
+ // to make use of this function.
+ virtual void ReportMatched(
+ const Message& message1,
+ const Message& message2,
+ const vector<SpecificField>& field_path) { }
+
+ // Reports that two fields would have been compared, but the
+ // comparison has been skipped because the field was marked as
+ // 'ignored' using IgnoreField(). This function is mutually
+ // exclusive with all the other Report() functions.
+ //
+ // The contract of ReportIgnored is slightly different than the
+ // other Report() functions, in that |field_path.back().index| is
+ // always equal to -1, even if the last field is repeated. This is
+ // because while the other Report() functions indicate where in a
+ // repeated field the action (Addition, Deletion, etc...)
+ // happened, when a repeated field is 'ignored', the differencer
+ // simply calls ReportIgnored on the repeated field as a whole and
+ // moves on without looking at its individual elements.
+ //
+ // Furthermore, ReportIgnored() does not indicate whether the
+ // fields were in fact equal or not, as Compare() does not inspect
+ // these fields at all. It is up to the Reporter to decide whether
+ // the fields are equal or not (perhaps with a second call to
+ // Compare()), if it cares.
+ virtual void ReportIgnored(
+ const Message& message1,
+ const Message& message2,
+ const vector<SpecificField>& field_path) { }
+
+ // Report that an unkown field is ignored. (see comment above).
+ // Note this is a different function since the last SpecificField in field
+ // path has a null field. This could break existing Reporter.
+ virtual void ReportUnknownFieldIgnored(
+ const Message& message1, const Message& message2,
+ const vector<SpecificField>& field_path) {}
+
+ private:
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Reporter);
+ };
+
+ // MapKeyComparator is used to determine if two elements have the same key
+ // when comparing elements of a repeated field as a map.
+ class LIBPROTOBUF_EXPORT MapKeyComparator {
+ public:
+ MapKeyComparator();
+ virtual ~MapKeyComparator();
+
+ virtual bool IsMatch(const Message& message1,
+ const Message& message2,
+ const vector<SpecificField>& parent_fields) const {
+ GOOGLE_CHECK(false) << "IsMatch() is not implemented.";
+ return false;
+ }
+
+ private:
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapKeyComparator);
+ };
+
+ // Abstract base class from which all IgnoreCriteria derive.
+ // By adding IgnoreCriteria more complex ignore logic can be implemented.
+ // IgnoreCriteria are registed with AddIgnoreCriteria. For each compared
+ // field IsIgnored is called on each added IgnoreCriteria until one returns
+ // true or all return false.
+ // IsIgnored is called for fields where at least one side has a value.
+ class LIBPROTOBUF_EXPORT IgnoreCriteria {
+ public:
+ IgnoreCriteria();
+ virtual ~IgnoreCriteria();
+
+ // Returns true if the field should be ignored.
+ virtual bool IsIgnored(
+ const Message& message1,
+ const Message& message2,
+ const FieldDescriptor* field,
+ const vector<SpecificField>& parent_fields) = 0;
+
+ // Returns true if the unknown field should be ignored.
+ // Note: This will be called for unknown fields as well in which case
+ // field.field will be null.
+ virtual bool IsUnknownFieldIgnored(
+ const Message& message1, const Message& message2,
+ const SpecificField& field,
+ const vector<SpecificField>& parent_fields) {
+ return false;
+ }
+ };
+
+ // To add a Reporter, construct default here, then use ReportDifferencesTo or
+ // ReportDifferencesToString.
+ explicit MessageDifferencer();
+
+ ~MessageDifferencer();
+
+ enum MessageFieldComparison {
+ EQUAL, // Fields must be present in both messages
+ // for the messages to be considered the same.
+ EQUIVALENT, // Fields with default values are considered set
+ // for comparison purposes even if not explicitly
+ // set in the messages themselves. Unknown fields
+ // are ignored.
+ };
+
+ enum Scope {
+ FULL, // All fields of both messages are considered in the comparison.
+ PARTIAL // Only fields present in the first message are considered; fields
+ // set only in the second message will be skipped during
+ // comparison.
+ };
+
+ // DEPRECATED. Use FieldComparator::FloatComparison instead.
+ enum FloatComparison {
+ EXACT, // Floats and doubles are compared exactly.
+ APPROXIMATE // Floats and doubles are compared using the
+ // MathUtil::AlmostEquals method.
+ };
+
+ enum RepeatedFieldComparison {
+ AS_LIST, // Repeated fields are compared in order. Differing values at
+ // the same index are reported using ReportModified(). If the
+ // repeated fields have different numbers of elements, the
+ // unpaired elements are reported using ReportAdded() or
+ // ReportDeleted().
+ AS_SET, // Treat all the repeated fields as sets by default.
+ // See TreatAsSet(), as below.
+ };
+
+ // The elements of the given repeated field will be treated as a set for
+ // diffing purposes, so different orderings of the same elements will be
+ // considered equal. Elements which are present on both sides of the
+ // comparison but which have changed position will be reported with
+ // ReportMoved(). Elements which only exist on one side or the other are
+ // reported with ReportAdded() and ReportDeleted() regardless of their
+ // positions. ReportModified() is never used for this repeated field. If
+ // the only differences between the compared messages is that some fields
+ // have been moved, then the comparison returns true.
+ //
+ // If the scope of comparison is set to PARTIAL, then in addition to what's
+ // above, extra values added to repeated fields of the second message will
+ // not cause the comparison to fail.
+ //
+ // Note that set comparison is currently O(k * n^2) (where n is the total
+ // number of elements, and k is the average size of each element). In theory
+ // it could be made O(n * k) with a more complex hashing implementation. Feel
+ // free to contribute one if the current implementation is too slow for you.
+ // If partial matching is also enabled, the time complexity will be O(k * n^2
+ // + n^3) in which n^3 is the time complexity of the maximum matching
+ // algorithm.
+ //
+ // REQUIRES: field->is_repeated() and field not registered with TreatAsList
+ void TreatAsSet(const FieldDescriptor* field);
+
+ // The elements of the given repeated field will be treated as a list for
+ // diffing purposes, so different orderings of the same elements will NOT be
+ // considered equal.
+ //
+ // REQUIRED: field->is_repeated() and field not registered with TreatAsSet
+ void TreatAsList(const FieldDescriptor* field);
+
+ // The elements of the given repeated field will be treated as a map for
+ // diffing purposes, with |key| being the map key. Thus, elements with the
+ // same key will be compared even if they do not appear at the same index.
+ // Differences are reported similarly to TreatAsSet(), except that
+ // ReportModified() is used to report elements with the same key but
+ // different values. Note that if an element is both moved and modified,
+ // only ReportModified() will be called. As with TreatAsSet, if the only
+ // differences between the compared messages is that some fields have been
+ // moved, then the comparison returns true. See TreatAsSet for notes on
+ // performance.
+ //
+ // REQUIRES: field->is_repeated()
+ // REQUIRES: field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE
+ // REQUIRES: key->containing_type() == field->message_type()
+ void TreatAsMap(const FieldDescriptor* field, const FieldDescriptor* key);
+ // Same as TreatAsMap except that this method will use multiple fields as
+ // the key in comparison. All specified fields in 'key_fields' should be
+ // present in the compared elements. Two elements will be treated as having
+ // the same key iff they have the same value for every specified field. There
+ // are two steps in the comparison process. The first one is key matching.
+ // Every element from one message will be compared to every element from
+ // the other message. Only fields in 'key_fields' are compared in this step
+ // to decide if two elements have the same key. The second step is value
+ // comparison. Those pairs of elements with the same key (with equal value
+ // for every field in 'key_fields') will be compared in this step.
+ // Time complexity of the first step is O(s * m * n ^ 2) where s is the
+ // average size of the fields specified in 'key_fields', m is the number of
+ // fields in 'key_fields' and n is the number of elements. If partial
+ // matching is enabled, an extra O(n^3) will be incured by the maximum
+ // matching algorithm. The second step is O(k * n) where k is the average
+ // size of each element.
+ void TreatAsMapWithMultipleFieldsAsKey(
+ const FieldDescriptor* field,
+ const vector<const FieldDescriptor*>& key_fields);
+ // Same as TreatAsMapWithMultipleFieldsAsKey, except that each of the field
+ // do not necessarily need to be a direct subfield. Each element in
+ // key_field_paths indicate a path from the message being compared, listing
+ // successive subfield to reach the key field.
+ //
+ // REQUIRES:
+ // for key_field_path in key_field_paths:
+ // key_field_path[0]->containing_type() == field->message_type()
+ // for i in [0, key_field_path.size() - 1):
+ // key_field_path[i+1]->containing_type() ==
+ // key_field_path[i]->message_type()
+ // key_field_path[i]->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE
+ // !key_field_path[i]->is_repeated()
+ void TreatAsMapWithMultipleFieldPathsAsKey(
+ const FieldDescriptor* field,
+ const vector<vector<const FieldDescriptor*> >& key_field_paths);
+
+ // Uses a custom MapKeyComparator to determine if two elements have the same
+ // key when comparing a repeated field as a map.
+ // The caller is responsible to delete the key_comparator.
+ // This method varies from TreatAsMapWithMultipleFieldsAsKey only in the
+ // first key matching step. Rather than comparing some specified fields, it
+ // will invoke the IsMatch method of the given 'key_comparator' to decide if
+ // two elements have the same key.
+ void TreatAsMapUsingKeyComparator(
+ const FieldDescriptor* field,
+ const MapKeyComparator* key_comparator);
+
+ // Add a custom ignore criteria that is evaluated in addition to the
+ // ignored fields added with IgnoreField.
+ // Takes ownership of ignore_criteria.
+ void AddIgnoreCriteria(IgnoreCriteria* ignore_criteria);
+
+ // Indicates that any field with the given descriptor should be
+ // ignored for the purposes of comparing two messages. This applies
+ // to fields nested in the message structure as well as top level
+ // ones. When the MessageDifferencer encounters an ignored field,
+ // ReportIgnored is called on the reporter, if one is specified.
+ //
+ // The only place where the field's 'ignored' status is not applied is when
+ // it is being used as a key in a field passed to TreatAsMap or is one of
+ // the fields passed to TreatAsMapWithMultipleFieldsAsKey.
+ // In this case it is compared in key matching but after that it's ignored
+ // in value comparison.
+ void IgnoreField(const FieldDescriptor* field);
+
+ // Sets the field comparator used to determine differences between protocol
+ // buffer fields. By default it's set to a DefaultFieldComparator instance.
+ // MessageDifferencer doesn't take ownership over the passed object.
+ // Note that this method must be called before Compare for the comparator to
+ // be used.
+ void set_field_comparator(FieldComparator* comparator);
+
+ // DEPRECATED. Pass a DefaultFieldComparator instance instead.
+ // Sets the fraction and margin for the float comparison of a given field.
+ // Uses MathUtil::WithinFractionOrMargin to compare the values.
+ // NOTE: this method does nothing if differencer's field comparator has been
+ // set to a custom object.
+ //
+ // REQUIRES: field->cpp_type == FieldDescriptor::CPPTYPE_DOUBLE or
+ // field->cpp_type == FieldDescriptor::CPPTYPE_FLOAT
+ // REQUIRES: float_comparison_ == APPROXIMATE
+ void SetFractionAndMargin(const FieldDescriptor* field, double fraction,
+ double margin);
+
+ // Sets the type of comparison (as defined in the MessageFieldComparison
+ // enumeration above) that is used by this differencer when determining how
+ // to compare fields in messages.
+ void set_message_field_comparison(MessageFieldComparison comparison);
+
+ // Tells the differencer whether or not to report matches. This method must
+ // be called before Compare. The default for a new differencer is false.
+ void set_report_matches(bool report_matches) {
+ report_matches_ = report_matches;
+ }
+
+ // Sets the scope of the comparison (as defined in the Scope enumeration
+ // above) that is used by this differencer when determining which fields to
+ // compare between the messages.
+ void set_scope(Scope scope);
+
+ // Returns the current scope used by this differencer.
+ Scope scope();
+
+ // DEPRECATED. Pass a DefaultFieldComparator instance instead.
+ // Sets the type of comparison (as defined in the FloatComparison enumeration
+ // above) that is used by this differencer when comparing float (and double)
+ // fields in messages.
+ // NOTE: this method does nothing if differencer's field comparator has been
+ // set to a custom object.
+ void set_float_comparison(FloatComparison comparison);
+
+ // Sets the type of comparison for repeated field (as defined in the
+ // RepeatedFieldComparison enumeration above) that is used by this
+ // differencer when compare repeated fields in messages.
+ void set_repeated_field_comparison(RepeatedFieldComparison comparison);
+
+ // Compares the two specified messages, returning true if they are the same,
+ // false otherwise. If this method returns false, any changes between the
+ // two messages will be reported if a Reporter was specified via
+ // ReportDifferencesTo (see also ReportDifferencesToString).
+ //
+ // This method REQUIRES that the two messages have the same
+ // Descriptor (message1.GetDescriptor() == message2.GetDescriptor()).
+ bool Compare(const Message& message1, const Message& message2);
+
+ // Same as above, except comparing only the list of fields specified by the
+ // two vectors of FieldDescriptors.
+ bool CompareWithFields(const Message& message1, const Message& message2,
+ const vector<const FieldDescriptor*>& message1_fields,
+ const vector<const FieldDescriptor*>& message2_fields);
+
+ // Automatically creates a reporter that will output the differences
+ // found (if any) to the specified output string pointer. Note that this
+ // method must be called before Compare.
+ void ReportDifferencesToString(string* output);
+
+ // Tells the MessageDifferencer to report differences via the specified
+ // reporter. Note that this method must be called before Compare for
+ // the reporter to be used. It is the responsibility of the caller to delete
+ // this object.
+ // If the provided pointer equals NULL, the MessageDifferencer stops reporting
+ // differences to any previously set reporters or output strings.
+ void ReportDifferencesTo(Reporter* reporter);
+
+ // An implementation of the MessageDifferencer Reporter that outputs
+ // any differences found in human-readable form to the supplied
+ // ZeroCopyOutputStream or Printer. If a printer is used, the delimiter
+ // *must* be '$'.
+ class LIBPROTOBUF_EXPORT StreamReporter : public Reporter {
+ public:
+ explicit StreamReporter(io::ZeroCopyOutputStream* output);
+ explicit StreamReporter(io::Printer* printer); // delimiter '$'
+ virtual ~StreamReporter();
+
+ // When set to true, the stream reporter will also output aggregates nodes
+ // (i.e. messages and groups) whose subfields have been modified. When
+ // false, will only report the individual subfields. Defaults to false.
+ void set_report_modified_aggregates(bool report) {
+ report_modified_aggregates_ = report;
+ }
+
+ // The following are implementations of the methods described above.
+ virtual void ReportAdded(const Message& message1, const Message& message2,
+ const vector<SpecificField>& field_path);
+
+ virtual void ReportDeleted(const Message& message1,
+ const Message& message2,
+ const vector<SpecificField>& field_path);
+
+ virtual void ReportModified(const Message& message1,
+ const Message& message2,
+ const vector<SpecificField>& field_path);
+
+ virtual void ReportMoved(const Message& message1,
+ const Message& message2,
+ const vector<SpecificField>& field_path);
+
+ virtual void ReportMatched(const Message& message1,
+ const Message& message2,
+ const vector<SpecificField>& field_path);
+
+ virtual void ReportIgnored(const Message& message1,
+ const Message& message2,
+ const vector<SpecificField>& field_path);
+
+ virtual void ReportUnknownFieldIgnored(
+ const Message& message1, const Message& message2,
+ const vector<SpecificField>& field_path);
+
+ protected:
+ // Prints the specified path of fields to the buffer.
+ virtual void PrintPath(const vector<SpecificField>& field_path,
+ bool left_side);
+
+ // Prints the value of fields to the buffer. left_side is true if the
+ // given message is from the left side of the comparison, false if it
+ // was the right. This is relevant only to decide whether to follow
+ // unknown_field_index1 or unknown_field_index2 when an unknown field
+ // is encountered in field_path.
+ virtual void PrintValue(const Message& message,
+ const vector<SpecificField>& field_path,
+ bool left_side);
+
+ // Prints the specified path of unknown fields to the buffer.
+ virtual void PrintUnknownFieldValue(const UnknownField* unknown_field);
+
+ // Just print a string
+ void Print(const string& str);
+
+ private:
+ io::Printer* printer_;
+ bool delete_printer_;
+ bool report_modified_aggregates_;
+
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(StreamReporter);
+ };
+
+ private:
+ // A MapKeyComparator to be used in TreatAsMapUsingKeyComparator.
+ // Implementation of this class needs to do field value comparison which
+ // relies on some private methods of MessageDifferencer. That's why this
+ // class is declared as a nested class of MessageDifferencer.
+ class MultipleFieldsMapKeyComparator;
+ // Returns true if field1's number() is less than field2's.
+ static bool FieldBefore(const FieldDescriptor* field1,
+ const FieldDescriptor* field2);
+
+ // Combine the two lists of fields into the combined_fields output vector.
+ // All fields present in both lists will always be included in the combined
+ // list. Fields only present in one of the lists will only appear in the
+ // combined list if the corresponding fields_scope option is set to FULL.
+ void CombineFields(const vector<const FieldDescriptor*>& fields1,
+ Scope fields1_scope,
+ const vector<const FieldDescriptor*>& fields2,
+ Scope fields2_scope,
+ vector<const FieldDescriptor*>* combined_fields);
+
+ // Internal version of the Compare method which performs the actual
+ // comparison. The parent_fields vector is a vector containing field
+ // descriptors of all fields accessed to get to this comparison operation
+ // (i.e. if the current message is an embedded message, the parent_fields
+ // vector will contain the field that has this embedded message).
+ bool Compare(const Message& message1, const Message& message2,
+ vector<SpecificField>* parent_fields);
+
+ // Compares all the unknown fields in two messages.
+ bool CompareUnknownFields(const Message& message1, const Message& message2,
+ const google::protobuf::UnknownFieldSet&,
+ const google::protobuf::UnknownFieldSet&,
+ vector<SpecificField>* parent_fields);
+
+ // Compares the specified messages for the requested field lists. The field
+ // lists are modified depending on comparison settings, and then passed to
+ // CompareWithFieldsInternal.
+ bool CompareRequestedFieldsUsingSettings(
+ const Message& message1, const Message& message2,
+ const vector<const FieldDescriptor*>& message1_fields,
+ const vector<const FieldDescriptor*>& message2_fields,
+ vector<SpecificField>* parent_fields);
+
+ // Compares the specified messages with the specified field lists.
+ bool CompareWithFieldsInternal(
+ const Message& message1, const Message& message2,
+ const vector<const FieldDescriptor*>& message1_fields,
+ const vector<const FieldDescriptor*>& message2_fields,
+ vector<SpecificField>* parent_fields);
+
+ // Compares the repeated fields, and report the error.
+ bool CompareRepeatedField(const Message& message1, const Message& message2,
+ const FieldDescriptor* field,
+ vector<SpecificField>* parent_fields);
+
+ // Shorthand for CompareFieldValueUsingParentFields with NULL parent_fields.
+ bool CompareFieldValue(const Message& message1,
+ const Message& message2,
+ const FieldDescriptor* field,
+ int index1,
+ int index2);
+
+ // Compares the specified field on the two messages, returning
+ // true if they are the same, false otherwise. For repeated fields,
+ // this method only compares the value in the specified index. This method
+ // uses Compare functions to recurse into submessages.
+ // The parent_fields vector is used in calls to a Reporter instance calls.
+ // It can be NULL, in which case the MessageDifferencer will create new
+ // list of parent messages if it needs to recursively compare the given field.
+ // To avoid confusing users you should not set it to NULL unless you modified
+ // Reporter to handle the change of parent_fields correctly.
+ bool CompareFieldValueUsingParentFields(const Message& message1,
+ const Message& message2,
+ const FieldDescriptor* field,
+ int index1,
+ int index2,
+ vector<SpecificField>* parent_fields);
+
+ // Compares the specified field on the two messages, returning comparison
+ // result, as returned by appropriate FieldComparator.
+ FieldComparator::ComparisonResult GetFieldComparisonResult(
+ const Message& message1, const Message& message2,
+ const FieldDescriptor* field, int index1, int index2,
+ const FieldContext* field_context);
+
+ // Check if the two elements in the repeated field are match to each other.
+ // if the key_comprator is NULL, this function returns true when the two
+ // elements are equal.
+ bool IsMatch(const FieldDescriptor* repeated_field,
+ const MapKeyComparator* key_comparator,
+ const Message* message1, const Message* message2,
+ const vector<SpecificField>& parent_fields,
+ int index1, int index2);
+
+ // Returns true when this repeated field has been configured to be treated
+ // as a set.
+ bool IsTreatedAsSet(const FieldDescriptor* field);
+
+ // Returns true when this repeated field is to be compared as a subset, ie.
+ // has been configured to be treated as a set or map and scope is set to
+ // PARTIAL.
+ bool IsTreatedAsSubset(const FieldDescriptor* field);
+
+ // Returns true if this field is to be ignored when this
+ // MessageDifferencer compares messages.
+ bool IsIgnored(
+ const Message& message1,
+ const Message& message2,
+ const FieldDescriptor* field,
+ const vector<SpecificField>& parent_fields);
+
+ // Returns true if this unknown field is to be ignored when this
+ // MessageDifferencer compares messages.
+ bool IsUnknownFieldIgnored(const Message& message1, const Message& message2,
+ const SpecificField& field,
+ const vector<SpecificField>& parent_fields);
+
+ // Returns MapKeyComparator* when this field has been configured to
+ // be treated as a map. If not, returns NULL.
+ const MapKeyComparator* GetMapKeyComparator(const FieldDescriptor* field);
+
+ // Attempts to match indices of a repeated field, so that the contained values
+ // match. Clears output vectors and sets their values to indices of paired
+ // messages, ie. if message1[0] matches message2[1], then match_list1[0] == 1
+ // and match_list2[1] == 0. The unmatched indices are indicated by -1.
+ // This method returns false if the match failed. However, it doesn't mean
+ // that the comparison succeeds when this method returns true (you need to
+ // double-check in this case).
+ bool MatchRepeatedFieldIndices(const Message& message1,
+ const Message& message2,
+ const FieldDescriptor* repeated_field,
+ const vector<SpecificField>& parent_fields,
+ vector<int>* match_list1,
+ vector<int>* match_list2);
+
+ // If "any" is of type google.protobuf.Any, extract its payload using
+ // DynamicMessageFactory and store in "data".
+ bool UnpackAny(const Message& any, google::protobuf::scoped_ptr<Message>* data);
+
+ // Checks if index is equal to new_index in all the specific fields.
+ static bool CheckPathChanged(const vector<SpecificField>& parent_fields);
+
+ // Defines a map between field descriptors and their MapKeyComparators.
+ // Used for repeated fields when they are configured as TreatAsMap.
+ typedef map<const FieldDescriptor*,
+ const MapKeyComparator*> FieldKeyComparatorMap;
+
+ // Defines a set to store field descriptors. Used for repeated fields when
+ // they are configured as TreatAsSet.
+ typedef set<const FieldDescriptor*> FieldSet;
+
+ Reporter* reporter_;
+ DefaultFieldComparator default_field_comparator_;
+ FieldComparator* field_comparator_;
+ MessageFieldComparison message_field_comparison_;
+ Scope scope_;
+ RepeatedFieldComparison repeated_field_comparison_;
+
+ FieldSet set_fields_;
+ FieldSet list_fields_;
+ // Keeps track of MapKeyComparators that are created within
+ // MessageDifferencer. These MapKeyComparators should be deleted
+ // before MessageDifferencer is destroyed.
+ // When TreatAsMap or TreatAsMapWithMultipleFieldsAsKey is called, we don't
+ // store the supplied FieldDescriptors directly. Instead, a new
+ // MapKeyComparator is created for comparison purpose.
+ vector<MapKeyComparator*> owned_key_comparators_;
+ FieldKeyComparatorMap map_field_key_comparator_;
+ vector<IgnoreCriteria*> ignore_criteria_;
+
+ FieldSet ignored_fields_;
+
+ bool compare_unknown_fields_;
+ bool report_matches_;
+
+ string* output_string_;
+
+ google::protobuf::scoped_ptr<DynamicMessageFactory> dynamic_message_factory_;
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageDifferencer);
+};
+
+// This class provides extra information to the FieldComparator::Compare
+// function.
+class LIBPROTOBUF_EXPORT FieldContext {
+ public:
+ explicit FieldContext(
+ vector<MessageDifferencer::SpecificField>* parent_fields)
+ : parent_fields_(parent_fields) {}
+
+ vector<MessageDifferencer::SpecificField>* parent_fields() const {
+ return parent_fields_;
+ }
+
+ private:
+ vector<MessageDifferencer::SpecificField>* parent_fields_;
+};
+
+}
+}
+
+} // namespace google
+#endif // GOOGLE_PROTOBUF_UTIL_MESSAGE_DIFFERENCER_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/util/time_util.h b/darwin-x86_64/protoc/include/google/protobuf/util/time_util.h
new file mode 100644
index 0000000..1bac089
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/util/time_util.h
@@ -0,0 +1,293 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_UTIL_TIME_UTIL_H__
+#define GOOGLE_PROTOBUF_UTIL_TIME_UTIL_H__
+
+#include <ctime>
+#include <ostream>
+#include <string>
+#ifdef _MSC_VER
+#include <winsock2.h>
+#else
+#include <sys/time.h>
+#endif
+
+#include <google/protobuf/duration.pb.h>
+#include <google/protobuf/timestamp.pb.h>
+
+namespace google {
+namespace protobuf {
+namespace util {
+
+class LIBPROTOBUF_EXPORT TimeUtil {
+ typedef google::protobuf::Timestamp Timestamp;
+ typedef google::protobuf::Duration Duration;
+
+ public:
+ // The min/max Timestamp/Duration values we support.
+ //
+ // For "0001-01-01T00:00:00Z".
+ static const int64 kTimestampMinSeconds = -62135596800LL;
+ // For "9999-12-31T23:59:59.999999999Z".
+ static const int64 kTimestampMaxSeconds = 253402300799LL;
+ static const int64 kDurationMinSeconds = -315576000000LL;
+ static const int64 kDurationMaxSeconds = 315576000000LL;
+
+ // Converts Timestamp to/from RFC 3339 date string format.
+ // Generated output will always be Z-normalized and uses 3, 6 or 9
+ // fractional digits as required to represent the exact time. When
+ // parsing, any fractional digits (or none) and any offset are
+ // accepted as long as they fit into nano-seconds precision.
+ // Note that Timestamp can only represent time from
+ // 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. Converting
+ // a Timestamp outside of this range is undefined behavior.
+ // See https://www.ietf.org/rfc/rfc3339.txt
+ //
+ // Example of generated format:
+ // "1972-01-01T10:00:20.021Z"
+ //
+ // Example of accepted format:
+ // "1972-01-01T10:00:20.021-05:00"
+ static string ToString(const Timestamp& timestamp);
+ static bool FromString(const string& value, Timestamp* timestamp);
+
+ // Converts Duration to/from string format. The string format will contains
+ // 3, 6, or 9 fractional digits depending on the precision required to
+ // represent the exact Duration value. For example:
+ // "1s", "1.010s", "1.000000100s", "-3.100s"
+ // The range that can be represented by Duration is from -315,576,000,000
+ // to +315,576,000,000 inclusive (in seconds).
+ static string ToString(const Duration& duration);
+ static bool FromString(const string& value, Duration* timestamp);
+
+#ifdef GetCurrentTime
+#undef GetCurrentTime // Visual Studio has macro GetCurrentTime
+#endif
+ // Gets the current UTC time.
+ static Timestamp GetCurrentTime();
+ // Returns the Time representing "1970-01-01 00:00:00".
+ static Timestamp GetEpoch();
+
+ // Converts between Duration and integer types. The behavior is undefined if
+ // the input value is not in the valid range of Duration.
+ static Duration NanosecondsToDuration(int64 nanos);
+ static Duration MicrosecondsToDuration(int64 micros);
+ static Duration MillisecondsToDuration(int64 millis);
+ static Duration SecondsToDuration(int64 seconds);
+ static Duration MinutesToDuration(int64 minutes);
+ static Duration HoursToDuration(int64 hours);
+ // Result will be truncated towards zero. For example, "-1.5s" will be
+ // truncated to "-1s", and "1.5s" to "1s" when converting to seconds.
+ // It's undefined behavior if the input duration is not valid or the result
+ // exceeds the range of int64. A duration is not valid if it's not in the
+ // valid range of Duration, or have an invalid nanos value (i.e., larger
+ // than 999999999, less than -999999999, or have a different sign from the
+ // seconds part).
+ static int64 DurationToNanoseconds(const Duration& duration);
+ static int64 DurationToMicroseconds(const Duration& duration);
+ static int64 DurationToMilliseconds(const Duration& duration);
+ static int64 DurationToSeconds(const Duration& duration);
+ static int64 DurationToMinutes(const Duration& duration);
+ static int64 DurationToHours(const Duration& duration);
+ // Creates Timestamp from integer types. The integer value indicates the
+ // time elapsed from Epoch time. The behavior is undefined if the input
+ // value is not in the valid range of Timestamp.
+ static Timestamp NanosecondsToTimestamp(int64 nanos);
+ static Timestamp MicrosecondsToTimestamp(int64 micros);
+ static Timestamp MillisecondsToTimestamp(int64 millis);
+ static Timestamp SecondsToTimestamp(int64 seconds);
+ // Result will be truncated down to the nearest integer value. For example,
+ // with "1969-12-31T23:59:59.9Z", TimestampToMilliseconds() returns -100
+ // and TimestampToSeconds() returns -1. It's undefined behavior if the input
+ // Timestamp is not valid (i.e., its seconds part or nanos part does not fall
+ // in the valid range) or the return value doesn't fit into int64.
+ static int64 TimestampToNanoseconds(const Timestamp& timestamp);
+ static int64 TimestampToMicroseconds(const Timestamp& timestamp);
+ static int64 TimestampToMilliseconds(const Timestamp& timestamp);
+ static int64 TimestampToSeconds(const Timestamp& timestamp);
+
+ // Conversion to/from other time/date types. Note that these types may
+ // have a different precision and time range from Timestamp/Duration.
+ // When converting to a lower precision type, the value will be truncated
+ // to the nearest value that can be represented. If the value is
+ // out of the range of the result type, the return value is undefined.
+ //
+ // Conversion to/from time_t
+ static Timestamp TimeTToTimestamp(time_t value);
+ static time_t TimestampToTimeT(const Timestamp& value);
+
+ // Conversion to/from timeval
+ static Timestamp TimevalToTimestamp(const timeval& value);
+ static timeval TimestampToTimeval(const Timestamp& value);
+ static Duration TimevalToDuration(const timeval& value);
+ static timeval DurationToTimeval(const Duration& value);
+};
+
+} // namespace util
+} // namespace protobuf
+
+
+namespace protobuf {
+// Overloaded operators for Duration.
+//
+// Assignment operators.
+LIBPROTOBUF_EXPORT Duration& operator+=(Duration& d1, const Duration& d2); // NOLINT
+LIBPROTOBUF_EXPORT Duration& operator-=(Duration& d1, const Duration& d2); // NOLINT
+LIBPROTOBUF_EXPORT Duration& operator*=(Duration& d, int64 r); // NOLINT
+LIBPROTOBUF_EXPORT Duration& operator*=(Duration& d, double r); // NOLINT
+LIBPROTOBUF_EXPORT Duration& operator/=(Duration& d, int64 r); // NOLINT
+LIBPROTOBUF_EXPORT Duration& operator/=(Duration& d, double r); // NOLINT
+// Overload for other integer types.
+template <typename T>
+Duration& operator*=(Duration& d, T r) { // NOLINT
+ int64 x = r;
+ return d *= x;
+}
+template <typename T>
+Duration& operator/=(Duration& d, T r) { // NOLINT
+ int64 x = r;
+ return d /= x;
+}
+LIBPROTOBUF_EXPORT Duration& operator%=(Duration& d1, const Duration& d2); // NOLINT
+// Relational operators.
+inline bool operator<(const Duration& d1, const Duration& d2) {
+ if (d1.seconds() == d2.seconds()) {
+ return d1.nanos() < d2.nanos();
+ }
+ return d1.seconds() < d2.seconds();
+}
+inline bool operator>(const Duration& d1, const Duration& d2) {
+ return d2 < d1;
+}
+inline bool operator>=(const Duration& d1, const Duration& d2) {
+ return !(d1 < d2);
+}
+inline bool operator<=(const Duration& d1, const Duration& d2) {
+ return !(d2 < d1);
+}
+inline bool operator==(const Duration& d1, const Duration& d2) {
+ return d1.seconds() == d2.seconds() && d1.nanos() == d2.nanos();
+}
+inline bool operator!=(const Duration& d1, const Duration& d2) {
+ return !(d1 == d2);
+}
+// Additive operators
+inline Duration operator-(const Duration& d) {
+ Duration result;
+ result.set_seconds(-d.seconds());
+ result.set_nanos(-d.nanos());
+ return result;
+}
+inline Duration operator+(const Duration& d1, const Duration& d2) {
+ Duration result = d1;
+ return result += d2;
+}
+inline Duration operator-(const Duration& d1, const Duration& d2) {
+ Duration result = d1;
+ return result -= d2;
+}
+// Multiplicative operators
+template<typename T>
+inline Duration operator*(Duration d, T r) {
+ return d *= r;
+}
+template<typename T>
+inline Duration operator*(T r, Duration d) {
+ return d *= r;
+}
+template<typename T>
+inline Duration operator/(Duration d, T r) {
+ return d /= r;
+}
+LIBPROTOBUF_EXPORT int64 operator/(const Duration& d1, const Duration& d2);
+
+inline Duration operator%(const Duration& d1, const Duration& d2) {
+ Duration result = d1;
+ return result %= d2;
+}
+
+inline ostream& operator<<(ostream& out, const Duration& d) {
+ out << google::protobuf::util::TimeUtil::ToString(d);
+ return out;
+}
+
+// Overloaded operators for Timestamp
+//
+// Assignement operators.
+LIBPROTOBUF_EXPORT Timestamp& operator+=(Timestamp& t, const Duration& d); // NOLINT
+LIBPROTOBUF_EXPORT Timestamp& operator-=(Timestamp& t, const Duration& d); // NOLINT
+// Relational operators.
+inline bool operator<(const Timestamp& t1, const Timestamp& t2) {
+ if (t1.seconds() == t2.seconds()) {
+ return t1.nanos() < t2.nanos();
+ }
+ return t1.seconds() < t2.seconds();
+}
+inline bool operator>(const Timestamp& t1, const Timestamp& t2) {
+ return t2 < t1;
+}
+inline bool operator>=(const Timestamp& t1, const Timestamp& t2) {
+ return !(t1 < t2);
+}
+inline bool operator<=(const Timestamp& t1, const Timestamp& t2) {
+ return !(t2 < t1);
+}
+inline bool operator==(const Timestamp& t1, const Timestamp& t2) {
+ return t1.seconds() == t2.seconds() && t1.nanos() == t2.nanos();
+}
+inline bool operator!=(const Timestamp& t1, const Timestamp& t2) {
+ return !(t1 == t2);
+}
+// Additive operators.
+inline Timestamp operator+(const Timestamp& t, const Duration& d) {
+ Timestamp result = t;
+ return result += d;
+}
+inline Timestamp operator+(const Duration& d, const Timestamp& t) {
+ Timestamp result = t;
+ return result += d;
+}
+inline Timestamp operator-(const Timestamp& t, const Duration& d) {
+ Timestamp result = t;
+ return result -= d;
+}
+LIBPROTOBUF_EXPORT Duration operator-(const Timestamp& t1, const Timestamp& t2);
+
+inline ostream& operator<<(ostream& out, const Timestamp& t) {
+ out << google::protobuf::util::TimeUtil::ToString(t);
+ return out;
+}
+
+} // namespace protobuf
+
+
+} // namespace google
+#endif // GOOGLE_PROTOBUF_UTIL_TIME_UTIL_H__
diff --git a/linux-x86_64/protoc/include/google/protobuf/io/strtod.h b/darwin-x86_64/protoc/include/google/protobuf/util/type_resolver.h
similarity index 63%
copy from linux-x86_64/protoc/include/google/protobuf/io/strtod.h
copy to darwin-x86_64/protoc/include/google/protobuf/util/type_resolver.h
index c2efc8d..77d4416 100644
--- a/linux-x86_64/protoc/include/google/protobuf/io/strtod.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/util/type_resolver.h
@@ -28,23 +28,48 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// A locale-independent version of strtod(), used to parse floating
-// point default values in .proto files, where the decimal separator
-// is always a dot.
+#ifndef GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_H__
+#define GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_H__
-#ifndef GOOGLE_PROTOBUF_IO_STRTOD_H__
-#define GOOGLE_PROTOBUF_IO_STRTOD_H__
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/status.h>
+
namespace google {
namespace protobuf {
-namespace io {
+class Type;
+class Enum;
+} // namespace protobuf
-// A locale-independent version of the standard strtod(), which always
-// uses a dot as the decimal separator.
-double NoLocaleStrtod(const char* str, char** endptr);
-} // namespace io
+namespace protobuf {
+class DescriptorPool;
+namespace util {
+
+// Abstract interface for a type resovler.
+//
+// Implementations of this interface must be thread-safe.
+class LIBPROTOBUF_EXPORT TypeResolver {
+ public:
+ TypeResolver() {}
+ virtual ~TypeResolver() {}
+
+ // Resolves a type url for a message type.
+ virtual util::Status ResolveMessageType(
+ const string& type_url, google::protobuf::Type* message_type) = 0;
+
+ // Resolves a type url for an enum type.
+ virtual util::Status ResolveEnumType(const string& type_url,
+ google::protobuf::Enum* enum_type) = 0;
+
+ private:
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TypeResolver);
+};
+
+} // namespace util
} // namespace protobuf
} // namespace google
-#endif // GOOGLE_PROTOBUF_IO_STRTOD_H__
+#endif // GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_H__
diff --git a/linux-x86_64/protoc/include/google/protobuf/io/strtod.h b/darwin-x86_64/protoc/include/google/protobuf/util/type_resolver_util.h
similarity index 74%
copy from linux-x86_64/protoc/include/google/protobuf/io/strtod.h
copy to darwin-x86_64/protoc/include/google/protobuf/util/type_resolver_util.h
index c2efc8d..c0ef3c1 100644
--- a/linux-x86_64/protoc/include/google/protobuf/io/strtod.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/util/type_resolver_util.h
@@ -28,23 +28,25 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// A locale-independent version of strtod(), used to parse floating
-// point default values in .proto files, where the decimal separator
-// is always a dot.
+#ifndef GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_UTIL_H__
+#define GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_UTIL_H__
-#ifndef GOOGLE_PROTOBUF_IO_STRTOD_H__
-#define GOOGLE_PROTOBUF_IO_STRTOD_H__
+#include <string>
+#include <google/protobuf/stubs/common.h>
namespace google {
namespace protobuf {
-namespace io {
+class DescriptorPool;
+namespace util {
+class TypeResolver;
-// A locale-independent version of the standard strtod(), which always
-// uses a dot as the decimal separator.
-double NoLocaleStrtod(const char* str, char** endptr);
+// Creates a TypeResolver that serves type information in the given descriptor
+// pool. Caller takes ownership of the returned TypeResolver.
+LIBPROTOBUF_EXPORT TypeResolver* NewTypeResolverForDescriptorPool(
+ const string& url_prefix, const DescriptorPool* pool);
-} // namespace io
+} // namespace util
} // namespace protobuf
} // namespace google
-#endif // GOOGLE_PROTOBUF_IO_STRTOD_H__
+#endif // GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_UTIL_H__
diff --git a/darwin-x86_64/protoc/include/google/protobuf/wire_format.h b/darwin-x86_64/protoc/include/google/protobuf/wire_format.h
index 9f26eb2..941be75 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/wire_format.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/wire_format.h
@@ -138,6 +138,14 @@
static bool SkipMessage(io::CodedInputStream* input,
UnknownFieldSet* unknown_fields);
+ // Read a packed enum field. If the is_valid function is not NULL, values for
+ // which is_valid(value) returns false are appended to unknown_fields_stream.
+ static bool ReadPackedEnumPreserveUnknowns(io::CodedInputStream* input,
+ uint32 field_number,
+ bool (*is_valid)(int),
+ UnknownFieldSet* unknown_fields,
+ RepeatedField<int>* values);
+
// Write the contents of an UnknownFieldSet to the output.
static void SerializeUnknownFields(const UnknownFieldSet& unknown_fields,
io::CodedOutputStream* output);
@@ -223,8 +231,8 @@
const Message& message);
enum Operation {
- PARSE,
- SERIALIZE,
+ PARSE = 0,
+ SERIALIZE = 1,
};
// Verifies that a string field is valid UTF8, logging an error if not.
@@ -239,13 +247,6 @@
const char* field_name);
private:
- // Verifies that a string field is valid UTF8, logging an error if not.
- static void VerifyUTF8StringFallback(
- const char* data,
- int size,
- Operation op,
- const char* field_name);
-
// Skip a MessageSet field.
static bool SkipMessageSetField(io::CodedInputStream* input,
uint32 field_number,
@@ -257,8 +258,6 @@
Message* message,
io::CodedInputStream* input);
-
-
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(WireFormat);
};
@@ -282,7 +281,7 @@
inline WireFormatLite::WireType WireFormat::WireTypeForField(
const FieldDescriptor* field) {
- if (field->options().packed()) {
+ if (field->is_packed()) {
return WireFormatLite::WIRETYPE_LENGTH_DELIMITED;
} else {
return WireTypeForFieldType(field->type());
@@ -313,7 +312,8 @@
inline void WireFormat::VerifyUTF8String(const char* data, int size,
WireFormat::Operation op) {
#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
- WireFormat::VerifyUTF8StringFallback(data, size, op, NULL);
+ WireFormatLite::VerifyUtf8String(
+ data, size, static_cast<WireFormatLite::Operation>(op), NULL);
#else
// Avoid the compiler warning about unsued variables.
(void)data; (void)size; (void)op;
@@ -324,7 +324,8 @@
const char* data, int size, WireFormat::Operation op,
const char* field_name) {
#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
- WireFormat::VerifyUTF8StringFallback(data, size, op, field_name);
+ WireFormatLite::VerifyUtf8String(
+ data, size, static_cast<WireFormatLite::Operation>(op), field_name);
#endif
}
diff --git a/darwin-x86_64/protoc/include/google/protobuf/wire_format_lite.h b/darwin-x86_64/protoc/include/google/protobuf/wire_format_lite.h
index 21aa488..55fc7ec 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/wire_format_lite.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/wire_format_lite.h
@@ -250,17 +250,17 @@
// For primitive fields, we just use a templatized routine parameterized by
// the represented type and the FieldType. These are specialized with the
// appropriate definition for each declared type.
- template <typename CType, enum FieldType DeclaredType>
- static inline bool ReadPrimitive(input, CType* value) INL;
+ template <typename CType, enum FieldType DeclaredType> INL
+ static bool ReadPrimitive(input, CType* value);
// Reads repeated primitive values, with optimizations for repeats.
// tag_size and tag should both be compile-time constants provided by the
// protocol compiler.
- template <typename CType, enum FieldType DeclaredType>
- static inline bool ReadRepeatedPrimitive(int tag_size,
- uint32 tag,
- input,
- RepeatedField<CType>* value) INL;
+ template <typename CType, enum FieldType DeclaredType> INL
+ static bool ReadRepeatedPrimitive(int tag_size,
+ uint32 tag,
+ input,
+ RepeatedField<CType>* value);
// Identical to ReadRepeatedPrimitive, except will not inline the
// implementation.
@@ -275,30 +275,56 @@
//
// This is only implemented for the types with fixed wire size, e.g.
// float, double, and the (s)fixed* types.
- template <typename CType, enum FieldType DeclaredType>
- static inline const uint8* ReadPrimitiveFromArray(const uint8* buffer,
- CType* value) INL;
+ template <typename CType, enum FieldType DeclaredType> INL
+ static const uint8* ReadPrimitiveFromArray(const uint8* buffer, CType* value);
// Reads a primitive packed field.
//
// This is only implemented for packable types.
- template <typename CType, enum FieldType DeclaredType>
- static inline bool ReadPackedPrimitive(input,
- RepeatedField<CType>* value) INL;
+ template <typename CType, enum FieldType DeclaredType> INL
+ static bool ReadPackedPrimitive(input, RepeatedField<CType>* value);
// Identical to ReadPackedPrimitive, except will not inline the
// implementation.
template <typename CType, enum FieldType DeclaredType>
static bool ReadPackedPrimitiveNoInline(input, RepeatedField<CType>* value);
- // Read a packed enum field. Values for which is_valid() returns false are
- // dropped.
+ // Read a packed enum field. If the is_valid function is not NULL, values for
+ // which is_valid(value) returns false are silently dropped.
static bool ReadPackedEnumNoInline(input,
bool (*is_valid)(int),
- RepeatedField<int>* value);
+ RepeatedField<int>* values);
- static bool ReadString(input, string* value);
- static bool ReadBytes (input, string* value);
+ // Read a packed enum field. If the is_valid function is not NULL, values for
+ // which is_valid(value) returns false are appended to unknown_fields_stream.
+ static bool ReadPackedEnumPreserveUnknowns(
+ input,
+ field_number,
+ bool (*is_valid)(int),
+ io::CodedOutputStream* unknown_fields_stream,
+ RepeatedField<int>* values);
+
+ // Read a string. ReadString(..., string* value) requires an existing string.
+ static inline bool ReadString(input, string* value);
+ // ReadString(..., string** p) is internal-only, and should only be called
+ // from generated code. It starts by setting *p to "new string"
+ // if *p == &GetEmptyStringAlreadyInited(). It then invokes
+ // ReadString(input, *p). This is useful for reducing code size.
+ static inline bool ReadString(input, string** p);
+ // Analogous to ReadString().
+ static bool ReadBytes(input, string* value);
+ static bool ReadBytes(input, string** p);
+
+
+ enum Operation {
+ PARSE = 0,
+ SERIALIZE = 1,
+ };
+
+ // Returns true if the data is valid UTF-8.
+ static bool VerifyUtf8String(const char* data, int size,
+ Operation op,
+ const char* field_name);
static inline bool ReadGroup (field_number, input, MessageLite* value);
static inline bool ReadMessage(input, MessageLite* value);
@@ -312,26 +338,37 @@
template<typename MessageType>
static inline bool ReadMessageNoVirtual(input, MessageType* value);
+ // The same, but do not modify input's recursion depth. This is useful
+ // when reading a bunch of groups or messages in a loop, because then the
+ // recursion depth can be incremented before the loop and decremented after.
+ template<typename MessageType>
+ static inline bool ReadGroupNoVirtualNoRecursionDepth(field_number, input,
+ MessageType* value);
+
+ template<typename MessageType>
+ static inline bool ReadMessageNoVirtualNoRecursionDepth(input,
+ MessageType* value);
+
// Write a tag. The Write*() functions typically include the tag, so
// normally there's no need to call this unless using the Write*NoTag()
// variants.
- static inline void WriteTag(field_number, WireType type, output) INL;
+ INL static void WriteTag(field_number, WireType type, output);
// Write fields, without tags.
- static inline void WriteInt32NoTag (int32 value, output) INL;
- static inline void WriteInt64NoTag (int64 value, output) INL;
- static inline void WriteUInt32NoTag (uint32 value, output) INL;
- static inline void WriteUInt64NoTag (uint64 value, output) INL;
- static inline void WriteSInt32NoTag (int32 value, output) INL;
- static inline void WriteSInt64NoTag (int64 value, output) INL;
- static inline void WriteFixed32NoTag (uint32 value, output) INL;
- static inline void WriteFixed64NoTag (uint64 value, output) INL;
- static inline void WriteSFixed32NoTag(int32 value, output) INL;
- static inline void WriteSFixed64NoTag(int64 value, output) INL;
- static inline void WriteFloatNoTag (float value, output) INL;
- static inline void WriteDoubleNoTag (double value, output) INL;
- static inline void WriteBoolNoTag (bool value, output) INL;
- static inline void WriteEnumNoTag (int value, output) INL;
+ INL static void WriteInt32NoTag (int32 value, output);
+ INL static void WriteInt64NoTag (int64 value, output);
+ INL static void WriteUInt32NoTag (uint32 value, output);
+ INL static void WriteUInt64NoTag (uint64 value, output);
+ INL static void WriteSInt32NoTag (int32 value, output);
+ INL static void WriteSInt64NoTag (int64 value, output);
+ INL static void WriteFixed32NoTag (uint32 value, output);
+ INL static void WriteFixed64NoTag (uint64 value, output);
+ INL static void WriteSFixed32NoTag(int32 value, output);
+ INL static void WriteSFixed64NoTag(int64 value, output);
+ INL static void WriteFloatNoTag (float value, output);
+ INL static void WriteDoubleNoTag (double value, output);
+ INL static void WriteBoolNoTag (bool value, output);
+ INL static void WriteEnumNoTag (int value, output);
// Write fields, including tags.
static void WriteInt32 (field_number, int32 value, output);
@@ -381,73 +418,59 @@
#define output uint8* target
// Like above, but use only *ToArray methods of CodedOutputStream.
- static inline uint8* WriteTagToArray(field_number, WireType type, output) INL;
+ INL static uint8* WriteTagToArray(field_number, WireType type, output);
// Write fields, without tags.
- static inline uint8* WriteInt32NoTagToArray (int32 value, output) INL;
- static inline uint8* WriteInt64NoTagToArray (int64 value, output) INL;
- static inline uint8* WriteUInt32NoTagToArray (uint32 value, output) INL;
- static inline uint8* WriteUInt64NoTagToArray (uint64 value, output) INL;
- static inline uint8* WriteSInt32NoTagToArray (int32 value, output) INL;
- static inline uint8* WriteSInt64NoTagToArray (int64 value, output) INL;
- static inline uint8* WriteFixed32NoTagToArray (uint32 value, output) INL;
- static inline uint8* WriteFixed64NoTagToArray (uint64 value, output) INL;
- static inline uint8* WriteSFixed32NoTagToArray(int32 value, output) INL;
- static inline uint8* WriteSFixed64NoTagToArray(int64 value, output) INL;
- static inline uint8* WriteFloatNoTagToArray (float value, output) INL;
- static inline uint8* WriteDoubleNoTagToArray (double value, output) INL;
- static inline uint8* WriteBoolNoTagToArray (bool value, output) INL;
- static inline uint8* WriteEnumNoTagToArray (int value, output) INL;
+ INL static uint8* WriteInt32NoTagToArray (int32 value, output);
+ INL static uint8* WriteInt64NoTagToArray (int64 value, output);
+ INL static uint8* WriteUInt32NoTagToArray (uint32 value, output);
+ INL static uint8* WriteUInt64NoTagToArray (uint64 value, output);
+ INL static uint8* WriteSInt32NoTagToArray (int32 value, output);
+ INL static uint8* WriteSInt64NoTagToArray (int64 value, output);
+ INL static uint8* WriteFixed32NoTagToArray (uint32 value, output);
+ INL static uint8* WriteFixed64NoTagToArray (uint64 value, output);
+ INL static uint8* WriteSFixed32NoTagToArray(int32 value, output);
+ INL static uint8* WriteSFixed64NoTagToArray(int64 value, output);
+ INL static uint8* WriteFloatNoTagToArray (float value, output);
+ INL static uint8* WriteDoubleNoTagToArray (double value, output);
+ INL static uint8* WriteBoolNoTagToArray (bool value, output);
+ INL static uint8* WriteEnumNoTagToArray (int value, output);
// Write fields, including tags.
- static inline uint8* WriteInt32ToArray(
- field_number, int32 value, output) INL;
- static inline uint8* WriteInt64ToArray(
- field_number, int64 value, output) INL;
- static inline uint8* WriteUInt32ToArray(
- field_number, uint32 value, output) INL;
- static inline uint8* WriteUInt64ToArray(
- field_number, uint64 value, output) INL;
- static inline uint8* WriteSInt32ToArray(
- field_number, int32 value, output) INL;
- static inline uint8* WriteSInt64ToArray(
- field_number, int64 value, output) INL;
- static inline uint8* WriteFixed32ToArray(
- field_number, uint32 value, output) INL;
- static inline uint8* WriteFixed64ToArray(
- field_number, uint64 value, output) INL;
- static inline uint8* WriteSFixed32ToArray(
- field_number, int32 value, output) INL;
- static inline uint8* WriteSFixed64ToArray(
- field_number, int64 value, output) INL;
- static inline uint8* WriteFloatToArray(
- field_number, float value, output) INL;
- static inline uint8* WriteDoubleToArray(
- field_number, double value, output) INL;
- static inline uint8* WriteBoolToArray(
- field_number, bool value, output) INL;
- static inline uint8* WriteEnumToArray(
- field_number, int value, output) INL;
+ INL static uint8* WriteInt32ToArray(field_number, int32 value, output);
+ INL static uint8* WriteInt64ToArray(field_number, int64 value, output);
+ INL static uint8* WriteUInt32ToArray(field_number, uint32 value, output);
+ INL static uint8* WriteUInt64ToArray(field_number, uint64 value, output);
+ INL static uint8* WriteSInt32ToArray(field_number, int32 value, output);
+ INL static uint8* WriteSInt64ToArray(field_number, int64 value, output);
+ INL static uint8* WriteFixed32ToArray(field_number, uint32 value, output);
+ INL static uint8* WriteFixed64ToArray(field_number, uint64 value, output);
+ INL static uint8* WriteSFixed32ToArray(field_number, int32 value, output);
+ INL static uint8* WriteSFixed64ToArray(field_number, int64 value, output);
+ INL static uint8* WriteFloatToArray(field_number, float value, output);
+ INL static uint8* WriteDoubleToArray(field_number, double value, output);
+ INL static uint8* WriteBoolToArray(field_number, bool value, output);
+ INL static uint8* WriteEnumToArray(field_number, int value, output);
- static inline uint8* WriteStringToArray(
- field_number, const string& value, output) INL;
- static inline uint8* WriteBytesToArray(
- field_number, const string& value, output) INL;
+ INL static uint8* WriteStringToArray(
+ field_number, const string& value, output);
+ INL static uint8* WriteBytesToArray(
+ field_number, const string& value, output);
- static inline uint8* WriteGroupToArray(
- field_number, const MessageLite& value, output) INL;
- static inline uint8* WriteMessageToArray(
- field_number, const MessageLite& value, output) INL;
+ INL static uint8* WriteGroupToArray(
+ field_number, const MessageLite& value, output);
+ INL static uint8* WriteMessageToArray(
+ field_number, const MessageLite& value, output);
// Like above, but de-virtualize the call to SerializeWithCachedSizes(). The
// pointer must point at an instance of MessageType, *not* a subclass (or
// the subclass must not override SerializeWithCachedSizes()).
template<typename MessageType>
- static inline uint8* WriteGroupNoVirtualToArray(
- field_number, const MessageType& value, output) INL;
+ INL static uint8* WriteGroupNoVirtualToArray(
+ field_number, const MessageType& value, output);
template<typename MessageType>
- static inline uint8* WriteMessageNoVirtualToArray(
- field_number, const MessageType& value, output) INL;
+ INL static uint8* WriteMessageNoVirtualToArray(
+ field_number, const MessageType& value, output);
#undef output
#undef input
@@ -498,18 +521,17 @@
// A helper method for the repeated primitive reader. This method has
// optimizations for primitive types that have fixed size on the wire, and
// can be read using potentially faster paths.
- template <typename CType, enum FieldType DeclaredType>
- static inline bool ReadRepeatedFixedSizePrimitive(
+ template <typename CType, enum FieldType DeclaredType> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ static bool ReadRepeatedFixedSizePrimitive(
int tag_size,
uint32 tag,
google::protobuf::io::CodedInputStream* input,
- RepeatedField<CType>* value) GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
+ RepeatedField<CType>* value);
// Like ReadRepeatedFixedSizePrimitive but for packed primitive fields.
- template <typename CType, enum FieldType DeclaredType>
- static inline bool ReadPackedFixedSizePrimitive(
- google::protobuf::io::CodedInputStream* input,
- RepeatedField<CType>* value) GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
+ template <typename CType, enum FieldType DeclaredType> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+ static bool ReadPackedFixedSizePrimitive(google::protobuf::io::CodedInputStream* input,
+ RepeatedField<CType>* value);
static const CppType kFieldTypeToCppTypeMap[];
static const WireFormatLite::WireType kWireTypeForFieldType[];
@@ -638,7 +660,7 @@
inline uint32 WireFormatLite::ZigZagEncode32(int32 n) {
// Note: the right-shift must be arithmetic
- return (n << 1) ^ (n >> 31);
+ return (static_cast<uint32>(n) << 1) ^ (n >> 31);
}
inline int32 WireFormatLite::ZigZagDecode32(uint32 n) {
@@ -647,13 +669,26 @@
inline uint64 WireFormatLite::ZigZagEncode64(int64 n) {
// Note: the right-shift must be arithmetic
- return (n << 1) ^ (n >> 63);
+ return (static_cast<uint64>(n) << 1) ^ (n >> 63);
}
inline int64 WireFormatLite::ZigZagDecode64(uint64 n) {
return (n >> 1) ^ -static_cast<int64>(n & 1);
}
+// String is for UTF-8 text only, but, even so, ReadString() can simply
+// call ReadBytes().
+
+inline bool WireFormatLite::ReadString(io::CodedInputStream* input,
+ string* value) {
+ return ReadBytes(input, value);
+}
+
+inline bool WireFormatLite::ReadString(io::CodedInputStream* input,
+ string** p) {
+ return ReadBytes(input, p);
+}
+
} // namespace internal
} // namespace protobuf
diff --git a/darwin-x86_64/protoc/include/google/protobuf/wire_format_lite_inl.h b/darwin-x86_64/protoc/include/google/protobuf/wire_format_lite_inl.h
index 4e8ac9b..7bce21c 100644
--- a/darwin-x86_64/protoc/include/google/protobuf/wire_format_lite_inl.h
+++ b/darwin-x86_64/protoc/include/google/protobuf/wire_format_lite_inl.h
@@ -43,10 +43,12 @@
#include <string>
#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/logging.h>
#include <google/protobuf/message_lite.h>
#include <google/protobuf/repeated_field.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/arenastring.h>
namespace google {
@@ -272,8 +274,8 @@
// The number of bytes each type occupies on the wire.
const int per_value_size = tag_size + sizeof(value);
- int elements_available = min(values->Capacity() - values->size(),
- size / per_value_size);
+ int elements_available =
+ std::min(values->Capacity() - values->size(), size / per_value_size);
int num_read = 0;
while (num_read < elements_available &&
(buffer = io::CodedInputStream::ExpectTagFromArray(
@@ -365,7 +367,7 @@
bytes_limit = input->BytesUntilLimit();
} else {
bytes_limit =
- min(bytes_limit, static_cast<int64>(input->BytesUntilLimit()));
+ std::min(bytes_limit, static_cast<int64>(input->BytesUntilLimit()));
}
if (bytes_limit >= new_bytes) {
// Fast-path that pre-allocates *values to the final size.
@@ -380,7 +382,7 @@
#else
values->Reserve(old_entries + new_entries);
CType value;
- for (int i = 0; i < new_entries; ++i) {
+ for (uint32 i = 0; i < new_entries; ++i) {
if (!ReadPrimitive<CType, DeclaredType>(input, &value)) return false;
values->AddAlreadyReserved(value);
}
@@ -410,12 +412,12 @@
CPPTYPE, WireFormatLite::DECLARED_TYPE>(input, values); \
}
-READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(uint32, TYPE_FIXED32);
-READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(uint64, TYPE_FIXED64);
-READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(int32, TYPE_SFIXED32);
-READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(int64, TYPE_SFIXED64);
-READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(float, TYPE_FLOAT);
-READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(double, TYPE_DOUBLE);
+READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(uint32, TYPE_FIXED32)
+READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(uint64, TYPE_FIXED64)
+READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(int32, TYPE_SFIXED32)
+READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(int64, TYPE_SFIXED64)
+READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(float, TYPE_FLOAT)
+READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(double, TYPE_DOUBLE)
#undef READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE
@@ -426,6 +428,7 @@
}
+
inline bool WireFormatLite::ReadGroup(int field_number,
io::CodedInputStream* input,
MessageLite* value) {
@@ -442,15 +445,12 @@
MessageLite* value) {
uint32 length;
if (!input->ReadVarint32(&length)) return false;
- if (!input->IncrementRecursionDepth()) return false;
- io::CodedInputStream::Limit limit = input->PushLimit(length);
- if (!value->MergePartialFromCodedStream(input)) return false;
+ std::pair<io::CodedInputStream::Limit, int> p =
+ input->IncrementRecursionDepthAndPushLimit(length);
+ if (p.second < 0 || !value->MergePartialFromCodedStream(input)) return false;
// Make sure that parsing stopped when the limit was hit, not at an endgroup
// tag.
- if (!input->ConsumedEntireMessage()) return false;
- input->PopLimit(limit);
- input->DecrementRecursionDepth();
- return true;
+ return input->DecrementRecursionDepthAndPopLimit(p.first);
}
// We name the template parameter something long and extremely unlikely to occur
@@ -471,7 +471,7 @@
if (!value->
MessageType_WorkAroundCppLookupDefect::MergePartialFromCodedStream(input))
return false;
- input->DecrementRecursionDepth();
+ input->UnsafeDecrementRecursionDepth();
// Make sure the last thing read was an end tag for this group.
if (!input->LastTagWas(MakeTag(field_number, WIRETYPE_END_GROUP))) {
return false;
@@ -479,21 +479,37 @@
return true;
}
template<typename MessageType_WorkAroundCppLookupDefect>
+inline bool WireFormatLite::ReadGroupNoVirtualNoRecursionDepth(
+ int field_number, io::CodedInputStream* input,
+ MessageType_WorkAroundCppLookupDefect* value) {
+ return value->MessageType_WorkAroundCppLookupDefect::
+ MergePartialFromCodedStream(input) &&
+ input->LastTagWas(MakeTag(field_number, WIRETYPE_END_GROUP));
+}
+template<typename MessageType_WorkAroundCppLookupDefect>
inline bool WireFormatLite::ReadMessageNoVirtual(
io::CodedInputStream* input, MessageType_WorkAroundCppLookupDefect* value) {
uint32 length;
if (!input->ReadVarint32(&length)) return false;
- if (!input->IncrementRecursionDepth()) return false;
- io::CodedInputStream::Limit limit = input->PushLimit(length);
+ std::pair<io::CodedInputStream::Limit, int> p =
+ input->IncrementRecursionDepthAndPushLimit(length);
+ if (p.second < 0 || !value->
+ MessageType_WorkAroundCppLookupDefect::MergePartialFromCodedStream(input))
+ return false;
+ // Make sure that parsing stopped when the limit was hit, not at an endgroup
+ // tag.
+ return input->DecrementRecursionDepthAndPopLimit(p.first);
+}
+template<typename MessageType_WorkAroundCppLookupDefect>
+inline bool WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
+ io::CodedInputStream* input, MessageType_WorkAroundCppLookupDefect* value) {
+ io::CodedInputStream::Limit old_limit = input->ReadLengthAndPushLimit();
if (!value->
MessageType_WorkAroundCppLookupDefect::MergePartialFromCodedStream(input))
return false;
// Make sure that parsing stopped when the limit was hit, not at an endgroup
// tag.
- if (!input->ConsumedEntireMessage()) return false;
- input->PopLimit(limit);
- input->DecrementRecursionDepth();
- return true;
+ return input->CheckEntireMessageConsumedAndPopLimit(old_limit);
}
// ===================================================================
@@ -819,12 +835,14 @@
}
inline int WireFormatLite::StringSize(const string& value) {
- return io::CodedOutputStream::VarintSize32(value.size()) +
- value.size();
+ return static_cast<int>(
+ io::CodedOutputStream::VarintSize32(static_cast<uint32>(value.size())) +
+ value.size());
}
inline int WireFormatLite::BytesSize(const string& value) {
- return io::CodedOutputStream::VarintSize32(value.size()) +
- value.size();
+ return static_cast<int>(
+ io::CodedOutputStream::VarintSize32(static_cast<uint32>(value.size())) +
+ value.size());
}
diff --git a/darwin-x86_64/protoc/include/google/protobuf/wrappers.pb.h b/darwin-x86_64/protoc/include/google/protobuf/wrappers.pb.h
new file mode 100644
index 0000000..1078477
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/wrappers.pb.h
@@ -0,0 +1,1180 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/protobuf/wrappers.proto
+
+#ifndef PROTOBUF_google_2fprotobuf_2fwrappers_2eproto__INCLUDED
+#define PROTOBUF_google_2fprotobuf_2fwrappers_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 3000000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/arena.h>
+#include <google/protobuf/arenastring.h>
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/metadata.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/unknown_field_set.h>
+// @@protoc_insertion_point(includes)
+
+namespace google {
+namespace protobuf {
+
+// Internal implementation detail -- do not call these.
+void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fwrappers_2eproto();
+void protobuf_AssignDesc_google_2fprotobuf_2fwrappers_2eproto();
+void protobuf_ShutdownFile_google_2fprotobuf_2fwrappers_2eproto();
+
+class BoolValue;
+class BytesValue;
+class DoubleValue;
+class FloatValue;
+class Int32Value;
+class Int64Value;
+class StringValue;
+class UInt32Value;
+class UInt64Value;
+
+// ===================================================================
+
+class LIBPROTOBUF_EXPORT DoubleValue : public ::google::protobuf::Message {
+ public:
+ DoubleValue();
+ virtual ~DoubleValue();
+
+ DoubleValue(const DoubleValue& from);
+
+ inline DoubleValue& operator=(const DoubleValue& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
+ inline void* GetMaybeArenaPointer() const {
+ return MaybeArenaPtr();
+ }
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const DoubleValue& default_instance();
+
+ void UnsafeArenaSwap(DoubleValue* other);
+ void Swap(DoubleValue* other);
+
+ // implements Message ----------------------------------------------
+
+ inline DoubleValue* New() const { return New(NULL); }
+
+ DoubleValue* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const DoubleValue& from);
+ void MergeFrom(const DoubleValue& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(DoubleValue* other);
+ protected:
+ explicit DoubleValue(::google::protobuf::Arena* arena);
+ private:
+ static void ArenaDtor(void* object);
+ inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional double value = 1;
+ void clear_value();
+ static const int kValueFieldNumber = 1;
+ double value() const;
+ void set_value(double value);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.DoubleValue)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ friend class ::google::protobuf::Arena;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
+ bool _is_default_instance_;
+ double value_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fwrappers_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fwrappers_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fwrappers_2eproto();
+
+ void InitAsDefaultInstance();
+ static DoubleValue* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class LIBPROTOBUF_EXPORT FloatValue : public ::google::protobuf::Message {
+ public:
+ FloatValue();
+ virtual ~FloatValue();
+
+ FloatValue(const FloatValue& from);
+
+ inline FloatValue& operator=(const FloatValue& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
+ inline void* GetMaybeArenaPointer() const {
+ return MaybeArenaPtr();
+ }
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const FloatValue& default_instance();
+
+ void UnsafeArenaSwap(FloatValue* other);
+ void Swap(FloatValue* other);
+
+ // implements Message ----------------------------------------------
+
+ inline FloatValue* New() const { return New(NULL); }
+
+ FloatValue* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const FloatValue& from);
+ void MergeFrom(const FloatValue& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(FloatValue* other);
+ protected:
+ explicit FloatValue(::google::protobuf::Arena* arena);
+ private:
+ static void ArenaDtor(void* object);
+ inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional float value = 1;
+ void clear_value();
+ static const int kValueFieldNumber = 1;
+ float value() const;
+ void set_value(float value);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.FloatValue)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ friend class ::google::protobuf::Arena;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
+ bool _is_default_instance_;
+ float value_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fwrappers_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fwrappers_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fwrappers_2eproto();
+
+ void InitAsDefaultInstance();
+ static FloatValue* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class LIBPROTOBUF_EXPORT Int64Value : public ::google::protobuf::Message {
+ public:
+ Int64Value();
+ virtual ~Int64Value();
+
+ Int64Value(const Int64Value& from);
+
+ inline Int64Value& operator=(const Int64Value& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
+ inline void* GetMaybeArenaPointer() const {
+ return MaybeArenaPtr();
+ }
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const Int64Value& default_instance();
+
+ void UnsafeArenaSwap(Int64Value* other);
+ void Swap(Int64Value* other);
+
+ // implements Message ----------------------------------------------
+
+ inline Int64Value* New() const { return New(NULL); }
+
+ Int64Value* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const Int64Value& from);
+ void MergeFrom(const Int64Value& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(Int64Value* other);
+ protected:
+ explicit Int64Value(::google::protobuf::Arena* arena);
+ private:
+ static void ArenaDtor(void* object);
+ inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional int64 value = 1;
+ void clear_value();
+ static const int kValueFieldNumber = 1;
+ ::google::protobuf::int64 value() const;
+ void set_value(::google::protobuf::int64 value);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.Int64Value)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ friend class ::google::protobuf::Arena;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
+ bool _is_default_instance_;
+ ::google::protobuf::int64 value_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fwrappers_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fwrappers_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fwrappers_2eproto();
+
+ void InitAsDefaultInstance();
+ static Int64Value* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class LIBPROTOBUF_EXPORT UInt64Value : public ::google::protobuf::Message {
+ public:
+ UInt64Value();
+ virtual ~UInt64Value();
+
+ UInt64Value(const UInt64Value& from);
+
+ inline UInt64Value& operator=(const UInt64Value& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
+ inline void* GetMaybeArenaPointer() const {
+ return MaybeArenaPtr();
+ }
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const UInt64Value& default_instance();
+
+ void UnsafeArenaSwap(UInt64Value* other);
+ void Swap(UInt64Value* other);
+
+ // implements Message ----------------------------------------------
+
+ inline UInt64Value* New() const { return New(NULL); }
+
+ UInt64Value* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const UInt64Value& from);
+ void MergeFrom(const UInt64Value& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(UInt64Value* other);
+ protected:
+ explicit UInt64Value(::google::protobuf::Arena* arena);
+ private:
+ static void ArenaDtor(void* object);
+ inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional uint64 value = 1;
+ void clear_value();
+ static const int kValueFieldNumber = 1;
+ ::google::protobuf::uint64 value() const;
+ void set_value(::google::protobuf::uint64 value);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.UInt64Value)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ friend class ::google::protobuf::Arena;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
+ bool _is_default_instance_;
+ ::google::protobuf::uint64 value_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fwrappers_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fwrappers_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fwrappers_2eproto();
+
+ void InitAsDefaultInstance();
+ static UInt64Value* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class LIBPROTOBUF_EXPORT Int32Value : public ::google::protobuf::Message {
+ public:
+ Int32Value();
+ virtual ~Int32Value();
+
+ Int32Value(const Int32Value& from);
+
+ inline Int32Value& operator=(const Int32Value& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
+ inline void* GetMaybeArenaPointer() const {
+ return MaybeArenaPtr();
+ }
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const Int32Value& default_instance();
+
+ void UnsafeArenaSwap(Int32Value* other);
+ void Swap(Int32Value* other);
+
+ // implements Message ----------------------------------------------
+
+ inline Int32Value* New() const { return New(NULL); }
+
+ Int32Value* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const Int32Value& from);
+ void MergeFrom(const Int32Value& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(Int32Value* other);
+ protected:
+ explicit Int32Value(::google::protobuf::Arena* arena);
+ private:
+ static void ArenaDtor(void* object);
+ inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional int32 value = 1;
+ void clear_value();
+ static const int kValueFieldNumber = 1;
+ ::google::protobuf::int32 value() const;
+ void set_value(::google::protobuf::int32 value);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.Int32Value)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ friend class ::google::protobuf::Arena;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
+ bool _is_default_instance_;
+ ::google::protobuf::int32 value_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fwrappers_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fwrappers_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fwrappers_2eproto();
+
+ void InitAsDefaultInstance();
+ static Int32Value* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class LIBPROTOBUF_EXPORT UInt32Value : public ::google::protobuf::Message {
+ public:
+ UInt32Value();
+ virtual ~UInt32Value();
+
+ UInt32Value(const UInt32Value& from);
+
+ inline UInt32Value& operator=(const UInt32Value& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
+ inline void* GetMaybeArenaPointer() const {
+ return MaybeArenaPtr();
+ }
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const UInt32Value& default_instance();
+
+ void UnsafeArenaSwap(UInt32Value* other);
+ void Swap(UInt32Value* other);
+
+ // implements Message ----------------------------------------------
+
+ inline UInt32Value* New() const { return New(NULL); }
+
+ UInt32Value* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const UInt32Value& from);
+ void MergeFrom(const UInt32Value& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(UInt32Value* other);
+ protected:
+ explicit UInt32Value(::google::protobuf::Arena* arena);
+ private:
+ static void ArenaDtor(void* object);
+ inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional uint32 value = 1;
+ void clear_value();
+ static const int kValueFieldNumber = 1;
+ ::google::protobuf::uint32 value() const;
+ void set_value(::google::protobuf::uint32 value);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.UInt32Value)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ friend class ::google::protobuf::Arena;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
+ bool _is_default_instance_;
+ ::google::protobuf::uint32 value_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fwrappers_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fwrappers_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fwrappers_2eproto();
+
+ void InitAsDefaultInstance();
+ static UInt32Value* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class LIBPROTOBUF_EXPORT BoolValue : public ::google::protobuf::Message {
+ public:
+ BoolValue();
+ virtual ~BoolValue();
+
+ BoolValue(const BoolValue& from);
+
+ inline BoolValue& operator=(const BoolValue& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
+ inline void* GetMaybeArenaPointer() const {
+ return MaybeArenaPtr();
+ }
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const BoolValue& default_instance();
+
+ void UnsafeArenaSwap(BoolValue* other);
+ void Swap(BoolValue* other);
+
+ // implements Message ----------------------------------------------
+
+ inline BoolValue* New() const { return New(NULL); }
+
+ BoolValue* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const BoolValue& from);
+ void MergeFrom(const BoolValue& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(BoolValue* other);
+ protected:
+ explicit BoolValue(::google::protobuf::Arena* arena);
+ private:
+ static void ArenaDtor(void* object);
+ inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional bool value = 1;
+ void clear_value();
+ static const int kValueFieldNumber = 1;
+ bool value() const;
+ void set_value(bool value);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.BoolValue)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ friend class ::google::protobuf::Arena;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
+ bool _is_default_instance_;
+ bool value_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fwrappers_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fwrappers_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fwrappers_2eproto();
+
+ void InitAsDefaultInstance();
+ static BoolValue* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class LIBPROTOBUF_EXPORT StringValue : public ::google::protobuf::Message {
+ public:
+ StringValue();
+ virtual ~StringValue();
+
+ StringValue(const StringValue& from);
+
+ inline StringValue& operator=(const StringValue& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
+ inline void* GetMaybeArenaPointer() const {
+ return MaybeArenaPtr();
+ }
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const StringValue& default_instance();
+
+ void UnsafeArenaSwap(StringValue* other);
+ void Swap(StringValue* other);
+
+ // implements Message ----------------------------------------------
+
+ inline StringValue* New() const { return New(NULL); }
+
+ StringValue* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const StringValue& from);
+ void MergeFrom(const StringValue& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(StringValue* other);
+ protected:
+ explicit StringValue(::google::protobuf::Arena* arena);
+ private:
+ static void ArenaDtor(void* object);
+ inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional string value = 1;
+ void clear_value();
+ static const int kValueFieldNumber = 1;
+ const ::std::string& value() const;
+ void set_value(const ::std::string& value);
+ void set_value(const char* value);
+ void set_value(const char* value, size_t size);
+ ::std::string* mutable_value();
+ ::std::string* release_value();
+ void set_allocated_value(::std::string* value);
+ ::std::string* unsafe_arena_release_value();
+ void unsafe_arena_set_allocated_value(
+ ::std::string* value);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.StringValue)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ friend class ::google::protobuf::Arena;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
+ bool _is_default_instance_;
+ ::google::protobuf::internal::ArenaStringPtr value_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fwrappers_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fwrappers_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fwrappers_2eproto();
+
+ void InitAsDefaultInstance();
+ static StringValue* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class LIBPROTOBUF_EXPORT BytesValue : public ::google::protobuf::Message {
+ public:
+ BytesValue();
+ virtual ~BytesValue();
+
+ BytesValue(const BytesValue& from);
+
+ inline BytesValue& operator=(const BytesValue& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
+ inline void* GetMaybeArenaPointer() const {
+ return MaybeArenaPtr();
+ }
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const BytesValue& default_instance();
+
+ void UnsafeArenaSwap(BytesValue* other);
+ void Swap(BytesValue* other);
+
+ // implements Message ----------------------------------------------
+
+ inline BytesValue* New() const { return New(NULL); }
+
+ BytesValue* New(::google::protobuf::Arena* arena) const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const BytesValue& from);
+ void MergeFrom(const BytesValue& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ void InternalSwap(BytesValue* other);
+ protected:
+ explicit BytesValue(::google::protobuf::Arena* arena);
+ private:
+ static void ArenaDtor(void* object);
+ inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return _internal_metadata_.arena();
+ }
+ inline void* MaybeArenaPtr() const {
+ return _internal_metadata_.raw_arena_ptr();
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional bytes value = 1;
+ void clear_value();
+ static const int kValueFieldNumber = 1;
+ const ::std::string& value() const;
+ void set_value(const ::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* unsafe_arena_release_value();
+ void unsafe_arena_set_allocated_value(
+ ::std::string* value);
+
+ // @@protoc_insertion_point(class_scope:google.protobuf.BytesValue)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ friend class ::google::protobuf::Arena;
+ typedef void InternalArenaConstructable_;
+ typedef void DestructorSkippable_;
+ bool _is_default_instance_;
+ ::google::protobuf::internal::ArenaStringPtr value_;
+ mutable int _cached_size_;
+ friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fwrappers_2eproto();
+ friend void protobuf_AssignDesc_google_2fprotobuf_2fwrappers_2eproto();
+ friend void protobuf_ShutdownFile_google_2fprotobuf_2fwrappers_2eproto();
+
+ void InitAsDefaultInstance();
+ static BytesValue* default_instance_;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+#if !PROTOBUF_INLINE_NOT_IN_HEADERS
+// DoubleValue
+
+// optional double value = 1;
+inline void DoubleValue::clear_value() {
+ value_ = 0;
+}
+inline double DoubleValue::value() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.DoubleValue.value)
+ return value_;
+}
+inline void DoubleValue::set_value(double value) {
+
+ value_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.DoubleValue.value)
+}
+
+// -------------------------------------------------------------------
+
+// FloatValue
+
+// optional float value = 1;
+inline void FloatValue::clear_value() {
+ value_ = 0;
+}
+inline float FloatValue::value() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.FloatValue.value)
+ return value_;
+}
+inline void FloatValue::set_value(float value) {
+
+ value_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.FloatValue.value)
+}
+
+// -------------------------------------------------------------------
+
+// Int64Value
+
+// optional int64 value = 1;
+inline void Int64Value::clear_value() {
+ value_ = GOOGLE_LONGLONG(0);
+}
+inline ::google::protobuf::int64 Int64Value::value() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Int64Value.value)
+ return value_;
+}
+inline void Int64Value::set_value(::google::protobuf::int64 value) {
+
+ value_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.Int64Value.value)
+}
+
+// -------------------------------------------------------------------
+
+// UInt64Value
+
+// optional uint64 value = 1;
+inline void UInt64Value::clear_value() {
+ value_ = GOOGLE_ULONGLONG(0);
+}
+inline ::google::protobuf::uint64 UInt64Value::value() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.UInt64Value.value)
+ return value_;
+}
+inline void UInt64Value::set_value(::google::protobuf::uint64 value) {
+
+ value_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.UInt64Value.value)
+}
+
+// -------------------------------------------------------------------
+
+// Int32Value
+
+// optional int32 value = 1;
+inline void Int32Value::clear_value() {
+ value_ = 0;
+}
+inline ::google::protobuf::int32 Int32Value::value() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.Int32Value.value)
+ return value_;
+}
+inline void Int32Value::set_value(::google::protobuf::int32 value) {
+
+ value_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.Int32Value.value)
+}
+
+// -------------------------------------------------------------------
+
+// UInt32Value
+
+// optional uint32 value = 1;
+inline void UInt32Value::clear_value() {
+ value_ = 0u;
+}
+inline ::google::protobuf::uint32 UInt32Value::value() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.UInt32Value.value)
+ return value_;
+}
+inline void UInt32Value::set_value(::google::protobuf::uint32 value) {
+
+ value_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.UInt32Value.value)
+}
+
+// -------------------------------------------------------------------
+
+// BoolValue
+
+// optional bool value = 1;
+inline void BoolValue::clear_value() {
+ value_ = false;
+}
+inline bool BoolValue::value() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.BoolValue.value)
+ return value_;
+}
+inline void BoolValue::set_value(bool value) {
+
+ value_ = value;
+ // @@protoc_insertion_point(field_set:google.protobuf.BoolValue.value)
+}
+
+// -------------------------------------------------------------------
+
+// StringValue
+
+// optional string value = 1;
+inline void StringValue::clear_value() {
+ value_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
+}
+inline const ::std::string& StringValue::value() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.StringValue.value)
+ return value_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void StringValue::set_value(const ::std::string& value) {
+
+ value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
+ // @@protoc_insertion_point(field_set:google.protobuf.StringValue.value)
+}
+inline void StringValue::set_value(const char* value) {
+
+ value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
+ GetArenaNoVirtual());
+ // @@protoc_insertion_point(field_set_char:google.protobuf.StringValue.value)
+}
+inline void StringValue::set_value(const char* value,
+ size_t size) {
+
+ value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
+ reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.StringValue.value)
+}
+inline ::std::string* StringValue::mutable_value() {
+
+ // @@protoc_insertion_point(field_mutable:google.protobuf.StringValue.value)
+ return value_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
+}
+inline ::std::string* StringValue::release_value() {
+ // @@protoc_insertion_point(field_release:google.protobuf.StringValue.value)
+
+ return value_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
+}
+inline ::std::string* StringValue::unsafe_arena_release_value() {
+ // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.StringValue.value)
+ GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+
+ return value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ GetArenaNoVirtual());
+}
+inline void StringValue::set_allocated_value(::std::string* value) {
+ if (value != NULL) {
+
+ } else {
+
+ }
+ value_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value,
+ GetArenaNoVirtual());
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.StringValue.value)
+}
+inline void StringValue::unsafe_arena_set_allocated_value(
+ ::std::string* value) {
+ GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+ if (value != NULL) {
+
+ } else {
+
+ }
+ value_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ value, GetArenaNoVirtual());
+ // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.StringValue.value)
+}
+
+// -------------------------------------------------------------------
+
+// BytesValue
+
+// optional bytes value = 1;
+inline void BytesValue::clear_value() {
+ value_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
+}
+inline const ::std::string& BytesValue::value() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.BytesValue.value)
+ return value_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void BytesValue::set_value(const ::std::string& value) {
+
+ value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
+ // @@protoc_insertion_point(field_set:google.protobuf.BytesValue.value)
+}
+inline void BytesValue::set_value(const char* value) {
+
+ value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
+ GetArenaNoVirtual());
+ // @@protoc_insertion_point(field_set_char:google.protobuf.BytesValue.value)
+}
+inline void BytesValue::set_value(const void* value,
+ size_t size) {
+
+ value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
+ reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.BytesValue.value)
+}
+inline ::std::string* BytesValue::mutable_value() {
+
+ // @@protoc_insertion_point(field_mutable:google.protobuf.BytesValue.value)
+ return value_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
+}
+inline ::std::string* BytesValue::release_value() {
+ // @@protoc_insertion_point(field_release:google.protobuf.BytesValue.value)
+
+ return value_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
+}
+inline ::std::string* BytesValue::unsafe_arena_release_value() {
+ // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.BytesValue.value)
+ GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+
+ return value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ GetArenaNoVirtual());
+}
+inline void BytesValue::set_allocated_value(::std::string* value) {
+ if (value != NULL) {
+
+ } else {
+
+ }
+ value_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value,
+ GetArenaNoVirtual());
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.BytesValue.value)
+}
+inline void BytesValue::unsafe_arena_set_allocated_value(
+ ::std::string* value) {
+ GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+ if (value != NULL) {
+
+ } else {
+
+ }
+ value_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ value, GetArenaNoVirtual());
+ // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.BytesValue.value)
+}
+
+#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace protobuf
+} // namespace google
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_google_2fprotobuf_2fwrappers_2eproto__INCLUDED
diff --git a/darwin-x86_64/protoc/include/google/protobuf/wrappers.proto b/darwin-x86_64/protoc/include/google/protobuf/wrappers.proto
new file mode 100644
index 0000000..4828ad9
--- /dev/null
+++ b/darwin-x86_64/protoc/include/google/protobuf/wrappers.proto
@@ -0,0 +1,119 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Wrappers for primitive (non-message) types. These types are useful
+// for embedding primitives in the `google.protobuf.Any` type and for places
+// where we need to distinguish between the absence of a primitive
+// typed field and its default value.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option cc_enable_arenas = true;
+option go_package = "github.com/golang/protobuf/ptypes/wrappers";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "WrappersProto";
+option java_multiple_files = true;
+option java_generate_equals_and_hash = true;
+option objc_class_prefix = "GPB";
+
+// Wrapper message for `double`.
+//
+// The JSON representation for `DoubleValue` is JSON number.
+message DoubleValue {
+ // The double value.
+ double value = 1;
+}
+
+// Wrapper message for `float`.
+//
+// The JSON representation for `FloatValue` is JSON number.
+message FloatValue {
+ // The float value.
+ float value = 1;
+}
+
+// Wrapper message for `int64`.
+//
+// The JSON representation for `Int64Value` is JSON string.
+message Int64Value {
+ // The int64 value.
+ int64 value = 1;
+}
+
+// Wrapper message for `uint64`.
+//
+// The JSON representation for `UInt64Value` is JSON string.
+message UInt64Value {
+ // The uint64 value.
+ uint64 value = 1;
+}
+
+// Wrapper message for `int32`.
+//
+// The JSON representation for `Int32Value` is JSON number.
+message Int32Value {
+ // The int32 value.
+ int32 value = 1;
+}
+
+// Wrapper message for `uint32`.
+//
+// The JSON representation for `UInt32Value` is JSON number.
+message UInt32Value {
+ // The uint32 value.
+ uint32 value = 1;
+}
+
+// Wrapper message for `bool`.
+//
+// The JSON representation for `BoolValue` is JSON `true` and `false`.
+message BoolValue {
+ // The bool value.
+ bool value = 1;
+}
+
+// Wrapper message for `string`.
+//
+// The JSON representation for `StringValue` is JSON string.
+message StringValue {
+ // The string value.
+ string value = 1;
+}
+
+// Wrapper message for `bytes`.
+//
+// The JSON representation for `BytesValue` is JSON string.
+message BytesValue {
+ // The bytes value.
+ bytes value = 1;
+}
diff --git a/darwin-x86_64/protoc/lib/libprotobuf-lite.a b/darwin-x86_64/protoc/lib/libprotobuf-lite.a
index b4c1cca..3c2624d 100644
--- a/darwin-x86_64/protoc/lib/libprotobuf-lite.a
+++ b/darwin-x86_64/protoc/lib/libprotobuf-lite.a
Binary files differ
diff --git a/darwin-x86_64/protoc/lib/libprotobuf-lite.la b/darwin-x86_64/protoc/lib/libprotobuf-lite.la
old mode 100644
new mode 100755
index 97412eb..43d3a51
--- a/darwin-x86_64/protoc/lib/libprotobuf-lite.la
+++ b/darwin-x86_64/protoc/lib/libprotobuf-lite.la
@@ -1,5 +1,5 @@
# libprotobuf-lite.la - a libtool library file
-# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.7ubuntu1
+# Generated by libtool (GNU libtool) 2.4.6
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
@@ -13,7 +13,7 @@
# The name of the static archive.
old_library='libprotobuf-lite.a'
-# Linker flags that can not go in dependency_libs.
+# Linker flags that cannot go in dependency_libs.
inherited_linker_flags=' '
# Libraries that this one depends upon.
@@ -23,9 +23,9 @@
weak_library_names=''
# Version information for libprotobuf-lite.
-current=9
+current=10
age=0
-revision=1
+revision=0
# Is this an already installed library?
installed=yes
@@ -38,4 +38,4 @@
dlpreopen=''
# Directory that this library needs to be installed in:
-libdir='/tmp/proto/bits/lib'
+libdir='/tmp/protoc/lib'
diff --git a/darwin-x86_64/protoc/lib/libprotobuf.a b/darwin-x86_64/protoc/lib/libprotobuf.a
index 6775dd7..1c1393c 100644
--- a/darwin-x86_64/protoc/lib/libprotobuf.a
+++ b/darwin-x86_64/protoc/lib/libprotobuf.a
Binary files differ
diff --git a/darwin-x86_64/protoc/lib/libprotobuf.la b/darwin-x86_64/protoc/lib/libprotobuf.la
old mode 100644
new mode 100755
index ca3c4f0..866f489
--- a/darwin-x86_64/protoc/lib/libprotobuf.la
+++ b/darwin-x86_64/protoc/lib/libprotobuf.la
@@ -1,5 +1,5 @@
# libprotobuf.la - a libtool library file
-# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.7ubuntu1
+# Generated by libtool (GNU libtool) 2.4.6
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
@@ -13,7 +13,7 @@
# The name of the static archive.
old_library='libprotobuf.a'
-# Linker flags that can not go in dependency_libs.
+# Linker flags that cannot go in dependency_libs.
inherited_linker_flags=' '
# Libraries that this one depends upon.
@@ -23,9 +23,9 @@
weak_library_names=''
# Version information for libprotobuf.
-current=9
+current=10
age=0
-revision=1
+revision=0
# Is this an already installed library?
installed=yes
@@ -38,4 +38,4 @@
dlpreopen=''
# Directory that this library needs to be installed in:
-libdir='/tmp/proto/bits/lib'
+libdir='/tmp/protoc/lib'
diff --git a/darwin-x86_64/protoc/lib/libprotoc.a b/darwin-x86_64/protoc/lib/libprotoc.a
index 5fb4154..9d94da0 100644
--- a/darwin-x86_64/protoc/lib/libprotoc.a
+++ b/darwin-x86_64/protoc/lib/libprotoc.a
Binary files differ
diff --git a/darwin-x86_64/protoc/lib/libprotoc.la b/darwin-x86_64/protoc/lib/libprotoc.la
old mode 100644
new mode 100755
index 87d8e15..bba4c3d
--- a/darwin-x86_64/protoc/lib/libprotoc.la
+++ b/darwin-x86_64/protoc/lib/libprotoc.la
@@ -1,5 +1,5 @@
# libprotoc.la - a libtool library file
-# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.7ubuntu1
+# Generated by libtool (GNU libtool) 2.4.6
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
@@ -13,19 +13,19 @@
# The name of the static archive.
old_library='libprotoc.a'
-# Linker flags that can not go in dependency_libs.
+# Linker flags that cannot go in dependency_libs.
inherited_linker_flags=' '
# Libraries that this one depends upon.
-dependency_libs=' /tmp/proto/bits/lib/libprotobuf.la -lz'
+dependency_libs=' /tmp/protoc/lib/libprotobuf.la -lz'
# Names of additional weak libraries provided by this library
weak_library_names=''
# Version information for libprotoc.
-current=9
+current=10
age=0
-revision=1
+revision=0
# Is this an already installed library?
installed=yes
@@ -38,4 +38,4 @@
dlpreopen=''
# Directory that this library needs to be installed in:
-libdir='/tmp/proto/bits/lib'
+libdir='/tmp/protoc/lib'
diff --git a/darwin-x86_64/protoc/lib/pkgconfig/protobuf-lite.pc b/darwin-x86_64/protoc/lib/pkgconfig/protobuf-lite.pc
index 196c5c3..8ba734d 100644
--- a/darwin-x86_64/protoc/lib/pkgconfig/protobuf-lite.pc
+++ b/darwin-x86_64/protoc/lib/pkgconfig/protobuf-lite.pc
@@ -1,13 +1,11 @@
-prefix=/tmp/proto/bits
+prefix=/tmp/protoc
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: Protocol Buffers
Description: Google's Data Interchange Format
-Version: 2.6.1
+Version: 3.0.0-beta-3
Libs: -L${libdir} -lprotobuf-lite -D_THREAD_SAFE
Cflags: -I${includedir} -D_THREAD_SAFE
-# Commented out because it crashes pkg-config *sigh*:
-# http://bugs.freedesktop.org/show_bug.cgi?id=13265
-# Conflicts: protobuf
+Conflicts: protobuf
diff --git a/darwin-x86_64/protoc/lib/pkgconfig/protobuf.pc b/darwin-x86_64/protoc/lib/pkgconfig/protobuf.pc
index 13d41fa..6c0a462 100644
--- a/darwin-x86_64/protoc/lib/pkgconfig/protobuf.pc
+++ b/darwin-x86_64/protoc/lib/pkgconfig/protobuf.pc
@@ -1,14 +1,12 @@
-prefix=/tmp/proto/bits
+prefix=/tmp/protoc
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: Protocol Buffers
Description: Google's Data Interchange Format
-Version: 2.6.1
+Version: 3.0.0-beta-3
Libs: -L${libdir} -lprotobuf -D_THREAD_SAFE
Libs.private: -lz
Cflags: -I${includedir} -D_THREAD_SAFE
-# Commented out because it crashes pkg-config *sigh*:
-# http://bugs.freedesktop.org/show_bug.cgi?id=13265
-# Conflicts: protobuf-lite
+Conflicts: protobuf-lite
diff --git a/linux-x86_64/protoc/bin/protoc b/linux-x86_64/protoc/bin/protoc
index b0ac9a9..6f3a1b0 100755
--- a/linux-x86_64/protoc/bin/protoc
+++ b/linux-x86_64/protoc/bin/protoc
Binary files differ
diff --git a/linux-x86_64/protoc/include/google/protobuf/compiler/code_generator.h b/linux-x86_64/protoc/include/google/protobuf/compiler/code_generator.h
index 321a8cc..252f68d 100644
--- a/linux-x86_64/protoc/include/google/protobuf/compiler/code_generator.h
+++ b/linux-x86_64/protoc/include/google/protobuf/compiler/code_generator.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -104,9 +104,6 @@
// contain "." or ".." components.
virtual io::ZeroCopyOutputStream* Open(const string& filename) = 0;
- // Similar to Open() but the output will be appended to the file if exists
- virtual io::ZeroCopyOutputStream* OpenForAppend(const string& filename);
-
// Creates a ZeroCopyOutputStream which will insert code into the given file
// at the given insertion point. See plugin.proto (plugin.pb.h) for more
// information on insertion points. The default implementation
diff --git a/linux-x86_64/protoc/include/google/protobuf/compiler/command_line_interface.h b/linux-x86_64/protoc/include/google/protobuf/compiler/command_line_interface.h
index 47f2891..86ea9bd 100644
--- a/linux-x86_64/protoc/include/google/protobuf/compiler/command_line_interface.h
+++ b/linux-x86_64/protoc/include/google/protobuf/compiler/command_line_interface.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -48,9 +48,8 @@
namespace google {
namespace protobuf {
-class Descriptor; // descriptor.h
-class DescriptorPool; // descriptor.h
class FileDescriptor; // descriptor.h
+class DescriptorPool; // descriptor.h
class FileDescriptorProto; // descriptor.pb.h
template<typename T> class RepeatedPtrField; // repeated_field.h
@@ -260,22 +259,6 @@
set<const FileDescriptor*>* already_seen,
RepeatedPtrField<FileDescriptorProto>* output);
- // Implements the --print_free_field_numbers. This function prints free field
- // numbers into stdout for the message and it's nested message types in
- // post-order, i.e. nested types first. Printed range are left-right
- // inclusive, i.e. [a, b].
- //
- // Groups:
- // For historical reasons, groups are considered to share the same
- // field number space with the parent message, thus it will not print free
- // field numbers for groups. The field numbers used in the groups are
- // excluded in the free field numbers of the parent message.
- //
- // Extension Ranges:
- // Extension ranges are considered ocuppied field numbers and they will not be
- // listed as free numbers in the output.
- void PrintFreeFieldNumbers(const Descriptor* descriptor);
-
// -----------------------------------------------------------------
// The name of the executable as invoked (i.e. argv[0]).
@@ -312,19 +295,11 @@
enum Mode {
MODE_COMPILE, // Normal mode: parse .proto files and compile them.
MODE_ENCODE, // --encode: read text from stdin, write binary to stdout.
- MODE_DECODE, // --decode: read binary from stdin, write text to stdout.
- MODE_PRINT, // Print mode: print info of the given .proto files and exit.
+ MODE_DECODE // --decode: read binary from stdin, write text to stdout.
};
Mode mode_;
- enum PrintMode {
- PRINT_NONE, // Not in MODE_PRINT
- PRINT_FREE_FIELDS, // --print_free_fields
- };
-
- PrintMode print_mode_;
-
enum ErrorFormat {
ERROR_FORMAT_GCC, // GCC error output format (default).
ERROR_FORMAT_MSVS // Visual Studio output (--error_format=msvs).
diff --git a/linux-x86_64/protoc/include/google/protobuf/compiler/cpp/cpp_generator.h b/linux-x86_64/protoc/include/google/protobuf/compiler/cpp/cpp_generator.h
index 3d517cf..a90e84d 100644
--- a/linux-x86_64/protoc/include/google/protobuf/compiler/cpp/cpp_generator.h
+++ b/linux-x86_64/protoc/include/google/protobuf/compiler/cpp/cpp_generator.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
diff --git a/linux-x86_64/protoc/include/google/protobuf/compiler/importer.h b/linux-x86_64/protoc/include/google/protobuf/compiler/importer.h
index f010fd0..7a62fa0 100644
--- a/linux-x86_64/protoc/include/google/protobuf/compiler/importer.h
+++ b/linux-x86_64/protoc/include/google/protobuf/compiler/importer.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -166,9 +166,6 @@
return &pool_;
}
- void AddUnusedImportTrackFile(const string& file_name);
- void ClearUnusedImportTrackFiles();
-
private:
SourceTreeDescriptorDatabase database_;
DescriptorPool pool_;
@@ -207,13 +204,6 @@
// contain "." or ".." components.
virtual io::ZeroCopyInputStream* Open(const string& filename) = 0;
- // If Open() returns NULL, calling this method immediately will return an
- // description of the error.
- // Subclasses should implement this method and return a meaningful value for
- // better error reporting.
- // TODO(xiaofeng): change this to a pure virtual function.
- virtual string GetLastErrorMessage();
-
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(SourceTree);
};
@@ -283,9 +273,7 @@
bool VirtualFileToDiskFile(const string& virtual_file, string* disk_file);
// implements SourceTree -------------------------------------------
- virtual io::ZeroCopyInputStream* Open(const string& filename);
-
- virtual string GetLastErrorMessage();
+ io::ZeroCopyInputStream* Open(const string& filename);
private:
struct Mapping {
@@ -297,7 +285,6 @@
: virtual_path(virtual_path_param), disk_path(disk_path_param) {}
};
vector<Mapping> mappings_;
- string last_error_message_;
// Like Open(), but returns the on-disk path in disk_file if disk_file is
// non-NULL and the file could be successfully opened.
diff --git a/linux-x86_64/protoc/include/google/protobuf/compiler/java/java_generator.h b/linux-x86_64/protoc/include/google/protobuf/compiler/java/java_generator.h
index 47f76be..888b8d8 100644
--- a/linux-x86_64/protoc/include/google/protobuf/compiler/java/java_generator.h
+++ b/linux-x86_64/protoc/include/google/protobuf/compiler/java/java_generator.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
diff --git a/linux-x86_64/protoc/include/google/protobuf/compiler/parser.h b/linux-x86_64/protoc/include/google/protobuf/compiler/parser.h
index d0a2359..cfd3649 100644
--- a/linux-x86_64/protoc/include/google/protobuf/compiler/parser.h
+++ b/linux-x86_64/protoc/include/google/protobuf/compiler/parser.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -40,6 +40,7 @@
#include <map>
#include <string>
#include <utility>
+#include <google/protobuf/stubs/common.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/descriptor.pb.h>
#include <google/protobuf/repeated_field.h>
@@ -232,9 +233,6 @@
// location to the given token instead.
void StartAt(const io::Tokenizer::Token& token);
- // Start at the same location as some other LocationRecorder.
- void StartAt(const LocationRecorder& other);
-
// By default the location is considered to end at the previous token at
// the time the LocationRecorder is destroyed. EndAt() sets the end
// location to the given token instead.
@@ -286,50 +284,38 @@
// Parse various language high-level language construrcts.
bool ParseMessageDefinition(DescriptorProto* message,
- const LocationRecorder& message_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& message_location);
bool ParseEnumDefinition(EnumDescriptorProto* enum_type,
- const LocationRecorder& enum_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& enum_location);
bool ParseServiceDefinition(ServiceDescriptorProto* service,
- const LocationRecorder& service_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& service_location);
bool ParsePackage(FileDescriptorProto* file,
- const LocationRecorder& root_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& root_location);
bool ParseImport(RepeatedPtrField<string>* dependency,
RepeatedField<int32>* public_dependency,
RepeatedField<int32>* weak_dependency,
- const LocationRecorder& root_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& root_location);
bool ParseOption(Message* options,
- const LocationRecorder& options_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& options_location);
// These methods parse the contents of a message, enum, or service type and
// add them to the given object. They consume the entire block including
// the beginning and ending brace.
bool ParseMessageBlock(DescriptorProto* message,
- const LocationRecorder& message_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& message_location);
bool ParseEnumBlock(EnumDescriptorProto* enum_type,
- const LocationRecorder& enum_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& enum_location);
bool ParseServiceBlock(ServiceDescriptorProto* service,
- const LocationRecorder& service_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& service_location);
// Parse one statement within a message, enum, or service block, inclunding
// final semicolon.
bool ParseMessageStatement(DescriptorProto* message,
- const LocationRecorder& message_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& message_location);
bool ParseEnumStatement(EnumDescriptorProto* message,
- const LocationRecorder& enum_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& enum_location);
bool ParseServiceStatement(ServiceDescriptorProto* message,
- const LocationRecorder& service_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& service_location);
// Parse a field of a message. If the field is a group, its type will be
// added to "messages".
@@ -343,22 +329,11 @@
RepeatedPtrField<DescriptorProto>* messages,
const LocationRecorder& parent_location,
int location_field_number_for_nested_type,
- const LocationRecorder& field_location,
- const FileDescriptorProto* containing_file);
-
- // Like ParseMessageField() but expects the label has already been filled in
- // by the caller.
- bool ParseMessageFieldNoLabel(FieldDescriptorProto* field,
- RepeatedPtrField<DescriptorProto>* messages,
- const LocationRecorder& parent_location,
- int location_field_number_for_nested_type,
- const LocationRecorder& field_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& field_location);
// Parse an "extensions" declaration.
bool ParseExtensions(DescriptorProto* message,
- const LocationRecorder& extensions_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& extensions_location);
// Parse an "extend" declaration. (See also comments for
// ParseMessageField().)
@@ -366,46 +341,30 @@
RepeatedPtrField<DescriptorProto>* messages,
const LocationRecorder& parent_location,
int location_field_number_for_nested_type,
- const LocationRecorder& extend_location,
- const FileDescriptorProto* containing_file);
-
- // Parse a "oneof" declaration. The caller is responsible for setting
- // oneof_decl->label() since it will have had to parse the label before it
- // knew it was parsing a oneof.
- bool ParseOneof(OneofDescriptorProto* oneof_decl,
- DescriptorProto* containing_type,
- int oneof_index,
- const LocationRecorder& oneof_location,
- const LocationRecorder& containing_type_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& extend_location);
// Parse a single enum value within an enum block.
bool ParseEnumConstant(EnumValueDescriptorProto* enum_value,
- const LocationRecorder& enum_value_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& enum_value_location);
// Parse enum constant options, i.e. the list in square brackets at the end
// of the enum constant value definition.
bool ParseEnumConstantOptions(EnumValueDescriptorProto* value,
- const LocationRecorder& enum_value_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& enum_value_location);
// Parse a single method within a service definition.
bool ParseServiceMethod(MethodDescriptorProto* method,
- const LocationRecorder& method_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& method_location);
// Parse options of a single method or stream.
bool ParseOptions(const LocationRecorder& parent_location,
- const FileDescriptorProto* containing_file,
const int optionsFieldNumber,
Message* mutable_options);
// Parse "required", "optional", or "repeated" and fill in "label"
// with the value.
- bool ParseLabel(FieldDescriptorProto::Label* label,
- const FileDescriptorProto* containing_file);
+ bool ParseLabel(FieldDescriptorProto::Label* label);
// Parse a type name and fill in "type" (if it is a primitive) or
// "type_name" (if it is not) with the type parsed.
@@ -418,14 +377,12 @@
// Parses field options, i.e. the stuff in square brackets at the end
// of a field definition. Also parses default value.
bool ParseFieldOptions(FieldDescriptorProto* field,
- const LocationRecorder& field_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& field_location);
// Parse the "default" option. This needs special handling because its
// type is the field's type.
bool ParseDefaultAssignment(FieldDescriptorProto* field,
- const LocationRecorder& field_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& field_location);
enum OptionStyle {
OPTION_ASSIGNMENT, // just "name = value"
@@ -437,7 +394,6 @@
// is set to the parsed value.
bool ParseOption(Message* options,
const LocationRecorder& options_location,
- const FileDescriptorProto* containing_file,
OptionStyle style);
// Parses a single part of a multipart option name. A multipart name consists
@@ -445,8 +401,7 @@
// of identifiers separated by dots and enclosed in parentheses. E.g.,
// "foo.(bar.baz).qux".
bool ParseOptionNamePart(UninterpretedOption* uninterpreted_option,
- const LocationRecorder& part_location,
- const FileDescriptorProto* containing_file);
+ const LocationRecorder& part_location);
// Parses a string surrounded by balanced braces. Strips off the outer
// braces and stores the enclosed string in *value.
diff --git a/linux-x86_64/protoc/include/google/protobuf/compiler/plugin.h b/linux-x86_64/protoc/include/google/protobuf/compiler/plugin.h
index 679f9bd..6fa2de1 100644
--- a/linux-x86_64/protoc/include/google/protobuf/compiler/plugin.h
+++ b/linux-x86_64/protoc/include/google/protobuf/compiler/plugin.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
diff --git a/linux-x86_64/protoc/include/google/protobuf/compiler/plugin.pb.h b/linux-x86_64/protoc/include/google/protobuf/compiler/plugin.pb.h
index 65634da..68cc21c 100644
--- a/linux-x86_64/protoc/include/google/protobuf/compiler/plugin.pb.h
+++ b/linux-x86_64/protoc/include/google/protobuf/compiler/plugin.pb.h
@@ -8,12 +8,12 @@
#include <google/protobuf/stubs/common.h>
-#if GOOGLE_PROTOBUF_VERSION < 2006000
+#if GOOGLE_PROTOBUF_VERSION < 2005000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 2006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
@@ -89,6 +89,7 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -142,11 +143,13 @@
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::google::protobuf::RepeatedPtrField< ::std::string> file_to_generate_;
::std::string* parameter_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto > proto_file_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
+
friend void LIBPROTOC_EXPORT protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
@@ -203,6 +206,7 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -256,11 +260,13 @@
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::std::string* name_;
::std::string* insertion_point_;
::std::string* content_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
+
friend void LIBPROTOC_EXPORT protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
@@ -317,6 +323,7 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -356,10 +363,12 @@
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::std::string* error_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File > file_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
+
friend void LIBPROTOC_EXPORT protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
@@ -382,49 +391,39 @@
file_to_generate_.Clear();
}
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) {
- // @@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) {
- // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
file_to_generate_.Mutable(index)->assign(value);
}
inline void CodeGeneratorRequest::set_file_to_generate(int index, const char* value) {
file_to_generate_.Mutable(index)->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
inline void CodeGeneratorRequest::set_file_to_generate(int index, const char* value, size_t size) {
file_to_generate_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
inline ::std::string* CodeGeneratorRequest::add_file_to_generate() {
return file_to_generate_.Add();
}
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)
}
inline void CodeGeneratorRequest::add_file_to_generate(const char* value) {
file_to_generate_.Add()->assign(value);
- // @@protoc_insertion_point(field_add_char:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
inline void CodeGeneratorRequest::add_file_to_generate(const char* value, size_t size) {
file_to_generate_.Add()->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_add_pointer:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
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>*
CodeGeneratorRequest::mutable_file_to_generate() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
return &file_to_generate_;
}
@@ -439,59 +438,54 @@
_has_bits_[0] &= ~0x00000002u;
}
inline void CodeGeneratorRequest::clear_parameter() {
- if (parameter_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (parameter_ != &::google::protobuf::internal::kEmptyString) {
parameter_->clear();
}
clear_has_parameter();
}
inline const ::std::string& CodeGeneratorRequest::parameter() const {
- // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.parameter)
return *parameter_;
}
inline void CodeGeneratorRequest::set_parameter(const ::std::string& value) {
set_has_parameter();
- if (parameter_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (parameter_ == &::google::protobuf::internal::kEmptyString) {
parameter_ = new ::std::string;
}
parameter_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorRequest.parameter)
}
inline void CodeGeneratorRequest::set_parameter(const char* value) {
set_has_parameter();
- if (parameter_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (parameter_ == &::google::protobuf::internal::kEmptyString) {
parameter_ = new ::std::string;
}
parameter_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorRequest.parameter)
}
inline void CodeGeneratorRequest::set_parameter(const char* value, size_t size) {
set_has_parameter();
- if (parameter_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (parameter_ == &::google::protobuf::internal::kEmptyString) {
parameter_ = new ::std::string;
}
parameter_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorRequest.parameter)
}
inline ::std::string* CodeGeneratorRequest::mutable_parameter() {
set_has_parameter();
- if (parameter_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (parameter_ == &::google::protobuf::internal::kEmptyString) {
parameter_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.parameter)
return parameter_;
}
inline ::std::string* CodeGeneratorRequest::release_parameter() {
clear_has_parameter();
- if (parameter_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (parameter_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = parameter_;
- parameter_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ parameter_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void CodeGeneratorRequest::set_allocated_parameter(::std::string* parameter) {
- if (parameter_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (parameter_ != &::google::protobuf::internal::kEmptyString) {
delete parameter_;
}
if (parameter) {
@@ -499,9 +493,8 @@
parameter_ = parameter;
} else {
clear_has_parameter();
- parameter_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ parameter_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorRequest.parameter)
}
// repeated .google.protobuf.FileDescriptorProto proto_file = 15;
@@ -512,25 +505,20 @@
proto_file_.Clear();
}
inline const ::google::protobuf::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::mutable_proto_file(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.proto_file)
return proto_file_.Mutable(index);
}
inline ::google::protobuf::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 >&
CodeGeneratorRequest::proto_file() const {
- // @@protoc_insertion_point(field_list:google.protobuf.compiler.CodeGeneratorRequest.proto_file)
return proto_file_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >*
CodeGeneratorRequest::mutable_proto_file() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorRequest.proto_file)
return &proto_file_;
}
@@ -549,59 +537,54 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void CodeGeneratorResponse_File::clear_name() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
name_->clear();
}
clear_has_name();
}
inline const ::std::string& CodeGeneratorResponse_File::name() const {
- // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.name)
return *name_;
}
inline void CodeGeneratorResponse_File::set_name(const ::std::string& value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.name)
}
inline void CodeGeneratorResponse_File::set_name(const char* value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(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) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.File.name)
}
inline ::std::string* CodeGeneratorResponse_File::mutable_name() {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.name)
return name_;
}
inline ::std::string* CodeGeneratorResponse_File::release_name() {
clear_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = name_;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void CodeGeneratorResponse_File::set_allocated_name(::std::string* name) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
delete name_;
}
if (name) {
@@ -609,9 +592,8 @@
name_ = name;
} else {
clear_has_name();
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.name)
}
// optional string insertion_point = 2;
@@ -625,59 +607,54 @@
_has_bits_[0] &= ~0x00000002u;
}
inline void CodeGeneratorResponse_File::clear_insertion_point() {
- if (insertion_point_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (insertion_point_ != &::google::protobuf::internal::kEmptyString) {
insertion_point_->clear();
}
clear_has_insertion_point();
}
inline const ::std::string& CodeGeneratorResponse_File::insertion_point() const {
- // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
return *insertion_point_;
}
inline void CodeGeneratorResponse_File::set_insertion_point(const ::std::string& value) {
set_has_insertion_point();
- if (insertion_point_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (insertion_point_ == &::google::protobuf::internal::kEmptyString) {
insertion_point_ = new ::std::string;
}
insertion_point_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
}
inline void CodeGeneratorResponse_File::set_insertion_point(const char* value) {
set_has_insertion_point();
- if (insertion_point_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (insertion_point_ == &::google::protobuf::internal::kEmptyString) {
insertion_point_ = new ::std::string;
}
insertion_point_->assign(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) {
set_has_insertion_point();
- if (insertion_point_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (insertion_point_ == &::google::protobuf::internal::kEmptyString) {
insertion_point_ = new ::std::string;
}
insertion_point_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
}
inline ::std::string* CodeGeneratorResponse_File::mutable_insertion_point() {
set_has_insertion_point();
- if (insertion_point_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (insertion_point_ == &::google::protobuf::internal::kEmptyString) {
insertion_point_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
return insertion_point_;
}
inline ::std::string* CodeGeneratorResponse_File::release_insertion_point() {
clear_has_insertion_point();
- if (insertion_point_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (insertion_point_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = insertion_point_;
- insertion_point_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ insertion_point_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void CodeGeneratorResponse_File::set_allocated_insertion_point(::std::string* insertion_point) {
- if (insertion_point_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (insertion_point_ != &::google::protobuf::internal::kEmptyString) {
delete insertion_point_;
}
if (insertion_point) {
@@ -685,9 +662,8 @@
insertion_point_ = insertion_point;
} else {
clear_has_insertion_point();
- insertion_point_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ insertion_point_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
}
// optional string content = 15;
@@ -701,59 +677,54 @@
_has_bits_[0] &= ~0x00000004u;
}
inline void CodeGeneratorResponse_File::clear_content() {
- if (content_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (content_ != &::google::protobuf::internal::kEmptyString) {
content_->clear();
}
clear_has_content();
}
inline const ::std::string& CodeGeneratorResponse_File::content() const {
- // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.content)
return *content_;
}
inline void CodeGeneratorResponse_File::set_content(const ::std::string& value) {
set_has_content();
- if (content_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (content_ == &::google::protobuf::internal::kEmptyString) {
content_ = new ::std::string;
}
content_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.content)
}
inline void CodeGeneratorResponse_File::set_content(const char* value) {
set_has_content();
- if (content_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (content_ == &::google::protobuf::internal::kEmptyString) {
content_ = new ::std::string;
}
content_->assign(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) {
set_has_content();
- if (content_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (content_ == &::google::protobuf::internal::kEmptyString) {
content_ = new ::std::string;
}
content_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.File.content)
}
inline ::std::string* CodeGeneratorResponse_File::mutable_content() {
set_has_content();
- if (content_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (content_ == &::google::protobuf::internal::kEmptyString) {
content_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.content)
return content_;
}
inline ::std::string* CodeGeneratorResponse_File::release_content() {
clear_has_content();
- if (content_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (content_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = content_;
- content_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ content_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void CodeGeneratorResponse_File::set_allocated_content(::std::string* content) {
- if (content_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (content_ != &::google::protobuf::internal::kEmptyString) {
delete content_;
}
if (content) {
@@ -761,9 +732,8 @@
content_ = content;
} else {
clear_has_content();
- content_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ content_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.content)
}
// -------------------------------------------------------------------
@@ -781,59 +751,54 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void CodeGeneratorResponse::clear_error() {
- if (error_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (error_ != &::google::protobuf::internal::kEmptyString) {
error_->clear();
}
clear_has_error();
}
inline const ::std::string& CodeGeneratorResponse::error() const {
- // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.error)
return *error_;
}
inline void CodeGeneratorResponse::set_error(const ::std::string& value) {
set_has_error();
- if (error_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (error_ == &::google::protobuf::internal::kEmptyString) {
error_ = new ::std::string;
}
error_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.error)
}
inline void CodeGeneratorResponse::set_error(const char* value) {
set_has_error();
- if (error_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (error_ == &::google::protobuf::internal::kEmptyString) {
error_ = new ::std::string;
}
error_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorResponse.error)
}
inline void CodeGeneratorResponse::set_error(const char* value, size_t size) {
set_has_error();
- if (error_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (error_ == &::google::protobuf::internal::kEmptyString) {
error_ = new ::std::string;
}
error_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.error)
}
inline ::std::string* CodeGeneratorResponse::mutable_error() {
set_has_error();
- if (error_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (error_ == &::google::protobuf::internal::kEmptyString) {
error_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.error)
return error_;
}
inline ::std::string* CodeGeneratorResponse::release_error() {
clear_has_error();
- if (error_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (error_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = error_;
- error_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void CodeGeneratorResponse::set_allocated_error(::std::string* error) {
- if (error_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (error_ != &::google::protobuf::internal::kEmptyString) {
delete error_;
}
if (error) {
@@ -841,9 +806,8 @@
error_ = error;
} else {
clear_has_error();
- error_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.error)
}
// repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
@@ -854,25 +818,20 @@
file_.Clear();
}
inline const ::google::protobuf::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::mutable_file(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.file)
return file_.Mutable(index);
}
inline ::google::protobuf::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 >&
CodeGeneratorResponse::file() const {
- // @@protoc_insertion_point(field_list:google.protobuf.compiler.CodeGeneratorResponse.file)
return file_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File >*
CodeGeneratorResponse::mutable_file() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorResponse.file)
return &file_;
}
diff --git a/linux-x86_64/protoc/include/google/protobuf/compiler/plugin.proto b/linux-x86_64/protoc/include/google/protobuf/compiler/plugin.proto
index b65379d..77b888f 100644
--- a/linux-x86_64/protoc/include/google/protobuf/compiler/plugin.proto
+++ b/linux-x86_64/protoc/include/google/protobuf/compiler/plugin.proto
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
diff --git a/linux-x86_64/protoc/include/google/protobuf/compiler/python/python_generator.h b/linux-x86_64/protoc/include/google/protobuf/compiler/python/python_generator.h
index f86e9ea..a3f22ce 100644
--- a/linux-x86_64/protoc/include/google/protobuf/compiler/python/python_generator.h
+++ b/linux-x86_64/protoc/include/google/protobuf/compiler/python/python_generator.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -94,11 +94,8 @@
void PrintNestedDescriptors(const Descriptor& containing_descriptor) const;
void PrintMessages() const;
- void PrintMessage(const Descriptor& message_descriptor, const string& prefix,
- vector<string>* to_register) const;
- void PrintNestedMessages(const Descriptor& containing_descriptor,
- const string& prefix,
- vector<string>* to_register) const;
+ void PrintMessage(const Descriptor& message_descriptor) const;
+ void PrintNestedMessages(const Descriptor& containing_descriptor) const;
void FixForeignFieldsInDescriptors() const;
void FixForeignFieldsInDescriptor(
@@ -108,8 +105,6 @@
const FieldDescriptor& field,
const string& python_dict_name) const;
void AddMessageToFileDescriptor(const Descriptor& descriptor) const;
- void AddEnumToFileDescriptor(const EnumDescriptor& descriptor) const;
- void AddExtensionToFileDescriptor(const FieldDescriptor& descriptor) const;
string FieldReferencingExpression(const Descriptor* containing_type,
const FieldDescriptor& field,
const string& python_dict_name) const;
diff --git a/linux-x86_64/protoc/include/google/protobuf/descriptor.h b/linux-x86_64/protoc/include/google/protobuf/descriptor.h
index 67afc77..33e3af7 100644
--- a/linux-x86_64/protoc/include/google/protobuf/descriptor.h
+++ b/linux-x86_64/protoc/include/google/protobuf/descriptor.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -54,11 +54,14 @@
#ifndef GOOGLE_PROTOBUF_DESCRIPTOR_H__
#define GOOGLE_PROTOBUF_DESCRIPTOR_H__
-#include <set>
#include <string>
#include <vector>
#include <google/protobuf/stubs/common.h>
+// TYPE_BOOL is defined in the MacOS's ConditionalMacros.h.
+#ifdef TYPE_BOOL
+#undef TYPE_BOOL
+#endif // TYPE_BOOL
namespace google {
namespace protobuf {
@@ -66,7 +69,6 @@
// Defined in this file.
class Descriptor;
class FieldDescriptor;
-class OneofDescriptor;
class EnumDescriptor;
class EnumValueDescriptor;
class ServiceDescriptor;
@@ -78,7 +80,6 @@
// Defined in descriptor.proto
class DescriptorProto;
class FieldDescriptorProto;
-class OneofDescriptorProto;
class EnumDescriptorProto;
class EnumValueDescriptorProto;
class ServiceDescriptorProto;
@@ -162,11 +163,6 @@
// will be suitable for re-parsing.
string DebugString() const;
- // Returns true if this is a placeholder for an unknown type. This will
- // only be the case if this descriptor comes from a DescriptorPool
- // with AllowUnknownDependencies() set.
- bool is_placeholder() const;
-
// Field stuff -----------------------------------------------------
// The number of fields in this message type.
@@ -194,15 +190,6 @@
const FieldDescriptor* FindFieldByCamelcaseName(
const string& camelcase_name) const;
- // The number of oneofs in this message type.
- int oneof_decl_count() const;
- // Get a oneof by index, where 0 <= index < oneof_decl_count().
- // These are returned in the order they were defined in the .proto file.
- const OneofDescriptor* oneof_decl(int index) const;
-
- // Looks up a oneof by name. Returns NULL if no such oneof exists.
- const OneofDescriptor* FindOneofByName(const string& name) const;
-
// Nested type stuff -----------------------------------------------
// The number of nested types in this message type.
@@ -249,9 +236,6 @@
// Returns true if the number is in one of the extension ranges.
bool IsExtensionNumber(int number) const;
- // Returns NULL if no extension range contains the given number.
- const ExtensionRange* FindExtensionRangeContainingNumber(int number) const;
-
// The number of extensions -- extending *other* messages -- that were
// defined nested within this message type's scope.
int extension_count() const;
@@ -302,8 +286,6 @@
int field_count_;
FieldDescriptor* fields_;
- int oneof_decl_count_;
- OneofDescriptor* oneof_decls_;
int nested_type_count_;
Descriptor* nested_types_;
int enum_type_count_;
@@ -321,7 +303,6 @@
friend class DescriptorBuilder;
friend class EnumDescriptor;
friend class FieldDescriptor;
- friend class OneofDescriptor;
friend class MethodDescriptor;
friend class FileDescriptor;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Descriptor);
@@ -492,13 +473,6 @@
// this is the extended type. Never NULL.
const Descriptor* containing_type() const;
- // If the field is a member of a oneof, this is the one, otherwise this is
- // NULL.
- const OneofDescriptor* containing_oneof() const;
-
- // If the field is a member of a oneof, returns the index in that oneof.
- int index_in_oneof() const;
-
// An extension may be declared within the scope of another message. If this
// field is an extension (is_extension() is true), then extension_scope()
// returns that message, or NULL if the extension was declared at global
@@ -507,10 +481,10 @@
const Descriptor* extension_scope() const;
// If type is TYPE_MESSAGE or TYPE_GROUP, returns a descriptor for the
- // message or the group type. Otherwise, returns null.
+ // message or the group type. Otherwise, undefined.
const Descriptor* message_type() const;
// If type is TYPE_ENUM, returns a descriptor for the enum. Otherwise,
- // returns null.
+ // undefined.
const EnumDescriptor* enum_type() const;
// EXPERIMENTAL; DO NOT USE.
@@ -536,12 +510,6 @@
// Helper method to get the CppType for a particular Type.
static CppType TypeToCppType(Type type);
- // Helper method to get the name of a Type.
- static const char* TypeName(Type type);
-
- // Helper method to get the name of a CppType.
- static const char* CppTypeName(CppType cpp_type);
-
// Return true iff [packed = true] is valid for fields of this type.
static inline bool IsTypePackable(Type field_type);
@@ -556,9 +524,7 @@
typedef FieldOptions OptionsType;
// See Descriptor::DebugString().
- enum PrintLabelFlag { PRINT_LABEL, OMIT_LABEL };
- void DebugString(int depth, PrintLabelFlag print_label_flag,
- string* contents) const;
+ void DebugString(int depth, string *contents) 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
@@ -578,9 +544,7 @@
Type type_;
Label label_;
bool is_extension_;
- int index_in_oneof_;
const Descriptor* containing_type_;
- const OneofDescriptor* containing_oneof_;
const Descriptor* extension_scope_;
const Descriptor* message_type_;
const EnumDescriptor* enum_type_;
@@ -617,66 +581,9 @@
friend class DescriptorBuilder;
friend class FileDescriptor;
friend class Descriptor;
- friend class OneofDescriptor;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldDescriptor);
};
-// Describes a oneof defined in a message type.
-class LIBPROTOBUF_EXPORT OneofDescriptor {
- public:
- const string& name() const; // Name of this oneof.
- const string& full_name() const; // Fully-qualified name of the oneof.
-
- // Index of this oneof within the message's oneof array.
- int index() const;
-
- // The Descriptor for the message containing this oneof.
- const Descriptor* containing_type() const;
-
- // The number of (non-extension) fields which are members of this oneof.
- int field_count() const;
- // Get a member of this oneof, in the order in which they were declared in the
- // .proto file. Does not include extensions.
- const FieldDescriptor* field(int index) const;
-
- // See Descriptor::CopyTo().
- void CopyTo(OneofDescriptorProto* proto) const;
-
- // See Descriptor::DebugString().
- string DebugString() const;
-
- // Source Location ---------------------------------------------------
-
- // Updates |*out_location| to the source location of the complete
- // extent of this oneof declaration. Returns false and leaves
- // |*out_location| unchanged iff location information was not available.
- bool GetSourceLocation(SourceLocation* out_location) const;
-
- private:
- // See Descriptor::DebugString().
- void DebugString(int depth, string* contents) const;
-
- // Walks up the descriptor tree to generate the source location path
- // to this descriptor from the file root.
- void GetLocationPath(vector<int>* output) const;
-
- const string* name_;
- const string* full_name_;
- const Descriptor* containing_type_;
- bool is_extendable_;
- int field_count_;
- const FieldDescriptor** fields_;
- // IMPORTANT: If you add a new field, make sure to search for all instances
- // of Allocate<OneofDescriptor>() and AllocateArray<OneofDescriptor>()
- // in descriptor.cc and update them to initialize the field.
-
- // Must be constructed using DescriptorPool.
- OneofDescriptor() {}
- friend class DescriptorBuilder;
- friend class Descriptor;
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(OneofDescriptor);
-};
-
// Describes an enum type defined in a .proto file. To get the EnumDescriptor
// for a generated enum type, call TypeName_descriptor(). Use DescriptorPool
// to construct your own descriptors.
@@ -723,11 +630,6 @@
// See Descriptor::DebugString().
string DebugString() const;
- // Returns true if this is a placeholder for an unknown enum. This will
- // only be the case if this descriptor comes from a DescriptorPool
- // with AllowUnknownDependencies() set.
- bool is_placeholder() const;
-
// Source Location ---------------------------------------------------
// Updates |*out_location| to the source location of the complete
@@ -1082,11 +984,6 @@
// See Descriptor::DebugString().
string DebugString() const;
- // Returns true if this is a placeholder for an unknown file. This will
- // only be the case if this descriptor comes from a DescriptorPool
- // with AllowUnknownDependencies() set.
- bool is_placeholder() const;
-
private:
// Source Location ---------------------------------------------------
@@ -1116,7 +1013,6 @@
int service_count_;
ServiceDescriptor* services_;
int extension_count_;
- bool is_placeholder_;
FieldDescriptor* extensions_;
const FileOptions* options_;
@@ -1130,7 +1026,6 @@
friend class DescriptorBuilder;
friend class Descriptor;
friend class FieldDescriptor;
- friend class OneofDescriptor;
friend class EnumDescriptor;
friend class EnumValueDescriptor;
friend class MethodDescriptor;
@@ -1188,10 +1083,6 @@
// to GOOGLE_LOG(ERROR). Remember that files are built on-demand, so this
// ErrorCollector may be called from any thread that calls one of the
// Find*By*() methods.
- // - The DescriptorDatabase must not be mutated during the lifetime of
- // the DescriptorPool. Even if the client takes care to avoid data races,
- // changes to the content of the DescriptorDatabase may not be reflected
- // in subsequent lookups in the DescriptorPool.
class ErrorCollector;
explicit DescriptorPool(DescriptorDatabase* fallback_database,
ErrorCollector* error_collector = NULL);
@@ -1222,7 +1113,6 @@
const Descriptor* FindMessageTypeByName(const string& name) const;
const FieldDescriptor* FindFieldByName(const string& name) const;
const FieldDescriptor* FindExtensionByName(const string& name) const;
- const OneofDescriptor* FindOneofByName(const string& name) const;
const EnumDescriptor* FindEnumTypeByName(const string& name) const;
const EnumValueDescriptor* FindEnumValueByName(const string& name) const;
const ServiceDescriptor* FindServiceByName(const string& name) const;
@@ -1267,8 +1157,7 @@
OTHER // some other problem
};
- // Reports an error in the FileDescriptorProto. Use this function if the
- // problem occured should interrupt building the FileDescriptorProto.
+ // Reports an error in the FileDescriptorProto.
virtual void AddError(
const string& filename, // File name in which the error occurred.
const string& element_name, // Full name of the erroneous element.
@@ -1277,16 +1166,6 @@
const string& message // Human-readable error message.
) = 0;
- // Reports a warning in the FileDescriptorProto. Use this function if the
- // problem occured should NOT interrupt building the FileDescriptorProto.
- virtual void AddWarning(
- const string& filename, // File name in which the error occurred.
- const 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 string& message // Human-readable error message.
- ) {}
-
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ErrorCollector);
};
@@ -1307,8 +1186,7 @@
// to types or other files that are not found in the DescriptorPool (or its
// backing DescriptorDatabase, if any). If you call
// AllowUnknownDependencies(), however, then unknown types and files
- // will be replaced by placeholder descriptors (which can be identified by
- // the is_placeholder() method). This can allow you to
+ // will be replaced by placeholder descriptors. This can allow you to
// perform some useful operations with a .proto file even if you do not
// have access to other .proto files on which it depends. However, some
// heuristics must be used to fill in the gaps in information, and these
@@ -1317,15 +1195,10 @@
// or an enum, as well as what package it resides in. Furthermore,
// placeholder types will not be discoverable via FindMessageTypeByName()
// and similar methods, which could confuse some descriptor-based algorithms.
- // Generally, the results of this option should be handled with extreme care.
+ // Generally, the results of this option should only be relied upon for
+ // debugging purposes.
void AllowUnknownDependencies() { allow_unknown_ = true; }
- // By default, weak imports are allowed to be missing, in which case we will
- // use a placeholder for the dependency and convert the field to be an Empty
- // message field. If you call EnforceWeakDependencies(true), however, the
- // DescriptorPool will report a import not found error.
- void EnforceWeakDependencies(bool enforce) { enforce_weak_ = enforce; }
-
// Internal stuff --------------------------------------------------
// These methods MUST NOT be called from outside the proto2 library.
// These methods may contain hidden pitfalls and may be removed in a
@@ -1381,12 +1254,6 @@
// lazy descriptor initialization behavior.
bool InternalIsFileLoaded(const 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 string& file_name);
- void ClearUnusedImportTrackFiles();
-
private:
friend class Descriptor;
friend class FieldDescriptor;
@@ -1431,8 +1298,6 @@
bool enforce_dependencies_;
bool allow_unknown_;
- bool enforce_weak_;
- std::set<string> unused_import_track_files_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DescriptorPool);
};
@@ -1460,12 +1325,10 @@
PROTOBUF_DEFINE_ACCESSOR(Descriptor, containing_type, const Descriptor*)
PROTOBUF_DEFINE_ACCESSOR(Descriptor, field_count, int)
-PROTOBUF_DEFINE_ACCESSOR(Descriptor, oneof_decl_count, int)
PROTOBUF_DEFINE_ACCESSOR(Descriptor, nested_type_count, int)
PROTOBUF_DEFINE_ACCESSOR(Descriptor, enum_type_count, int)
PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, field, const FieldDescriptor*)
-PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, oneof_decl, const OneofDescriptor*)
PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, nested_type, const Descriptor*)
PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, enum_type, const EnumDescriptor*)
@@ -1475,8 +1338,7 @@
const Descriptor::ExtensionRange*)
PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, extension,
const FieldDescriptor*)
-PROTOBUF_DEFINE_OPTIONS_ACCESSOR(Descriptor, MessageOptions);
-PROTOBUF_DEFINE_ACCESSOR(Descriptor, is_placeholder, bool)
+PROTOBUF_DEFINE_OPTIONS_ACCESSOR(Descriptor, MessageOptions)
PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, name)
PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, full_name)
@@ -1488,9 +1350,6 @@
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, type, FieldDescriptor::Type)
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, label, FieldDescriptor::Label)
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, containing_type, const Descriptor*)
-PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, containing_oneof,
- const OneofDescriptor*)
-PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, index_in_oneof, int)
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, extension_scope, const Descriptor*)
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, message_type, const Descriptor*)
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, enum_type, const EnumDescriptor*)
@@ -1509,11 +1368,6 @@
const EnumValueDescriptor*)
PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, default_value_string)
-PROTOBUF_DEFINE_STRING_ACCESSOR(OneofDescriptor, name)
-PROTOBUF_DEFINE_STRING_ACCESSOR(OneofDescriptor, full_name)
-PROTOBUF_DEFINE_ACCESSOR(OneofDescriptor, containing_type, const Descriptor*)
-PROTOBUF_DEFINE_ACCESSOR(OneofDescriptor, field_count, int)
-
PROTOBUF_DEFINE_STRING_ACCESSOR(EnumDescriptor, name)
PROTOBUF_DEFINE_STRING_ACCESSOR(EnumDescriptor, full_name)
PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, file, const FileDescriptor*)
@@ -1521,8 +1375,7 @@
PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, value_count, int)
PROTOBUF_DEFINE_ARRAY_ACCESSOR(EnumDescriptor, value,
const EnumValueDescriptor*)
-PROTOBUF_DEFINE_OPTIONS_ACCESSOR(EnumDescriptor, EnumOptions);
-PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, is_placeholder, bool)
+PROTOBUF_DEFINE_OPTIONS_ACCESSOR(EnumDescriptor, EnumOptions)
PROTOBUF_DEFINE_STRING_ACCESSOR(EnumValueDescriptor, name)
PROTOBUF_DEFINE_STRING_ACCESSOR(EnumValueDescriptor, full_name)
@@ -1536,14 +1389,14 @@
PROTOBUF_DEFINE_ACCESSOR(ServiceDescriptor, method_count, int)
PROTOBUF_DEFINE_ARRAY_ACCESSOR(ServiceDescriptor, method,
const MethodDescriptor*)
-PROTOBUF_DEFINE_OPTIONS_ACCESSOR(ServiceDescriptor, ServiceOptions);
+PROTOBUF_DEFINE_OPTIONS_ACCESSOR(ServiceDescriptor, ServiceOptions)
PROTOBUF_DEFINE_STRING_ACCESSOR(MethodDescriptor, name)
PROTOBUF_DEFINE_STRING_ACCESSOR(MethodDescriptor, full_name)
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, service, const ServiceDescriptor*)
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, input_type, const Descriptor*)
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, output_type, const Descriptor*)
-PROTOBUF_DEFINE_OPTIONS_ACCESSOR(MethodDescriptor, MethodOptions);
+PROTOBUF_DEFINE_OPTIONS_ACCESSOR(MethodDescriptor, MethodOptions)
PROTOBUF_DEFINE_STRING_ACCESSOR(FileDescriptor, name)
PROTOBUF_DEFINE_STRING_ACCESSOR(FileDescriptor, package)
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, pool, const DescriptorPool*)
@@ -1554,8 +1407,7 @@
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, enum_type_count, int)
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, service_count, int)
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, extension_count, int)
-PROTOBUF_DEFINE_OPTIONS_ACCESSOR(FileDescriptor, FileOptions);
-PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, is_placeholder, bool)
+PROTOBUF_DEFINE_OPTIONS_ACCESSOR(FileDescriptor, FileOptions)
PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, message_type, const Descriptor*)
PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, enum_type, const EnumDescriptor*)
@@ -1570,10 +1422,6 @@
// A few accessors differ from the macros...
-inline bool Descriptor::IsExtensionNumber(int number) const {
- return FindExtensionRangeContainingNumber(number) != NULL;
-}
-
inline bool FieldDescriptor::is_required() const {
return label() == LABEL_REQUIRED;
}
@@ -1594,44 +1442,40 @@
// in the parent's array of children.
inline int FieldDescriptor::index() const {
if (!is_extension_) {
- return static_cast<int>(this - containing_type_->fields_);
+ return this - containing_type_->fields_;
} else if (extension_scope_ != NULL) {
- return static_cast<int>(this - extension_scope_->extensions_);
+ return this - extension_scope_->extensions_;
} else {
- return static_cast<int>(this - file_->extensions_);
+ return this - file_->extensions_;
}
}
inline int Descriptor::index() const {
if (containing_type_ == NULL) {
- return static_cast<int>(this - file_->message_types_);
+ return this - file_->message_types_;
} else {
- return static_cast<int>(this - containing_type_->nested_types_);
+ return this - containing_type_->nested_types_;
}
}
-inline int OneofDescriptor::index() const {
- return static_cast<int>(this - containing_type_->oneof_decls_);
-}
-
inline int EnumDescriptor::index() const {
if (containing_type_ == NULL) {
- return static_cast<int>(this - file_->enum_types_);
+ return this - file_->enum_types_;
} else {
- return static_cast<int>(this - containing_type_->enum_types_);
+ return this - containing_type_->enum_types_;
}
}
inline int EnumValueDescriptor::index() const {
- return static_cast<int>(this - type_->values_);
+ return this - type_->values_;
}
inline int ServiceDescriptor::index() const {
- return static_cast<int>(this - file_->services_);
+ return this - file_->services_;
}
inline int MethodDescriptor::index() const {
- return static_cast<int>(this - service_->methods_);
+ return this - service_->methods_;
}
inline const char* FieldDescriptor::type_name() const {
@@ -1650,14 +1494,6 @@
return kTypeToCppTypeMap[type];
}
-inline const char* FieldDescriptor::TypeName(Type type) {
- return kTypeToName[type];
-}
-
-inline const char* FieldDescriptor::CppTypeName(CppType cpp_type) {
- return kCppTypeToName[cpp_type];
-}
-
inline bool FieldDescriptor::IsTypePackable(Type field_type) {
return (field_type != FieldDescriptor::TYPE_STRING &&
field_type != FieldDescriptor::TYPE_GROUP &&
@@ -1679,12 +1515,6 @@
return dependencies_[weak_dependencies_[index]];
}
-// Can't use PROTOBUF_DEFINE_ARRAY_ACCESSOR because fields_ is actually an array
-// of pointers rather than the usual array of objects.
-inline const FieldDescriptor* OneofDescriptor::field(int index) const {
- return fields_[index];
-}
-
} // namespace protobuf
} // namespace google
diff --git a/linux-x86_64/protoc/include/google/protobuf/descriptor.pb.h b/linux-x86_64/protoc/include/google/protobuf/descriptor.pb.h
index 4552181..07cf807 100644
--- a/linux-x86_64/protoc/include/google/protobuf/descriptor.pb.h
+++ b/linux-x86_64/protoc/include/google/protobuf/descriptor.pb.h
@@ -8,12 +8,12 @@
#include <google/protobuf/stubs/common.h>
-#if GOOGLE_PROTOBUF_VERSION < 2006000
+#if GOOGLE_PROTOBUF_VERSION < 2005000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 2006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
@@ -40,7 +40,6 @@
class DescriptorProto;
class DescriptorProto_ExtensionRange;
class FieldDescriptorProto;
-class OneofDescriptorProto;
class EnumDescriptorProto;
class EnumValueDescriptorProto;
class ServiceDescriptorProto;
@@ -201,6 +200,7 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -224,9 +224,11 @@
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto > file_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
+
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -283,6 +285,7 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -432,8 +435,6 @@
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::std::string* name_;
::std::string* package_;
::google::protobuf::RepeatedPtrField< ::std::string> dependency_;
@@ -445,6 +446,10 @@
::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto > extension_;
::google::protobuf::FileOptions* options_;
::google::protobuf::SourceCodeInfo* source_code_info_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(11 + 31) / 32];
+
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -501,6 +506,7 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -530,10 +536,12 @@
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::google::protobuf::int32 start_;
::google::protobuf::int32 end_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
+
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -590,6 +598,7 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -670,18 +679,6 @@
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >*
mutable_extension_range();
- // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
- inline int oneof_decl_size() const;
- inline void clear_oneof_decl();
- static const int kOneofDeclFieldNumber = 8;
- inline const ::google::protobuf::OneofDescriptorProto& oneof_decl(int index) const;
- inline ::google::protobuf::OneofDescriptorProto* mutable_oneof_decl(int index);
- inline ::google::protobuf::OneofDescriptorProto* add_oneof_decl();
- inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >&
- oneof_decl() const;
- inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >*
- mutable_oneof_decl();
-
// optional .google.protobuf.MessageOptions options = 7;
inline bool has_options() const;
inline void clear_options();
@@ -700,16 +697,17 @@
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::std::string* name_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto > field_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto > extension_;
::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::OneofDescriptorProto > oneof_decl_;
::google::protobuf::MessageOptions* options_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(7 + 31) / 32];
+
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -766,6 +764,7 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -906,13 +905,6 @@
inline ::std::string* release_default_value();
inline void set_allocated_default_value(::std::string* default_value);
- // optional int32 oneof_index = 9;
- inline bool has_oneof_index() const;
- inline void clear_oneof_index();
- static const int kOneofIndexFieldNumber = 9;
- inline ::google::protobuf::int32 oneof_index() const;
- inline void set_oneof_index(::google::protobuf::int32 value);
-
// optional .google.protobuf.FieldOptions options = 8;
inline bool has_options() const;
inline void clear_options();
@@ -938,24 +930,23 @@
inline void clear_has_extendee();
inline void set_has_default_value();
inline void clear_has_default_value();
- inline void set_has_oneof_index();
- inline void clear_has_oneof_index();
inline void set_has_options();
inline void clear_has_options();
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::std::string* name_;
::google::protobuf::int32 number_;
int label_;
::std::string* type_name_;
::std::string* extendee_;
- int type_;
- ::google::protobuf::int32 oneof_index_;
::std::string* default_value_;
::google::protobuf::FieldOptions* options_;
+ int type_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(8 + 31) / 32];
+
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -965,90 +956,6 @@
};
// -------------------------------------------------------------------
-class LIBPROTOBUF_EXPORT OneofDescriptorProto : public ::google::protobuf::Message {
- public:
- OneofDescriptorProto();
- virtual ~OneofDescriptorProto();
-
- OneofDescriptorProto(const OneofDescriptorProto& from);
-
- inline OneofDescriptorProto& operator=(const OneofDescriptorProto& from) {
- CopyFrom(from);
- return *this;
- }
-
- inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
- return _unknown_fields_;
- }
-
- inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
- return &_unknown_fields_;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const OneofDescriptorProto& default_instance();
-
- void Swap(OneofDescriptorProto* other);
-
- // implements Message ----------------------------------------------
-
- OneofDescriptorProto* New() const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const OneofDescriptorProto& from);
- void MergeFrom(const OneofDescriptorProto& from);
- void Clear();
- bool IsInitialized() const;
-
- int ByteSize() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- public:
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional string name = 1;
- inline bool has_name() const;
- inline void clear_name();
- static const int kNameFieldNumber = 1;
- inline const ::std::string& name() const;
- inline void set_name(const ::std::string& value);
- inline void set_name(const char* value);
- inline void set_name(const char* value, size_t size);
- inline ::std::string* mutable_name();
- inline ::std::string* release_name();
- inline void set_allocated_name(::std::string* name);
-
- // @@protoc_insertion_point(class_scope:google.protobuf.OneofDescriptorProto)
- private:
- inline void set_has_name();
- inline void clear_has_name();
-
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
-
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
- ::std::string* name_;
- friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
- friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
- friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
-
- void InitAsDefaultInstance();
- static OneofDescriptorProto* default_instance_;
-};
-// -------------------------------------------------------------------
-
class LIBPROTOBUF_EXPORT EnumDescriptorProto : public ::google::protobuf::Message {
public:
EnumDescriptorProto();
@@ -1096,6 +1003,7 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -1144,11 +1052,13 @@
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::std::string* name_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto > value_;
::google::protobuf::EnumOptions* options_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
+
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -1205,6 +1115,7 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -1250,11 +1161,13 @@
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::std::string* name_;
::google::protobuf::EnumValueOptions* options_;
::google::protobuf::int32 number_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
+
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -1311,6 +1224,7 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -1359,11 +1273,13 @@
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::std::string* name_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto > method_;
::google::protobuf::ServiceOptions* options_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
+
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -1420,6 +1336,7 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -1484,12 +1401,14 @@
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::std::string* name_;
::std::string* input_type_;
::std::string* output_type_;
::google::protobuf::MethodOptions* options_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32];
+
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -1546,6 +1465,7 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -1615,13 +1535,6 @@
inline bool java_generate_equals_and_hash() const;
inline void set_java_generate_equals_and_hash(bool value);
- // optional bool java_string_check_utf8 = 27 [default = false];
- inline bool has_java_string_check_utf8() const;
- inline void clear_java_string_check_utf8();
- static const int kJavaStringCheckUtf8FieldNumber = 27;
- inline bool java_string_check_utf8() const;
- inline void set_java_string_check_utf8(bool value);
-
// optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
inline bool has_optimize_for() const;
inline void clear_optimize_for();
@@ -1662,13 +1575,6 @@
inline bool py_generic_services() const;
inline void set_py_generic_services(bool value);
- // optional bool deprecated = 23 [default = false];
- inline bool has_deprecated() const;
- inline void clear_deprecated();
- static const int kDeprecatedFieldNumber = 23;
- inline bool deprecated() const;
- inline void set_deprecated(bool value);
-
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int uninterpreted_option_size() const;
inline void clear_uninterpreted_option();
@@ -1692,8 +1598,6 @@
inline void clear_has_java_multiple_files();
inline void set_has_java_generate_equals_and_hash();
inline void clear_has_java_generate_equals_and_hash();
- inline void set_has_java_string_check_utf8();
- inline void clear_has_java_string_check_utf8();
inline void set_has_optimize_for();
inline void clear_has_optimize_for();
inline void set_has_go_package();
@@ -1704,27 +1608,25 @@
inline void clear_has_java_generic_services();
inline void set_has_py_generic_services();
inline void clear_has_py_generic_services();
- inline void set_has_deprecated();
- inline void clear_has_deprecated();
::google::protobuf::internal::ExtensionSet _extensions_;
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::std::string* java_package_;
::std::string* java_outer_classname_;
+ int optimize_for_;
bool java_multiple_files_;
bool java_generate_equals_and_hash_;
- bool java_string_check_utf8_;
bool cc_generic_services_;
- int optimize_for_;
+ bool java_generic_services_;
::std::string* go_package_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_;
- bool java_generic_services_;
bool py_generic_services_;
- bool deprecated_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(10 + 31) / 32];
+
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -1781,6 +1683,7 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -1801,13 +1704,6 @@
inline bool no_standard_descriptor_accessor() const;
inline void set_no_standard_descriptor_accessor(bool value);
- // optional bool deprecated = 3 [default = false];
- inline bool has_deprecated() const;
- inline void clear_deprecated();
- static const int kDeprecatedFieldNumber = 3;
- inline bool deprecated() const;
- inline void set_deprecated(bool value);
-
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int uninterpreted_option_size() const;
inline void clear_uninterpreted_option();
@@ -1827,19 +1723,18 @@
inline void clear_has_message_set_wire_format();
inline void set_has_no_standard_descriptor_accessor();
inline void clear_has_no_standard_descriptor_accessor();
- inline void set_has_deprecated();
- inline void clear_has_deprecated();
::google::protobuf::internal::ExtensionSet _extensions_;
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_;
bool message_set_wire_format_;
bool no_standard_descriptor_accessor_;
- bool deprecated_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
+
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -1896,6 +1791,7 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -2006,8 +1902,6 @@
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
int ctype_;
bool packed_;
bool lazy_;
@@ -2015,6 +1909,10 @@
bool weak_;
::std::string* experimental_map_key_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(7 + 31) / 32];
+
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -2071,26 +1969,20 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
- // optional bool allow_alias = 2;
+ // optional bool allow_alias = 2 [default = true];
inline bool has_allow_alias() const;
inline void clear_allow_alias();
static const int kAllowAliasFieldNumber = 2;
inline bool allow_alias() const;
inline void set_allow_alias(bool value);
- // optional bool deprecated = 3 [default = false];
- inline bool has_deprecated() const;
- inline void clear_deprecated();
- static const int kDeprecatedFieldNumber = 3;
- inline bool deprecated() const;
- inline void set_deprecated(bool value);
-
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int uninterpreted_option_size() const;
inline void clear_uninterpreted_option();
@@ -2108,18 +2000,17 @@
private:
inline void set_has_allow_alias();
inline void clear_has_allow_alias();
- inline void set_has_deprecated();
- inline void clear_has_deprecated();
::google::protobuf::internal::ExtensionSet _extensions_;
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_;
bool allow_alias_;
- bool deprecated_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
+
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -2176,19 +2067,13 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
- // optional bool deprecated = 1 [default = false];
- inline bool has_deprecated() const;
- inline void clear_deprecated();
- static const int kDeprecatedFieldNumber = 1;
- inline bool deprecated() const;
- inline void set_deprecated(bool value);
-
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int uninterpreted_option_size() const;
inline void clear_uninterpreted_option();
@@ -2204,17 +2089,16 @@
GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(EnumValueOptions)
// @@protoc_insertion_point(class_scope:google.protobuf.EnumValueOptions)
private:
- inline void set_has_deprecated();
- inline void clear_has_deprecated();
::google::protobuf::internal::ExtensionSet _extensions_;
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_;
- bool deprecated_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
+
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -2271,19 +2155,13 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
- // optional bool deprecated = 33 [default = false];
- inline bool has_deprecated() const;
- inline void clear_deprecated();
- static const int kDeprecatedFieldNumber = 33;
- inline bool deprecated() const;
- inline void set_deprecated(bool value);
-
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int uninterpreted_option_size() const;
inline void clear_uninterpreted_option();
@@ -2299,17 +2177,16 @@
GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(ServiceOptions)
// @@protoc_insertion_point(class_scope:google.protobuf.ServiceOptions)
private:
- inline void set_has_deprecated();
- inline void clear_has_deprecated();
::google::protobuf::internal::ExtensionSet _extensions_;
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_;
- bool deprecated_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
+
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -2366,19 +2243,13 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
- // optional bool deprecated = 33 [default = false];
- inline bool has_deprecated() const;
- inline void clear_deprecated();
- static const int kDeprecatedFieldNumber = 33;
- inline bool deprecated() const;
- inline void set_deprecated(bool value);
-
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int uninterpreted_option_size() const;
inline void clear_uninterpreted_option();
@@ -2394,17 +2265,16 @@
GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(MethodOptions)
// @@protoc_insertion_point(class_scope:google.protobuf.MethodOptions)
private:
- inline void set_has_deprecated();
- inline void clear_has_deprecated();
::google::protobuf::internal::ExtensionSet _extensions_;
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_;
- bool deprecated_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
+
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -2461,6 +2331,7 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -2495,10 +2366,12 @@
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::std::string* name_part_;
bool is_extension_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
+
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -2555,6 +2428,7 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -2649,8 +2523,6 @@
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart > name_;
::std::string* identifier_value_;
::google::protobuf::uint64 positive_int_value_;
@@ -2658,6 +2530,10 @@
double double_value_;
::std::string* string_value_;
::std::string* aggregate_value_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(7 + 31) / 32];
+
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -2714,6 +2590,7 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -2777,14 +2654,16 @@
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::google::protobuf::RepeatedField< ::google::protobuf::int32 > path_;
mutable int _path_cached_byte_size_;
::google::protobuf::RepeatedField< ::google::protobuf::int32 > span_;
mutable int _span_cached_byte_size_;
::std::string* leading_comments_;
::std::string* trailing_comments_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32];
+
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -2841,6 +2720,7 @@
void SharedDtor();
void SetCachedSize(int size) const;
public:
+
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@@ -2866,9 +2746,11 @@
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::google::protobuf::uint32 _has_bits_[1];
- mutable int _cached_size_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location > location_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
+
friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto();
friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto();
@@ -2891,25 +2773,20 @@
file_.Clear();
}
inline const ::google::protobuf::FileDescriptorProto& FileDescriptorSet::file(int index) const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorSet.file)
return file_.Get(index);
}
inline ::google::protobuf::FileDescriptorProto* FileDescriptorSet::mutable_file(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorSet.file)
return file_.Mutable(index);
}
inline ::google::protobuf::FileDescriptorProto* FileDescriptorSet::add_file() {
- // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorSet.file)
return file_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >&
FileDescriptorSet::file() const {
- // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorSet.file)
return file_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >*
FileDescriptorSet::mutable_file() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorSet.file)
return &file_;
}
@@ -2928,59 +2805,54 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void FileDescriptorProto::clear_name() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
name_->clear();
}
clear_has_name();
}
inline const ::std::string& FileDescriptorProto::name() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.name)
return *name_;
}
inline void FileDescriptorProto::set_name(const ::std::string& value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.name)
}
inline void FileDescriptorProto::set_name(const char* value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.name)
}
inline void FileDescriptorProto::set_name(const char* value, size_t size) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.name)
}
inline ::std::string* FileDescriptorProto::mutable_name() {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.name)
return name_;
}
inline ::std::string* FileDescriptorProto::release_name() {
clear_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = name_;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void FileDescriptorProto::set_allocated_name(::std::string* name) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
delete name_;
}
if (name) {
@@ -2988,9 +2860,8 @@
name_ = name;
} else {
clear_has_name();
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.name)
}
// optional string package = 2;
@@ -3004,59 +2875,54 @@
_has_bits_[0] &= ~0x00000002u;
}
inline void FileDescriptorProto::clear_package() {
- if (package_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (package_ != &::google::protobuf::internal::kEmptyString) {
package_->clear();
}
clear_has_package();
}
inline const ::std::string& FileDescriptorProto::package() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.package)
return *package_;
}
inline void FileDescriptorProto::set_package(const ::std::string& value) {
set_has_package();
- if (package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (package_ == &::google::protobuf::internal::kEmptyString) {
package_ = new ::std::string;
}
package_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.package)
}
inline void FileDescriptorProto::set_package(const char* value) {
set_has_package();
- if (package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (package_ == &::google::protobuf::internal::kEmptyString) {
package_ = new ::std::string;
}
package_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.package)
}
inline void FileDescriptorProto::set_package(const char* value, size_t size) {
set_has_package();
- if (package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (package_ == &::google::protobuf::internal::kEmptyString) {
package_ = new ::std::string;
}
package_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.package)
}
inline ::std::string* FileDescriptorProto::mutable_package() {
set_has_package();
- if (package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (package_ == &::google::protobuf::internal::kEmptyString) {
package_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.package)
return package_;
}
inline ::std::string* FileDescriptorProto::release_package() {
clear_has_package();
- if (package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (package_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = package_;
- package_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ package_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void FileDescriptorProto::set_allocated_package(::std::string* package) {
- if (package_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (package_ != &::google::protobuf::internal::kEmptyString) {
delete package_;
}
if (package) {
@@ -3064,9 +2930,8 @@
package_ = package;
} else {
clear_has_package();
- package_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ package_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.package)
}
// repeated string dependency = 3;
@@ -3077,49 +2942,39 @@
dependency_.Clear();
}
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) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.dependency)
return dependency_.Mutable(index);
}
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);
}
inline void FileDescriptorProto::set_dependency(int index, const char* value) {
dependency_.Mutable(index)->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.dependency)
}
inline void FileDescriptorProto::set_dependency(int index, const char* value, size_t size) {
dependency_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.dependency)
}
inline ::std::string* FileDescriptorProto::add_dependency() {
return dependency_.Add();
}
inline void FileDescriptorProto::add_dependency(const ::std::string& value) {
dependency_.Add()->assign(value);
- // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.dependency)
}
inline void FileDescriptorProto::add_dependency(const char* value) {
dependency_.Add()->assign(value);
- // @@protoc_insertion_point(field_add_char:google.protobuf.FileDescriptorProto.dependency)
}
inline void FileDescriptorProto::add_dependency(const char* value, size_t size) {
dependency_.Add()->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_add_pointer:google.protobuf.FileDescriptorProto.dependency)
}
inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
FileDescriptorProto::dependency() const {
- // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.dependency)
return dependency_;
}
inline ::google::protobuf::RepeatedPtrField< ::std::string>*
FileDescriptorProto::mutable_dependency() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.dependency)
return &dependency_;
}
@@ -3131,25 +2986,20 @@
public_dependency_.Clear();
}
inline ::google::protobuf::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) {
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) {
public_dependency_.Add(value);
- // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.public_dependency)
}
inline const ::google::protobuf::RepeatedField< ::google::protobuf::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 >*
FileDescriptorProto::mutable_public_dependency() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.public_dependency)
return &public_dependency_;
}
@@ -3161,25 +3011,20 @@
weak_dependency_.Clear();
}
inline ::google::protobuf::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) {
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) {
weak_dependency_.Add(value);
- // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.weak_dependency)
}
inline const ::google::protobuf::RepeatedField< ::google::protobuf::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 >*
FileDescriptorProto::mutable_weak_dependency() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.weak_dependency)
return &weak_dependency_;
}
@@ -3191,25 +3036,20 @@
message_type_.Clear();
}
inline const ::google::protobuf::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::mutable_message_type(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.message_type)
return message_type_.Mutable(index);
}
inline ::google::protobuf::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 >&
FileDescriptorProto::message_type() const {
- // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.message_type)
return message_type_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >*
FileDescriptorProto::mutable_message_type() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.message_type)
return &message_type_;
}
@@ -3221,25 +3061,20 @@
enum_type_.Clear();
}
inline const ::google::protobuf::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::mutable_enum_type(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.enum_type)
return enum_type_.Mutable(index);
}
inline ::google::protobuf::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 >&
FileDescriptorProto::enum_type() const {
- // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.enum_type)
return enum_type_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >*
FileDescriptorProto::mutable_enum_type() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.enum_type)
return &enum_type_;
}
@@ -3251,25 +3086,20 @@
service_.Clear();
}
inline const ::google::protobuf::ServiceDescriptorProto& FileDescriptorProto::service(int index) const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.service)
return service_.Get(index);
}
inline ::google::protobuf::ServiceDescriptorProto* FileDescriptorProto::mutable_service(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.service)
return service_.Mutable(index);
}
inline ::google::protobuf::ServiceDescriptorProto* FileDescriptorProto::add_service() {
- // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.service)
return service_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >&
FileDescriptorProto::service() const {
- // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.service)
return service_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >*
FileDescriptorProto::mutable_service() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.service)
return &service_;
}
@@ -3281,25 +3111,20 @@
extension_.Clear();
}
inline const ::google::protobuf::FieldDescriptorProto& FileDescriptorProto::extension(int index) const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.extension)
return extension_.Get(index);
}
inline ::google::protobuf::FieldDescriptorProto* FileDescriptorProto::mutable_extension(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.extension)
return extension_.Mutable(index);
}
inline ::google::protobuf::FieldDescriptorProto* FileDescriptorProto::add_extension() {
- // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.extension)
return extension_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
FileDescriptorProto::extension() const {
- // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.extension)
return extension_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
FileDescriptorProto::mutable_extension() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.extension)
return &extension_;
}
@@ -3318,13 +3143,11 @@
clear_has_options();
}
inline const ::google::protobuf::FileOptions& FileDescriptorProto::options() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.options)
return options_ != NULL ? *options_ : *default_instance_->options_;
}
inline ::google::protobuf::FileOptions* FileDescriptorProto::mutable_options() {
set_has_options();
if (options_ == NULL) options_ = new ::google::protobuf::FileOptions;
- // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.options)
return options_;
}
inline ::google::protobuf::FileOptions* FileDescriptorProto::release_options() {
@@ -3341,7 +3164,6 @@
} else {
clear_has_options();
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.options)
}
// optional .google.protobuf.SourceCodeInfo source_code_info = 9;
@@ -3359,13 +3181,11 @@
clear_has_source_code_info();
}
inline const ::google::protobuf::SourceCodeInfo& FileDescriptorProto::source_code_info() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.source_code_info)
return source_code_info_ != NULL ? *source_code_info_ : *default_instance_->source_code_info_;
}
inline ::google::protobuf::SourceCodeInfo* FileDescriptorProto::mutable_source_code_info() {
set_has_source_code_info();
if (source_code_info_ == NULL) source_code_info_ = new ::google::protobuf::SourceCodeInfo;
- // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.source_code_info)
return source_code_info_;
}
inline ::google::protobuf::SourceCodeInfo* FileDescriptorProto::release_source_code_info() {
@@ -3382,7 +3202,6 @@
} else {
clear_has_source_code_info();
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.source_code_info)
}
// -------------------------------------------------------------------
@@ -3404,13 +3223,11 @@
clear_has_start();
}
inline ::google::protobuf::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) {
set_has_start();
start_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ExtensionRange.start)
}
// optional int32 end = 2;
@@ -3428,13 +3245,11 @@
clear_has_end();
}
inline ::google::protobuf::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) {
set_has_end();
end_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ExtensionRange.end)
}
// -------------------------------------------------------------------
@@ -3452,59 +3267,54 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void DescriptorProto::clear_name() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
name_->clear();
}
clear_has_name();
}
inline const ::std::string& DescriptorProto::name() const {
- // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.name)
return *name_;
}
inline void DescriptorProto::set_name(const ::std::string& value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.name)
}
inline void DescriptorProto::set_name(const char* value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.DescriptorProto.name)
}
inline void DescriptorProto::set_name(const char* value, size_t size) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.DescriptorProto.name)
}
inline ::std::string* DescriptorProto::mutable_name() {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.name)
return name_;
}
inline ::std::string* DescriptorProto::release_name() {
clear_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = name_;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void DescriptorProto::set_allocated_name(::std::string* name) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
delete name_;
}
if (name) {
@@ -3512,9 +3322,8 @@
name_ = name;
} else {
clear_has_name();
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.name)
}
// repeated .google.protobuf.FieldDescriptorProto field = 2;
@@ -3525,25 +3334,20 @@
field_.Clear();
}
inline const ::google::protobuf::FieldDescriptorProto& DescriptorProto::field(int index) const {
- // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.field)
return field_.Get(index);
}
inline ::google::protobuf::FieldDescriptorProto* DescriptorProto::mutable_field(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.field)
return field_.Mutable(index);
}
inline ::google::protobuf::FieldDescriptorProto* DescriptorProto::add_field() {
- // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.field)
return field_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
DescriptorProto::field() const {
- // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.field)
return field_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
DescriptorProto::mutable_field() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.field)
return &field_;
}
@@ -3555,25 +3359,20 @@
extension_.Clear();
}
inline const ::google::protobuf::FieldDescriptorProto& DescriptorProto::extension(int index) const {
- // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.extension)
return extension_.Get(index);
}
inline ::google::protobuf::FieldDescriptorProto* DescriptorProto::mutable_extension(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.extension)
return extension_.Mutable(index);
}
inline ::google::protobuf::FieldDescriptorProto* DescriptorProto::add_extension() {
- // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.extension)
return extension_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
DescriptorProto::extension() const {
- // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension)
return extension_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
DescriptorProto::mutable_extension() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.extension)
return &extension_;
}
@@ -3585,25 +3384,20 @@
nested_type_.Clear();
}
inline const ::google::protobuf::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::mutable_nested_type(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.nested_type)
return nested_type_.Mutable(index);
}
inline ::google::protobuf::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 >&
DescriptorProto::nested_type() const {
- // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.nested_type)
return nested_type_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >*
DescriptorProto::mutable_nested_type() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.nested_type)
return &nested_type_;
}
@@ -3615,25 +3409,20 @@
enum_type_.Clear();
}
inline const ::google::protobuf::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::mutable_enum_type(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.enum_type)
return enum_type_.Mutable(index);
}
inline ::google::protobuf::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 >&
DescriptorProto::enum_type() const {
- // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.enum_type)
return enum_type_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >*
DescriptorProto::mutable_enum_type() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.enum_type)
return &enum_type_;
}
@@ -3645,80 +3434,43 @@
extension_range_.Clear();
}
inline const ::google::protobuf::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::mutable_extension_range(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.extension_range)
return extension_range_.Mutable(index);
}
inline ::google::protobuf::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 >&
DescriptorProto::extension_range() const {
- // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension_range)
return extension_range_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >*
DescriptorProto::mutable_extension_range() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.extension_range)
return &extension_range_;
}
-// repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
-inline int DescriptorProto::oneof_decl_size() const {
- return oneof_decl_.size();
-}
-inline void DescriptorProto::clear_oneof_decl() {
- oneof_decl_.Clear();
-}
-inline const ::google::protobuf::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::mutable_oneof_decl(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.oneof_decl)
- return oneof_decl_.Mutable(index);
-}
-inline ::google::protobuf::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 >&
-DescriptorProto::oneof_decl() const {
- // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.oneof_decl)
- return oneof_decl_;
-}
-inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >*
-DescriptorProto::mutable_oneof_decl() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.oneof_decl)
- return &oneof_decl_;
-}
-
// optional .google.protobuf.MessageOptions options = 7;
inline bool DescriptorProto::has_options() const {
- return (_has_bits_[0] & 0x00000080u) != 0;
+ return (_has_bits_[0] & 0x00000040u) != 0;
}
inline void DescriptorProto::set_has_options() {
- _has_bits_[0] |= 0x00000080u;
+ _has_bits_[0] |= 0x00000040u;
}
inline void DescriptorProto::clear_has_options() {
- _has_bits_[0] &= ~0x00000080u;
+ _has_bits_[0] &= ~0x00000040u;
}
inline void DescriptorProto::clear_options() {
if (options_ != NULL) options_->::google::protobuf::MessageOptions::Clear();
clear_has_options();
}
inline const ::google::protobuf::MessageOptions& DescriptorProto::options() const {
- // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.options)
return options_ != NULL ? *options_ : *default_instance_->options_;
}
inline ::google::protobuf::MessageOptions* DescriptorProto::mutable_options() {
set_has_options();
if (options_ == NULL) options_ = new ::google::protobuf::MessageOptions;
- // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.options)
return options_;
}
inline ::google::protobuf::MessageOptions* DescriptorProto::release_options() {
@@ -3735,7 +3487,6 @@
} else {
clear_has_options();
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.options)
}
// -------------------------------------------------------------------
@@ -3753,59 +3504,54 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void FieldDescriptorProto::clear_name() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
name_->clear();
}
clear_has_name();
}
inline const ::std::string& FieldDescriptorProto::name() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.name)
return *name_;
}
inline void FieldDescriptorProto::set_name(const ::std::string& value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.name)
}
inline void FieldDescriptorProto::set_name(const char* value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.name)
}
inline void FieldDescriptorProto::set_name(const char* value, size_t size) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.name)
}
inline ::std::string* FieldDescriptorProto::mutable_name() {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.name)
return name_;
}
inline ::std::string* FieldDescriptorProto::release_name() {
clear_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = name_;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void FieldDescriptorProto::set_allocated_name(::std::string* name) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
delete name_;
}
if (name) {
@@ -3813,9 +3559,8 @@
name_ = name;
} else {
clear_has_name();
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.name)
}
// optional int32 number = 3;
@@ -3833,13 +3578,11 @@
clear_has_number();
}
inline ::google::protobuf::int32 FieldDescriptorProto::number() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.number)
return number_;
}
inline void FieldDescriptorProto::set_number(::google::protobuf::int32 value) {
set_has_number();
number_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.number)
}
// optional .google.protobuf.FieldDescriptorProto.Label label = 4;
@@ -3857,14 +3600,12 @@
clear_has_label();
}
inline ::google::protobuf::FieldDescriptorProto_Label FieldDescriptorProto::label() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.label)
return static_cast< ::google::protobuf::FieldDescriptorProto_Label >(label_);
}
inline void FieldDescriptorProto::set_label(::google::protobuf::FieldDescriptorProto_Label value) {
assert(::google::protobuf::FieldDescriptorProto_Label_IsValid(value));
set_has_label();
label_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.label)
}
// optional .google.protobuf.FieldDescriptorProto.Type type = 5;
@@ -3882,14 +3623,12 @@
clear_has_type();
}
inline ::google::protobuf::FieldDescriptorProto_Type FieldDescriptorProto::type() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type)
return static_cast< ::google::protobuf::FieldDescriptorProto_Type >(type_);
}
inline void FieldDescriptorProto::set_type(::google::protobuf::FieldDescriptorProto_Type value) {
assert(::google::protobuf::FieldDescriptorProto_Type_IsValid(value));
set_has_type();
type_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type)
}
// optional string type_name = 6;
@@ -3903,59 +3642,54 @@
_has_bits_[0] &= ~0x00000010u;
}
inline void FieldDescriptorProto::clear_type_name() {
- if (type_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (type_name_ != &::google::protobuf::internal::kEmptyString) {
type_name_->clear();
}
clear_has_type_name();
}
inline const ::std::string& FieldDescriptorProto::type_name() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type_name)
return *type_name_;
}
inline void FieldDescriptorProto::set_type_name(const ::std::string& value) {
set_has_type_name();
- if (type_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (type_name_ == &::google::protobuf::internal::kEmptyString) {
type_name_ = new ::std::string;
}
type_name_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type_name)
}
inline void FieldDescriptorProto::set_type_name(const char* value) {
set_has_type_name();
- if (type_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (type_name_ == &::google::protobuf::internal::kEmptyString) {
type_name_ = new ::std::string;
}
type_name_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.type_name)
}
inline void FieldDescriptorProto::set_type_name(const char* value, size_t size) {
set_has_type_name();
- if (type_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (type_name_ == &::google::protobuf::internal::kEmptyString) {
type_name_ = new ::std::string;
}
type_name_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.type_name)
}
inline ::std::string* FieldDescriptorProto::mutable_type_name() {
set_has_type_name();
- if (type_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (type_name_ == &::google::protobuf::internal::kEmptyString) {
type_name_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.type_name)
return type_name_;
}
inline ::std::string* FieldDescriptorProto::release_type_name() {
clear_has_type_name();
- if (type_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (type_name_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = type_name_;
- type_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ type_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void FieldDescriptorProto::set_allocated_type_name(::std::string* type_name) {
- if (type_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (type_name_ != &::google::protobuf::internal::kEmptyString) {
delete type_name_;
}
if (type_name) {
@@ -3963,9 +3697,8 @@
type_name_ = type_name;
} else {
clear_has_type_name();
- type_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ type_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.type_name)
}
// optional string extendee = 2;
@@ -3979,59 +3712,54 @@
_has_bits_[0] &= ~0x00000020u;
}
inline void FieldDescriptorProto::clear_extendee() {
- if (extendee_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (extendee_ != &::google::protobuf::internal::kEmptyString) {
extendee_->clear();
}
clear_has_extendee();
}
inline const ::std::string& FieldDescriptorProto::extendee() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.extendee)
return *extendee_;
}
inline void FieldDescriptorProto::set_extendee(const ::std::string& value) {
set_has_extendee();
- if (extendee_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (extendee_ == &::google::protobuf::internal::kEmptyString) {
extendee_ = new ::std::string;
}
extendee_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.extendee)
}
inline void FieldDescriptorProto::set_extendee(const char* value) {
set_has_extendee();
- if (extendee_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (extendee_ == &::google::protobuf::internal::kEmptyString) {
extendee_ = new ::std::string;
}
extendee_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.extendee)
}
inline void FieldDescriptorProto::set_extendee(const char* value, size_t size) {
set_has_extendee();
- if (extendee_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (extendee_ == &::google::protobuf::internal::kEmptyString) {
extendee_ = new ::std::string;
}
extendee_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.extendee)
}
inline ::std::string* FieldDescriptorProto::mutable_extendee() {
set_has_extendee();
- if (extendee_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (extendee_ == &::google::protobuf::internal::kEmptyString) {
extendee_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.extendee)
return extendee_;
}
inline ::std::string* FieldDescriptorProto::release_extendee() {
clear_has_extendee();
- if (extendee_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (extendee_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = extendee_;
- extendee_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ extendee_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void FieldDescriptorProto::set_allocated_extendee(::std::string* extendee) {
- if (extendee_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (extendee_ != &::google::protobuf::internal::kEmptyString) {
delete extendee_;
}
if (extendee) {
@@ -4039,9 +3767,8 @@
extendee_ = extendee;
} else {
clear_has_extendee();
- extendee_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ extendee_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.extendee)
}
// optional string default_value = 7;
@@ -4055,59 +3782,54 @@
_has_bits_[0] &= ~0x00000040u;
}
inline void FieldDescriptorProto::clear_default_value() {
- if (default_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (default_value_ != &::google::protobuf::internal::kEmptyString) {
default_value_->clear();
}
clear_has_default_value();
}
inline const ::std::string& FieldDescriptorProto::default_value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.default_value)
return *default_value_;
}
inline void FieldDescriptorProto::set_default_value(const ::std::string& value) {
set_has_default_value();
- if (default_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (default_value_ == &::google::protobuf::internal::kEmptyString) {
default_value_ = new ::std::string;
}
default_value_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.default_value)
}
inline void FieldDescriptorProto::set_default_value(const char* value) {
set_has_default_value();
- if (default_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (default_value_ == &::google::protobuf::internal::kEmptyString) {
default_value_ = new ::std::string;
}
default_value_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.default_value)
}
inline void FieldDescriptorProto::set_default_value(const char* value, size_t size) {
set_has_default_value();
- if (default_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (default_value_ == &::google::protobuf::internal::kEmptyString) {
default_value_ = new ::std::string;
}
default_value_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.default_value)
}
inline ::std::string* FieldDescriptorProto::mutable_default_value() {
set_has_default_value();
- if (default_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (default_value_ == &::google::protobuf::internal::kEmptyString) {
default_value_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.default_value)
return default_value_;
}
inline ::std::string* FieldDescriptorProto::release_default_value() {
clear_has_default_value();
- if (default_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (default_value_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = default_value_;
- default_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ default_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void FieldDescriptorProto::set_allocated_default_value(::std::string* default_value) {
- if (default_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (default_value_ != &::google::protobuf::internal::kEmptyString) {
delete default_value_;
}
if (default_value) {
@@ -4115,57 +3837,30 @@
default_value_ = default_value;
} else {
clear_has_default_value();
- default_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ default_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.default_value)
-}
-
-// optional int32 oneof_index = 9;
-inline bool FieldDescriptorProto::has_oneof_index() const {
- return (_has_bits_[0] & 0x00000080u) != 0;
-}
-inline void FieldDescriptorProto::set_has_oneof_index() {
- _has_bits_[0] |= 0x00000080u;
-}
-inline void FieldDescriptorProto::clear_has_oneof_index() {
- _has_bits_[0] &= ~0x00000080u;
-}
-inline void FieldDescriptorProto::clear_oneof_index() {
- oneof_index_ = 0;
- clear_has_oneof_index();
-}
-inline ::google::protobuf::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) {
- set_has_oneof_index();
- oneof_index_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.oneof_index)
}
// optional .google.protobuf.FieldOptions options = 8;
inline bool FieldDescriptorProto::has_options() const {
- return (_has_bits_[0] & 0x00000100u) != 0;
+ return (_has_bits_[0] & 0x00000080u) != 0;
}
inline void FieldDescriptorProto::set_has_options() {
- _has_bits_[0] |= 0x00000100u;
+ _has_bits_[0] |= 0x00000080u;
}
inline void FieldDescriptorProto::clear_has_options() {
- _has_bits_[0] &= ~0x00000100u;
+ _has_bits_[0] &= ~0x00000080u;
}
inline void FieldDescriptorProto::clear_options() {
if (options_ != NULL) options_->::google::protobuf::FieldOptions::Clear();
clear_has_options();
}
inline const ::google::protobuf::FieldOptions& FieldDescriptorProto::options() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.options)
return options_ != NULL ? *options_ : *default_instance_->options_;
}
inline ::google::protobuf::FieldOptions* FieldDescriptorProto::mutable_options() {
set_has_options();
if (options_ == NULL) options_ = new ::google::protobuf::FieldOptions;
- // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.options)
return options_;
}
inline ::google::protobuf::FieldOptions* FieldDescriptorProto::release_options() {
@@ -4182,87 +3877,6 @@
} else {
clear_has_options();
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.options)
-}
-
-// -------------------------------------------------------------------
-
-// OneofDescriptorProto
-
-// optional string name = 1;
-inline bool OneofDescriptorProto::has_name() const {
- return (_has_bits_[0] & 0x00000001u) != 0;
-}
-inline void OneofDescriptorProto::set_has_name() {
- _has_bits_[0] |= 0x00000001u;
-}
-inline void OneofDescriptorProto::clear_has_name() {
- _has_bits_[0] &= ~0x00000001u;
-}
-inline void OneofDescriptorProto::clear_name() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_->clear();
- }
- clear_has_name();
-}
-inline const ::std::string& OneofDescriptorProto::name() const {
- // @@protoc_insertion_point(field_get:google.protobuf.OneofDescriptorProto.name)
- return *name_;
-}
-inline void OneofDescriptorProto::set_name(const ::std::string& value) {
- set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.OneofDescriptorProto.name)
-}
-inline void OneofDescriptorProto::set_name(const char* value) {
- set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.OneofDescriptorProto.name)
-}
-inline void OneofDescriptorProto::set_name(const char* value, size_t size) {
- set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- name_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.OneofDescriptorProto.name)
-}
-inline ::std::string* OneofDescriptorProto::mutable_name() {
- set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_ = new ::std::string;
- }
- // @@protoc_insertion_point(field_mutable:google.protobuf.OneofDescriptorProto.name)
- return name_;
-}
-inline ::std::string* OneofDescriptorProto::release_name() {
- clear_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- return NULL;
- } else {
- ::std::string* temp = name_;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- return temp;
- }
-}
-inline void OneofDescriptorProto::set_allocated_name(::std::string* name) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete name_;
- }
- if (name) {
- set_has_name();
- name_ = name;
- } else {
- clear_has_name();
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.OneofDescriptorProto.name)
}
// -------------------------------------------------------------------
@@ -4280,59 +3894,54 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void EnumDescriptorProto::clear_name() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
name_->clear();
}
clear_has_name();
}
inline const ::std::string& EnumDescriptorProto::name() const {
- // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.name)
return *name_;
}
inline void EnumDescriptorProto::set_name(const ::std::string& value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.name)
}
inline void EnumDescriptorProto::set_name(const char* value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.EnumDescriptorProto.name)
}
inline void EnumDescriptorProto::set_name(const char* value, size_t size) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumDescriptorProto.name)
}
inline ::std::string* EnumDescriptorProto::mutable_name() {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.name)
return name_;
}
inline ::std::string* EnumDescriptorProto::release_name() {
clear_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = name_;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void EnumDescriptorProto::set_allocated_name(::std::string* name) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
delete name_;
}
if (name) {
@@ -4340,9 +3949,8 @@
name_ = name;
} else {
clear_has_name();
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.name)
}
// repeated .google.protobuf.EnumValueDescriptorProto value = 2;
@@ -4353,25 +3961,20 @@
value_.Clear();
}
inline const ::google::protobuf::EnumValueDescriptorProto& EnumDescriptorProto::value(int index) const {
- // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.value)
return value_.Get(index);
}
inline ::google::protobuf::EnumValueDescriptorProto* EnumDescriptorProto::mutable_value(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.value)
return value_.Mutable(index);
}
inline ::google::protobuf::EnumValueDescriptorProto* EnumDescriptorProto::add_value() {
- // @@protoc_insertion_point(field_add:google.protobuf.EnumDescriptorProto.value)
return value_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >&
EnumDescriptorProto::value() const {
- // @@protoc_insertion_point(field_list:google.protobuf.EnumDescriptorProto.value)
return value_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >*
EnumDescriptorProto::mutable_value() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumDescriptorProto.value)
return &value_;
}
@@ -4390,13 +3993,11 @@
clear_has_options();
}
inline const ::google::protobuf::EnumOptions& EnumDescriptorProto::options() const {
- // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.options)
return options_ != NULL ? *options_ : *default_instance_->options_;
}
inline ::google::protobuf::EnumOptions* EnumDescriptorProto::mutable_options() {
set_has_options();
if (options_ == NULL) options_ = new ::google::protobuf::EnumOptions;
- // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.options)
return options_;
}
inline ::google::protobuf::EnumOptions* EnumDescriptorProto::release_options() {
@@ -4413,7 +4014,6 @@
} else {
clear_has_options();
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.options)
}
// -------------------------------------------------------------------
@@ -4431,59 +4031,54 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void EnumValueDescriptorProto::clear_name() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
name_->clear();
}
clear_has_name();
}
inline const ::std::string& EnumValueDescriptorProto::name() const {
- // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.name)
return *name_;
}
inline void EnumValueDescriptorProto::set_name(const ::std::string& value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.name)
}
inline void EnumValueDescriptorProto::set_name(const char* value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.EnumValueDescriptorProto.name)
}
inline void EnumValueDescriptorProto::set_name(const char* value, size_t size) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumValueDescriptorProto.name)
}
inline ::std::string* EnumValueDescriptorProto::mutable_name() {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.name)
return name_;
}
inline ::std::string* EnumValueDescriptorProto::release_name() {
clear_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = name_;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void EnumValueDescriptorProto::set_allocated_name(::std::string* name) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
delete name_;
}
if (name) {
@@ -4491,9 +4086,8 @@
name_ = name;
} else {
clear_has_name();
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.name)
}
// optional int32 number = 2;
@@ -4511,13 +4105,11 @@
clear_has_number();
}
inline ::google::protobuf::int32 EnumValueDescriptorProto::number() const {
- // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.number)
return number_;
}
inline void EnumValueDescriptorProto::set_number(::google::protobuf::int32 value) {
set_has_number();
number_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.number)
}
// optional .google.protobuf.EnumValueOptions options = 3;
@@ -4535,13 +4127,11 @@
clear_has_options();
}
inline const ::google::protobuf::EnumValueOptions& EnumValueDescriptorProto::options() const {
- // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.options)
return options_ != NULL ? *options_ : *default_instance_->options_;
}
inline ::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::mutable_options() {
set_has_options();
if (options_ == NULL) options_ = new ::google::protobuf::EnumValueOptions;
- // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.options)
return options_;
}
inline ::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::release_options() {
@@ -4558,7 +4148,6 @@
} else {
clear_has_options();
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.options)
}
// -------------------------------------------------------------------
@@ -4576,59 +4165,54 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void ServiceDescriptorProto::clear_name() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
name_->clear();
}
clear_has_name();
}
inline const ::std::string& ServiceDescriptorProto::name() const {
- // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.name)
return *name_;
}
inline void ServiceDescriptorProto::set_name(const ::std::string& value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.ServiceDescriptorProto.name)
}
inline void ServiceDescriptorProto::set_name(const char* value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.ServiceDescriptorProto.name)
}
inline void ServiceDescriptorProto::set_name(const char* value, size_t size) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.ServiceDescriptorProto.name)
}
inline ::std::string* ServiceDescriptorProto::mutable_name() {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.name)
return name_;
}
inline ::std::string* ServiceDescriptorProto::release_name() {
clear_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = name_;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void ServiceDescriptorProto::set_allocated_name(::std::string* name) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
delete name_;
}
if (name) {
@@ -4636,9 +4220,8 @@
name_ = name;
} else {
clear_has_name();
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.name)
}
// repeated .google.protobuf.MethodDescriptorProto method = 2;
@@ -4649,25 +4232,20 @@
method_.Clear();
}
inline const ::google::protobuf::MethodDescriptorProto& ServiceDescriptorProto::method(int index) const {
- // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.method)
return method_.Get(index);
}
inline ::google::protobuf::MethodDescriptorProto* ServiceDescriptorProto::mutable_method(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.method)
return method_.Mutable(index);
}
inline ::google::protobuf::MethodDescriptorProto* ServiceDescriptorProto::add_method() {
- // @@protoc_insertion_point(field_add:google.protobuf.ServiceDescriptorProto.method)
return method_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >&
ServiceDescriptorProto::method() const {
- // @@protoc_insertion_point(field_list:google.protobuf.ServiceDescriptorProto.method)
return method_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >*
ServiceDescriptorProto::mutable_method() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.ServiceDescriptorProto.method)
return &method_;
}
@@ -4686,13 +4264,11 @@
clear_has_options();
}
inline const ::google::protobuf::ServiceOptions& ServiceDescriptorProto::options() const {
- // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.options)
return options_ != NULL ? *options_ : *default_instance_->options_;
}
inline ::google::protobuf::ServiceOptions* ServiceDescriptorProto::mutable_options() {
set_has_options();
if (options_ == NULL) options_ = new ::google::protobuf::ServiceOptions;
- // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.options)
return options_;
}
inline ::google::protobuf::ServiceOptions* ServiceDescriptorProto::release_options() {
@@ -4709,7 +4285,6 @@
} else {
clear_has_options();
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.options)
}
// -------------------------------------------------------------------
@@ -4727,59 +4302,54 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void MethodDescriptorProto::clear_name() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
name_->clear();
}
clear_has_name();
}
inline const ::std::string& MethodDescriptorProto::name() const {
- // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.name)
return *name_;
}
inline void MethodDescriptorProto::set_name(const ::std::string& value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.name)
}
inline void MethodDescriptorProto::set_name(const char* value) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.name)
}
inline void MethodDescriptorProto::set_name(const char* value, size_t size) {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.name)
}
inline ::std::string* MethodDescriptorProto::mutable_name() {
set_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.name)
return name_;
}
inline ::std::string* MethodDescriptorProto::release_name() {
clear_has_name();
- if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = name_;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void MethodDescriptorProto::set_allocated_name(::std::string* name) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
delete name_;
}
if (name) {
@@ -4787,9 +4357,8 @@
name_ = name;
} else {
clear_has_name();
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.name)
}
// optional string input_type = 2;
@@ -4803,59 +4372,54 @@
_has_bits_[0] &= ~0x00000002u;
}
inline void MethodDescriptorProto::clear_input_type() {
- if (input_type_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (input_type_ != &::google::protobuf::internal::kEmptyString) {
input_type_->clear();
}
clear_has_input_type();
}
inline const ::std::string& MethodDescriptorProto::input_type() const {
- // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.input_type)
return *input_type_;
}
inline void MethodDescriptorProto::set_input_type(const ::std::string& value) {
set_has_input_type();
- if (input_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (input_type_ == &::google::protobuf::internal::kEmptyString) {
input_type_ = new ::std::string;
}
input_type_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.input_type)
}
inline void MethodDescriptorProto::set_input_type(const char* value) {
set_has_input_type();
- if (input_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (input_type_ == &::google::protobuf::internal::kEmptyString) {
input_type_ = new ::std::string;
}
input_type_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.input_type)
}
inline void MethodDescriptorProto::set_input_type(const char* value, size_t size) {
set_has_input_type();
- if (input_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (input_type_ == &::google::protobuf::internal::kEmptyString) {
input_type_ = new ::std::string;
}
input_type_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.input_type)
}
inline ::std::string* MethodDescriptorProto::mutable_input_type() {
set_has_input_type();
- if (input_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (input_type_ == &::google::protobuf::internal::kEmptyString) {
input_type_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.input_type)
return input_type_;
}
inline ::std::string* MethodDescriptorProto::release_input_type() {
clear_has_input_type();
- if (input_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (input_type_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = input_type_;
- input_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ input_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void MethodDescriptorProto::set_allocated_input_type(::std::string* input_type) {
- if (input_type_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (input_type_ != &::google::protobuf::internal::kEmptyString) {
delete input_type_;
}
if (input_type) {
@@ -4863,9 +4427,8 @@
input_type_ = input_type;
} else {
clear_has_input_type();
- input_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ input_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.input_type)
}
// optional string output_type = 3;
@@ -4879,59 +4442,54 @@
_has_bits_[0] &= ~0x00000004u;
}
inline void MethodDescriptorProto::clear_output_type() {
- if (output_type_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (output_type_ != &::google::protobuf::internal::kEmptyString) {
output_type_->clear();
}
clear_has_output_type();
}
inline const ::std::string& MethodDescriptorProto::output_type() const {
- // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.output_type)
return *output_type_;
}
inline void MethodDescriptorProto::set_output_type(const ::std::string& value) {
set_has_output_type();
- if (output_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (output_type_ == &::google::protobuf::internal::kEmptyString) {
output_type_ = new ::std::string;
}
output_type_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.output_type)
}
inline void MethodDescriptorProto::set_output_type(const char* value) {
set_has_output_type();
- if (output_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (output_type_ == &::google::protobuf::internal::kEmptyString) {
output_type_ = new ::std::string;
}
output_type_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.output_type)
}
inline void MethodDescriptorProto::set_output_type(const char* value, size_t size) {
set_has_output_type();
- if (output_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (output_type_ == &::google::protobuf::internal::kEmptyString) {
output_type_ = new ::std::string;
}
output_type_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.output_type)
}
inline ::std::string* MethodDescriptorProto::mutable_output_type() {
set_has_output_type();
- if (output_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (output_type_ == &::google::protobuf::internal::kEmptyString) {
output_type_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.output_type)
return output_type_;
}
inline ::std::string* MethodDescriptorProto::release_output_type() {
clear_has_output_type();
- if (output_type_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (output_type_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = output_type_;
- output_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ output_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void MethodDescriptorProto::set_allocated_output_type(::std::string* output_type) {
- if (output_type_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (output_type_ != &::google::protobuf::internal::kEmptyString) {
delete output_type_;
}
if (output_type) {
@@ -4939,9 +4497,8 @@
output_type_ = output_type;
} else {
clear_has_output_type();
- output_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ output_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.output_type)
}
// optional .google.protobuf.MethodOptions options = 4;
@@ -4959,13 +4516,11 @@
clear_has_options();
}
inline const ::google::protobuf::MethodOptions& MethodDescriptorProto::options() const {
- // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.options)
return options_ != NULL ? *options_ : *default_instance_->options_;
}
inline ::google::protobuf::MethodOptions* MethodDescriptorProto::mutable_options() {
set_has_options();
if (options_ == NULL) options_ = new ::google::protobuf::MethodOptions;
- // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.options)
return options_;
}
inline ::google::protobuf::MethodOptions* MethodDescriptorProto::release_options() {
@@ -4982,7 +4537,6 @@
} else {
clear_has_options();
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.options)
}
// -------------------------------------------------------------------
@@ -5000,59 +4554,54 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void FileOptions::clear_java_package() {
- if (java_package_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (java_package_ != &::google::protobuf::internal::kEmptyString) {
java_package_->clear();
}
clear_has_java_package();
}
inline const ::std::string& FileOptions::java_package() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_package)
return *java_package_;
}
inline void FileOptions::set_java_package(const ::std::string& value) {
set_has_java_package();
- if (java_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (java_package_ == &::google::protobuf::internal::kEmptyString) {
java_package_ = new ::std::string;
}
java_package_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_package)
}
inline void FileOptions::set_java_package(const char* value) {
set_has_java_package();
- if (java_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (java_package_ == &::google::protobuf::internal::kEmptyString) {
java_package_ = new ::std::string;
}
java_package_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.java_package)
}
inline void FileOptions::set_java_package(const char* value, size_t size) {
set_has_java_package();
- if (java_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (java_package_ == &::google::protobuf::internal::kEmptyString) {
java_package_ = new ::std::string;
}
java_package_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.java_package)
}
inline ::std::string* FileOptions::mutable_java_package() {
set_has_java_package();
- if (java_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (java_package_ == &::google::protobuf::internal::kEmptyString) {
java_package_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_package)
return java_package_;
}
inline ::std::string* FileOptions::release_java_package() {
clear_has_java_package();
- if (java_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (java_package_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = java_package_;
- java_package_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ java_package_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void FileOptions::set_allocated_java_package(::std::string* java_package) {
- if (java_package_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (java_package_ != &::google::protobuf::internal::kEmptyString) {
delete java_package_;
}
if (java_package) {
@@ -5060,9 +4609,8 @@
java_package_ = java_package;
} else {
clear_has_java_package();
- java_package_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ java_package_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_package)
}
// optional string java_outer_classname = 8;
@@ -5076,59 +4624,54 @@
_has_bits_[0] &= ~0x00000002u;
}
inline void FileOptions::clear_java_outer_classname() {
- if (java_outer_classname_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (java_outer_classname_ != &::google::protobuf::internal::kEmptyString) {
java_outer_classname_->clear();
}
clear_has_java_outer_classname();
}
inline const ::std::string& FileOptions::java_outer_classname() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_outer_classname)
return *java_outer_classname_;
}
inline void FileOptions::set_java_outer_classname(const ::std::string& value) {
set_has_java_outer_classname();
- if (java_outer_classname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (java_outer_classname_ == &::google::protobuf::internal::kEmptyString) {
java_outer_classname_ = new ::std::string;
}
java_outer_classname_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_outer_classname)
}
inline void FileOptions::set_java_outer_classname(const char* value) {
set_has_java_outer_classname();
- if (java_outer_classname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (java_outer_classname_ == &::google::protobuf::internal::kEmptyString) {
java_outer_classname_ = new ::std::string;
}
java_outer_classname_->assign(value);
- // @@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) {
set_has_java_outer_classname();
- if (java_outer_classname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (java_outer_classname_ == &::google::protobuf::internal::kEmptyString) {
java_outer_classname_ = new ::std::string;
}
java_outer_classname_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.java_outer_classname)
}
inline ::std::string* FileOptions::mutable_java_outer_classname() {
set_has_java_outer_classname();
- if (java_outer_classname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (java_outer_classname_ == &::google::protobuf::internal::kEmptyString) {
java_outer_classname_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_outer_classname)
return java_outer_classname_;
}
inline ::std::string* FileOptions::release_java_outer_classname() {
clear_has_java_outer_classname();
- if (java_outer_classname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (java_outer_classname_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = java_outer_classname_;
- java_outer_classname_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ java_outer_classname_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void FileOptions::set_allocated_java_outer_classname(::std::string* java_outer_classname) {
- if (java_outer_classname_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (java_outer_classname_ != &::google::protobuf::internal::kEmptyString) {
delete java_outer_classname_;
}
if (java_outer_classname) {
@@ -5136,9 +4679,8 @@
java_outer_classname_ = java_outer_classname;
} else {
clear_has_java_outer_classname();
- java_outer_classname_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ java_outer_classname_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_outer_classname)
}
// optional bool java_multiple_files = 10 [default = false];
@@ -5156,13 +4698,11 @@
clear_has_java_multiple_files();
}
inline bool FileOptions::java_multiple_files() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_multiple_files)
return java_multiple_files_;
}
inline void FileOptions::set_java_multiple_files(bool value) {
set_has_java_multiple_files();
java_multiple_files_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_multiple_files)
}
// optional bool java_generate_equals_and_hash = 20 [default = false];
@@ -5180,128 +4720,95 @@
clear_has_java_generate_equals_and_hash();
}
inline bool FileOptions::java_generate_equals_and_hash() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_generate_equals_and_hash)
return java_generate_equals_and_hash_;
}
inline void FileOptions::set_java_generate_equals_and_hash(bool value) {
set_has_java_generate_equals_and_hash();
java_generate_equals_and_hash_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_generate_equals_and_hash)
-}
-
-// optional bool java_string_check_utf8 = 27 [default = false];
-inline bool FileOptions::has_java_string_check_utf8() const {
- return (_has_bits_[0] & 0x00000010u) != 0;
-}
-inline void FileOptions::set_has_java_string_check_utf8() {
- _has_bits_[0] |= 0x00000010u;
-}
-inline void FileOptions::clear_has_java_string_check_utf8() {
- _has_bits_[0] &= ~0x00000010u;
-}
-inline void FileOptions::clear_java_string_check_utf8() {
- java_string_check_utf8_ = false;
- clear_has_java_string_check_utf8();
-}
-inline bool FileOptions::java_string_check_utf8() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_string_check_utf8)
- return java_string_check_utf8_;
-}
-inline void FileOptions::set_java_string_check_utf8(bool value) {
- set_has_java_string_check_utf8();
- java_string_check_utf8_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_string_check_utf8)
}
// optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
inline bool FileOptions::has_optimize_for() const {
- return (_has_bits_[0] & 0x00000020u) != 0;
+ return (_has_bits_[0] & 0x00000010u) != 0;
}
inline void FileOptions::set_has_optimize_for() {
- _has_bits_[0] |= 0x00000020u;
+ _has_bits_[0] |= 0x00000010u;
}
inline void FileOptions::clear_has_optimize_for() {
- _has_bits_[0] &= ~0x00000020u;
+ _has_bits_[0] &= ~0x00000010u;
}
inline void FileOptions::clear_optimize_for() {
optimize_for_ = 1;
clear_has_optimize_for();
}
inline ::google::protobuf::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_);
}
inline void FileOptions::set_optimize_for(::google::protobuf::FileOptions_OptimizeMode value) {
assert(::google::protobuf::FileOptions_OptimizeMode_IsValid(value));
set_has_optimize_for();
optimize_for_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.optimize_for)
}
// optional string go_package = 11;
inline bool FileOptions::has_go_package() const {
- return (_has_bits_[0] & 0x00000040u) != 0;
+ return (_has_bits_[0] & 0x00000020u) != 0;
}
inline void FileOptions::set_has_go_package() {
- _has_bits_[0] |= 0x00000040u;
+ _has_bits_[0] |= 0x00000020u;
}
inline void FileOptions::clear_has_go_package() {
- _has_bits_[0] &= ~0x00000040u;
+ _has_bits_[0] &= ~0x00000020u;
}
inline void FileOptions::clear_go_package() {
- if (go_package_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (go_package_ != &::google::protobuf::internal::kEmptyString) {
go_package_->clear();
}
clear_has_go_package();
}
inline const ::std::string& FileOptions::go_package() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.go_package)
return *go_package_;
}
inline void FileOptions::set_go_package(const ::std::string& value) {
set_has_go_package();
- if (go_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (go_package_ == &::google::protobuf::internal::kEmptyString) {
go_package_ = new ::std::string;
}
go_package_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.go_package)
}
inline void FileOptions::set_go_package(const char* value) {
set_has_go_package();
- if (go_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (go_package_ == &::google::protobuf::internal::kEmptyString) {
go_package_ = new ::std::string;
}
go_package_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.go_package)
}
inline void FileOptions::set_go_package(const char* value, size_t size) {
set_has_go_package();
- if (go_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (go_package_ == &::google::protobuf::internal::kEmptyString) {
go_package_ = new ::std::string;
}
go_package_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.go_package)
}
inline ::std::string* FileOptions::mutable_go_package() {
set_has_go_package();
- if (go_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (go_package_ == &::google::protobuf::internal::kEmptyString) {
go_package_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.go_package)
return go_package_;
}
inline ::std::string* FileOptions::release_go_package() {
clear_has_go_package();
- if (go_package_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (go_package_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = go_package_;
- go_package_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ go_package_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void FileOptions::set_allocated_go_package(::std::string* go_package) {
- if (go_package_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (go_package_ != &::google::protobuf::internal::kEmptyString) {
delete go_package_;
}
if (go_package) {
@@ -5309,105 +4816,74 @@
go_package_ = go_package;
} else {
clear_has_go_package();
- go_package_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ go_package_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.go_package)
}
// optional bool cc_generic_services = 16 [default = false];
inline bool FileOptions::has_cc_generic_services() const {
- return (_has_bits_[0] & 0x00000080u) != 0;
+ return (_has_bits_[0] & 0x00000040u) != 0;
}
inline void FileOptions::set_has_cc_generic_services() {
- _has_bits_[0] |= 0x00000080u;
+ _has_bits_[0] |= 0x00000040u;
}
inline void FileOptions::clear_has_cc_generic_services() {
- _has_bits_[0] &= ~0x00000080u;
+ _has_bits_[0] &= ~0x00000040u;
}
inline void FileOptions::clear_cc_generic_services() {
cc_generic_services_ = false;
clear_has_cc_generic_services();
}
inline bool FileOptions::cc_generic_services() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.cc_generic_services)
return cc_generic_services_;
}
inline void FileOptions::set_cc_generic_services(bool value) {
set_has_cc_generic_services();
cc_generic_services_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.cc_generic_services)
}
// optional bool java_generic_services = 17 [default = false];
inline bool FileOptions::has_java_generic_services() const {
- return (_has_bits_[0] & 0x00000100u) != 0;
+ return (_has_bits_[0] & 0x00000080u) != 0;
}
inline void FileOptions::set_has_java_generic_services() {
- _has_bits_[0] |= 0x00000100u;
+ _has_bits_[0] |= 0x00000080u;
}
inline void FileOptions::clear_has_java_generic_services() {
- _has_bits_[0] &= ~0x00000100u;
+ _has_bits_[0] &= ~0x00000080u;
}
inline void FileOptions::clear_java_generic_services() {
java_generic_services_ = false;
clear_has_java_generic_services();
}
inline bool FileOptions::java_generic_services() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_generic_services)
return java_generic_services_;
}
inline void FileOptions::set_java_generic_services(bool value) {
set_has_java_generic_services();
java_generic_services_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_generic_services)
}
// optional bool py_generic_services = 18 [default = false];
inline bool FileOptions::has_py_generic_services() const {
- return (_has_bits_[0] & 0x00000200u) != 0;
+ return (_has_bits_[0] & 0x00000100u) != 0;
}
inline void FileOptions::set_has_py_generic_services() {
- _has_bits_[0] |= 0x00000200u;
+ _has_bits_[0] |= 0x00000100u;
}
inline void FileOptions::clear_has_py_generic_services() {
- _has_bits_[0] &= ~0x00000200u;
+ _has_bits_[0] &= ~0x00000100u;
}
inline void FileOptions::clear_py_generic_services() {
py_generic_services_ = false;
clear_has_py_generic_services();
}
inline bool FileOptions::py_generic_services() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.py_generic_services)
return py_generic_services_;
}
inline void FileOptions::set_py_generic_services(bool value) {
set_has_py_generic_services();
py_generic_services_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.py_generic_services)
-}
-
-// optional bool deprecated = 23 [default = false];
-inline bool FileOptions::has_deprecated() const {
- return (_has_bits_[0] & 0x00000400u) != 0;
-}
-inline void FileOptions::set_has_deprecated() {
- _has_bits_[0] |= 0x00000400u;
-}
-inline void FileOptions::clear_has_deprecated() {
- _has_bits_[0] &= ~0x00000400u;
-}
-inline void FileOptions::clear_deprecated() {
- deprecated_ = false;
- clear_has_deprecated();
-}
-inline bool FileOptions::deprecated() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.deprecated)
- return deprecated_;
-}
-inline void FileOptions::set_deprecated(bool value) {
- set_has_deprecated();
- deprecated_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.deprecated)
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
@@ -5418,25 +4894,20 @@
uninterpreted_option_.Clear();
}
inline const ::google::protobuf::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::mutable_uninterpreted_option(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.uninterpreted_option)
return uninterpreted_option_.Mutable(index);
}
inline ::google::protobuf::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 >&
FileOptions::uninterpreted_option() const {
- // @@protoc_insertion_point(field_list:google.protobuf.FileOptions.uninterpreted_option)
return uninterpreted_option_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
FileOptions::mutable_uninterpreted_option() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileOptions.uninterpreted_option)
return &uninterpreted_option_;
}
@@ -5459,13 +4930,11 @@
clear_has_message_set_wire_format();
}
inline bool MessageOptions::message_set_wire_format() const {
- // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.message_set_wire_format)
return message_set_wire_format_;
}
inline void MessageOptions::set_message_set_wire_format(bool value) {
set_has_message_set_wire_format();
message_set_wire_format_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.message_set_wire_format)
}
// optional bool no_standard_descriptor_accessor = 2 [default = false];
@@ -5483,37 +4952,11 @@
clear_has_no_standard_descriptor_accessor();
}
inline bool MessageOptions::no_standard_descriptor_accessor() const {
- // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.no_standard_descriptor_accessor)
return no_standard_descriptor_accessor_;
}
inline void MessageOptions::set_no_standard_descriptor_accessor(bool value) {
set_has_no_standard_descriptor_accessor();
no_standard_descriptor_accessor_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.no_standard_descriptor_accessor)
-}
-
-// optional bool deprecated = 3 [default = false];
-inline bool MessageOptions::has_deprecated() const {
- return (_has_bits_[0] & 0x00000004u) != 0;
-}
-inline void MessageOptions::set_has_deprecated() {
- _has_bits_[0] |= 0x00000004u;
-}
-inline void MessageOptions::clear_has_deprecated() {
- _has_bits_[0] &= ~0x00000004u;
-}
-inline void MessageOptions::clear_deprecated() {
- deprecated_ = false;
- clear_has_deprecated();
-}
-inline bool MessageOptions::deprecated() const {
- // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.deprecated)
- return deprecated_;
-}
-inline void MessageOptions::set_deprecated(bool value) {
- set_has_deprecated();
- deprecated_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.deprecated)
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
@@ -5524,25 +4967,20 @@
uninterpreted_option_.Clear();
}
inline const ::google::protobuf::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::mutable_uninterpreted_option(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.MessageOptions.uninterpreted_option)
return uninterpreted_option_.Mutable(index);
}
inline ::google::protobuf::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 >&
MessageOptions::uninterpreted_option() const {
- // @@protoc_insertion_point(field_list:google.protobuf.MessageOptions.uninterpreted_option)
return uninterpreted_option_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
MessageOptions::mutable_uninterpreted_option() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.MessageOptions.uninterpreted_option)
return &uninterpreted_option_;
}
@@ -5565,14 +5003,12 @@
clear_has_ctype();
}
inline ::google::protobuf::FieldOptions_CType FieldOptions::ctype() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.ctype)
return static_cast< ::google::protobuf::FieldOptions_CType >(ctype_);
}
inline void FieldOptions::set_ctype(::google::protobuf::FieldOptions_CType value) {
assert(::google::protobuf::FieldOptions_CType_IsValid(value));
set_has_ctype();
ctype_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.ctype)
}
// optional bool packed = 2;
@@ -5590,13 +5026,11 @@
clear_has_packed();
}
inline bool FieldOptions::packed() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.packed)
return packed_;
}
inline void FieldOptions::set_packed(bool value) {
set_has_packed();
packed_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.packed)
}
// optional bool lazy = 5 [default = false];
@@ -5614,13 +5048,11 @@
clear_has_lazy();
}
inline bool FieldOptions::lazy() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.lazy)
return lazy_;
}
inline void FieldOptions::set_lazy(bool value) {
set_has_lazy();
lazy_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.lazy)
}
// optional bool deprecated = 3 [default = false];
@@ -5638,13 +5070,11 @@
clear_has_deprecated();
}
inline bool FieldOptions::deprecated() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.deprecated)
return deprecated_;
}
inline void FieldOptions::set_deprecated(bool value) {
set_has_deprecated();
deprecated_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.deprecated)
}
// optional string experimental_map_key = 9;
@@ -5658,59 +5088,54 @@
_has_bits_[0] &= ~0x00000010u;
}
inline void FieldOptions::clear_experimental_map_key() {
- if (experimental_map_key_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (experimental_map_key_ != &::google::protobuf::internal::kEmptyString) {
experimental_map_key_->clear();
}
clear_has_experimental_map_key();
}
inline const ::std::string& FieldOptions::experimental_map_key() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.experimental_map_key)
return *experimental_map_key_;
}
inline void FieldOptions::set_experimental_map_key(const ::std::string& value) {
set_has_experimental_map_key();
- if (experimental_map_key_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (experimental_map_key_ == &::google::protobuf::internal::kEmptyString) {
experimental_map_key_ = new ::std::string;
}
experimental_map_key_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.experimental_map_key)
}
inline void FieldOptions::set_experimental_map_key(const char* value) {
set_has_experimental_map_key();
- if (experimental_map_key_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (experimental_map_key_ == &::google::protobuf::internal::kEmptyString) {
experimental_map_key_ = new ::std::string;
}
experimental_map_key_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.FieldOptions.experimental_map_key)
}
inline void FieldOptions::set_experimental_map_key(const char* value, size_t size) {
set_has_experimental_map_key();
- if (experimental_map_key_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (experimental_map_key_ == &::google::protobuf::internal::kEmptyString) {
experimental_map_key_ = new ::std::string;
}
experimental_map_key_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldOptions.experimental_map_key)
}
inline ::std::string* FieldOptions::mutable_experimental_map_key() {
set_has_experimental_map_key();
- if (experimental_map_key_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (experimental_map_key_ == &::google::protobuf::internal::kEmptyString) {
experimental_map_key_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.FieldOptions.experimental_map_key)
return experimental_map_key_;
}
inline ::std::string* FieldOptions::release_experimental_map_key() {
clear_has_experimental_map_key();
- if (experimental_map_key_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (experimental_map_key_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = experimental_map_key_;
- experimental_map_key_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ experimental_map_key_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void FieldOptions::set_allocated_experimental_map_key(::std::string* experimental_map_key) {
- if (experimental_map_key_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (experimental_map_key_ != &::google::protobuf::internal::kEmptyString) {
delete experimental_map_key_;
}
if (experimental_map_key) {
@@ -5718,9 +5143,8 @@
experimental_map_key_ = experimental_map_key;
} else {
clear_has_experimental_map_key();
- experimental_map_key_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ experimental_map_key_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldOptions.experimental_map_key)
}
// optional bool weak = 10 [default = false];
@@ -5738,13 +5162,11 @@
clear_has_weak();
}
inline bool FieldOptions::weak() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.weak)
return weak_;
}
inline void FieldOptions::set_weak(bool value) {
set_has_weak();
weak_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.weak)
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
@@ -5755,25 +5177,20 @@
uninterpreted_option_.Clear();
}
inline const ::google::protobuf::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::mutable_uninterpreted_option(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.FieldOptions.uninterpreted_option)
return uninterpreted_option_.Mutable(index);
}
inline ::google::protobuf::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 >&
FieldOptions::uninterpreted_option() const {
- // @@protoc_insertion_point(field_list:google.protobuf.FieldOptions.uninterpreted_option)
return uninterpreted_option_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
FieldOptions::mutable_uninterpreted_option() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.FieldOptions.uninterpreted_option)
return &uninterpreted_option_;
}
@@ -5781,7 +5198,7 @@
// EnumOptions
-// optional bool allow_alias = 2;
+// optional bool allow_alias = 2 [default = true];
inline bool EnumOptions::has_allow_alias() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
@@ -5792,41 +5209,15 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void EnumOptions::clear_allow_alias() {
- allow_alias_ = false;
+ allow_alias_ = true;
clear_has_allow_alias();
}
inline bool EnumOptions::allow_alias() const {
- // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.allow_alias)
return allow_alias_;
}
inline void EnumOptions::set_allow_alias(bool value) {
set_has_allow_alias();
allow_alias_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.EnumOptions.allow_alias)
-}
-
-// optional bool deprecated = 3 [default = false];
-inline bool EnumOptions::has_deprecated() const {
- return (_has_bits_[0] & 0x00000002u) != 0;
-}
-inline void EnumOptions::set_has_deprecated() {
- _has_bits_[0] |= 0x00000002u;
-}
-inline void EnumOptions::clear_has_deprecated() {
- _has_bits_[0] &= ~0x00000002u;
-}
-inline void EnumOptions::clear_deprecated() {
- deprecated_ = false;
- clear_has_deprecated();
-}
-inline bool EnumOptions::deprecated() const {
- // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.deprecated)
- return deprecated_;
-}
-inline void EnumOptions::set_deprecated(bool value) {
- set_has_deprecated();
- deprecated_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.EnumOptions.deprecated)
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
@@ -5837,25 +5228,20 @@
uninterpreted_option_.Clear();
}
inline const ::google::protobuf::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::mutable_uninterpreted_option(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.EnumOptions.uninterpreted_option)
return uninterpreted_option_.Mutable(index);
}
inline ::google::protobuf::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 >&
EnumOptions::uninterpreted_option() const {
- // @@protoc_insertion_point(field_list:google.protobuf.EnumOptions.uninterpreted_option)
return uninterpreted_option_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
EnumOptions::mutable_uninterpreted_option() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumOptions.uninterpreted_option)
return &uninterpreted_option_;
}
@@ -5863,30 +5249,6 @@
// EnumValueOptions
-// optional bool deprecated = 1 [default = false];
-inline bool EnumValueOptions::has_deprecated() const {
- return (_has_bits_[0] & 0x00000001u) != 0;
-}
-inline void EnumValueOptions::set_has_deprecated() {
- _has_bits_[0] |= 0x00000001u;
-}
-inline void EnumValueOptions::clear_has_deprecated() {
- _has_bits_[0] &= ~0x00000001u;
-}
-inline void EnumValueOptions::clear_deprecated() {
- deprecated_ = false;
- clear_has_deprecated();
-}
-inline bool EnumValueOptions::deprecated() const {
- // @@protoc_insertion_point(field_get:google.protobuf.EnumValueOptions.deprecated)
- return deprecated_;
-}
-inline void EnumValueOptions::set_deprecated(bool value) {
- set_has_deprecated();
- deprecated_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.EnumValueOptions.deprecated)
-}
-
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int EnumValueOptions::uninterpreted_option_size() const {
return uninterpreted_option_.size();
@@ -5895,25 +5257,20 @@
uninterpreted_option_.Clear();
}
inline const ::google::protobuf::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::mutable_uninterpreted_option(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueOptions.uninterpreted_option)
return uninterpreted_option_.Mutable(index);
}
inline ::google::protobuf::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 >&
EnumValueOptions::uninterpreted_option() const {
- // @@protoc_insertion_point(field_list:google.protobuf.EnumValueOptions.uninterpreted_option)
return uninterpreted_option_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
EnumValueOptions::mutable_uninterpreted_option() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValueOptions.uninterpreted_option)
return &uninterpreted_option_;
}
@@ -5921,30 +5278,6 @@
// ServiceOptions
-// optional bool deprecated = 33 [default = false];
-inline bool ServiceOptions::has_deprecated() const {
- return (_has_bits_[0] & 0x00000001u) != 0;
-}
-inline void ServiceOptions::set_has_deprecated() {
- _has_bits_[0] |= 0x00000001u;
-}
-inline void ServiceOptions::clear_has_deprecated() {
- _has_bits_[0] &= ~0x00000001u;
-}
-inline void ServiceOptions::clear_deprecated() {
- deprecated_ = false;
- clear_has_deprecated();
-}
-inline bool ServiceOptions::deprecated() const {
- // @@protoc_insertion_point(field_get:google.protobuf.ServiceOptions.deprecated)
- return deprecated_;
-}
-inline void ServiceOptions::set_deprecated(bool value) {
- set_has_deprecated();
- deprecated_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.ServiceOptions.deprecated)
-}
-
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int ServiceOptions::uninterpreted_option_size() const {
return uninterpreted_option_.size();
@@ -5953,25 +5286,20 @@
uninterpreted_option_.Clear();
}
inline const ::google::protobuf::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::mutable_uninterpreted_option(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceOptions.uninterpreted_option)
return uninterpreted_option_.Mutable(index);
}
inline ::google::protobuf::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 >&
ServiceOptions::uninterpreted_option() const {
- // @@protoc_insertion_point(field_list:google.protobuf.ServiceOptions.uninterpreted_option)
return uninterpreted_option_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
ServiceOptions::mutable_uninterpreted_option() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.ServiceOptions.uninterpreted_option)
return &uninterpreted_option_;
}
@@ -5979,30 +5307,6 @@
// MethodOptions
-// optional bool deprecated = 33 [default = false];
-inline bool MethodOptions::has_deprecated() const {
- return (_has_bits_[0] & 0x00000001u) != 0;
-}
-inline void MethodOptions::set_has_deprecated() {
- _has_bits_[0] |= 0x00000001u;
-}
-inline void MethodOptions::clear_has_deprecated() {
- _has_bits_[0] &= ~0x00000001u;
-}
-inline void MethodOptions::clear_deprecated() {
- deprecated_ = false;
- clear_has_deprecated();
-}
-inline bool MethodOptions::deprecated() const {
- // @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.deprecated)
- return deprecated_;
-}
-inline void MethodOptions::set_deprecated(bool value) {
- set_has_deprecated();
- deprecated_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.MethodOptions.deprecated)
-}
-
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int MethodOptions::uninterpreted_option_size() const {
return uninterpreted_option_.size();
@@ -6011,25 +5315,20 @@
uninterpreted_option_.Clear();
}
inline const ::google::protobuf::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::mutable_uninterpreted_option(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.MethodOptions.uninterpreted_option)
return uninterpreted_option_.Mutable(index);
}
inline ::google::protobuf::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 >&
MethodOptions::uninterpreted_option() const {
- // @@protoc_insertion_point(field_list:google.protobuf.MethodOptions.uninterpreted_option)
return uninterpreted_option_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
MethodOptions::mutable_uninterpreted_option() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.MethodOptions.uninterpreted_option)
return &uninterpreted_option_;
}
@@ -6048,59 +5347,54 @@
_has_bits_[0] &= ~0x00000001u;
}
inline void UninterpretedOption_NamePart::clear_name_part() {
- if (name_part_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_part_ != &::google::protobuf::internal::kEmptyString) {
name_part_->clear();
}
clear_has_name_part();
}
inline const ::std::string& UninterpretedOption_NamePart::name_part() const {
- // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.NamePart.name_part)
return *name_part_;
}
inline void UninterpretedOption_NamePart::set_name_part(const ::std::string& value) {
set_has_name_part();
- if (name_part_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_part_ == &::google::protobuf::internal::kEmptyString) {
name_part_ = new ::std::string;
}
name_part_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.NamePart.name_part)
}
inline void UninterpretedOption_NamePart::set_name_part(const char* value) {
set_has_name_part();
- if (name_part_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_part_ == &::google::protobuf::internal::kEmptyString) {
name_part_ = new ::std::string;
}
name_part_->assign(value);
- // @@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) {
set_has_name_part();
- if (name_part_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_part_ == &::google::protobuf::internal::kEmptyString) {
name_part_ = new ::std::string;
}
name_part_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.NamePart.name_part)
}
inline ::std::string* UninterpretedOption_NamePart::mutable_name_part() {
set_has_name_part();
- if (name_part_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_part_ == &::google::protobuf::internal::kEmptyString) {
name_part_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.NamePart.name_part)
return name_part_;
}
inline ::std::string* UninterpretedOption_NamePart::release_name_part() {
clear_has_name_part();
- if (name_part_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_part_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = name_part_;
- name_part_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ name_part_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void UninterpretedOption_NamePart::set_allocated_name_part(::std::string* name_part) {
- if (name_part_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (name_part_ != &::google::protobuf::internal::kEmptyString) {
delete name_part_;
}
if (name_part) {
@@ -6108,9 +5402,8 @@
name_part_ = name_part;
} else {
clear_has_name_part();
- name_part_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ name_part_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.NamePart.name_part)
}
// required bool is_extension = 2;
@@ -6128,13 +5421,11 @@
clear_has_is_extension();
}
inline bool UninterpretedOption_NamePart::is_extension() const {
- // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.NamePart.is_extension)
return is_extension_;
}
inline void UninterpretedOption_NamePart::set_is_extension(bool value) {
set_has_is_extension();
is_extension_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.NamePart.is_extension)
}
// -------------------------------------------------------------------
@@ -6149,25 +5440,20 @@
name_.Clear();
}
inline const ::google::protobuf::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::mutable_name(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.name)
return name_.Mutable(index);
}
inline ::google::protobuf::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 >&
UninterpretedOption::name() const {
- // @@protoc_insertion_point(field_list:google.protobuf.UninterpretedOption.name)
return name_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >*
UninterpretedOption::mutable_name() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.UninterpretedOption.name)
return &name_;
}
@@ -6182,59 +5468,54 @@
_has_bits_[0] &= ~0x00000002u;
}
inline void UninterpretedOption::clear_identifier_value() {
- if (identifier_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (identifier_value_ != &::google::protobuf::internal::kEmptyString) {
identifier_value_->clear();
}
clear_has_identifier_value();
}
inline const ::std::string& UninterpretedOption::identifier_value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.identifier_value)
return *identifier_value_;
}
inline void UninterpretedOption::set_identifier_value(const ::std::string& value) {
set_has_identifier_value();
- if (identifier_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (identifier_value_ == &::google::protobuf::internal::kEmptyString) {
identifier_value_ = new ::std::string;
}
identifier_value_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.identifier_value)
}
inline void UninterpretedOption::set_identifier_value(const char* value) {
set_has_identifier_value();
- if (identifier_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (identifier_value_ == &::google::protobuf::internal::kEmptyString) {
identifier_value_ = new ::std::string;
}
identifier_value_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.identifier_value)
}
inline void UninterpretedOption::set_identifier_value(const char* value, size_t size) {
set_has_identifier_value();
- if (identifier_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (identifier_value_ == &::google::protobuf::internal::kEmptyString) {
identifier_value_ = new ::std::string;
}
identifier_value_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.identifier_value)
}
inline ::std::string* UninterpretedOption::mutable_identifier_value() {
set_has_identifier_value();
- if (identifier_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (identifier_value_ == &::google::protobuf::internal::kEmptyString) {
identifier_value_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.identifier_value)
return identifier_value_;
}
inline ::std::string* UninterpretedOption::release_identifier_value() {
clear_has_identifier_value();
- if (identifier_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (identifier_value_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = identifier_value_;
- identifier_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ identifier_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void UninterpretedOption::set_allocated_identifier_value(::std::string* identifier_value) {
- if (identifier_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (identifier_value_ != &::google::protobuf::internal::kEmptyString) {
delete identifier_value_;
}
if (identifier_value) {
@@ -6242,9 +5523,8 @@
identifier_value_ = identifier_value;
} else {
clear_has_identifier_value();
- identifier_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ identifier_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.identifier_value)
}
// optional uint64 positive_int_value = 4;
@@ -6262,13 +5542,11 @@
clear_has_positive_int_value();
}
inline ::google::protobuf::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) {
set_has_positive_int_value();
positive_int_value_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.positive_int_value)
}
// optional int64 negative_int_value = 5;
@@ -6286,13 +5564,11 @@
clear_has_negative_int_value();
}
inline ::google::protobuf::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) {
set_has_negative_int_value();
negative_int_value_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.negative_int_value)
}
// optional double double_value = 6;
@@ -6310,13 +5586,11 @@
clear_has_double_value();
}
inline double UninterpretedOption::double_value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.double_value)
return double_value_;
}
inline void UninterpretedOption::set_double_value(double value) {
set_has_double_value();
double_value_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.double_value)
}
// optional bytes string_value = 7;
@@ -6330,59 +5604,54 @@
_has_bits_[0] &= ~0x00000020u;
}
inline void UninterpretedOption::clear_string_value() {
- if (string_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (string_value_ != &::google::protobuf::internal::kEmptyString) {
string_value_->clear();
}
clear_has_string_value();
}
inline const ::std::string& UninterpretedOption::string_value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.string_value)
return *string_value_;
}
inline void UninterpretedOption::set_string_value(const ::std::string& value) {
set_has_string_value();
- if (string_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (string_value_ == &::google::protobuf::internal::kEmptyString) {
string_value_ = new ::std::string;
}
string_value_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.string_value)
}
inline void UninterpretedOption::set_string_value(const char* value) {
set_has_string_value();
- if (string_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (string_value_ == &::google::protobuf::internal::kEmptyString) {
string_value_ = new ::std::string;
}
string_value_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.string_value)
}
inline void UninterpretedOption::set_string_value(const void* value, size_t size) {
set_has_string_value();
- if (string_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (string_value_ == &::google::protobuf::internal::kEmptyString) {
string_value_ = new ::std::string;
}
string_value_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.string_value)
}
inline ::std::string* UninterpretedOption::mutable_string_value() {
set_has_string_value();
- if (string_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (string_value_ == &::google::protobuf::internal::kEmptyString) {
string_value_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.string_value)
return string_value_;
}
inline ::std::string* UninterpretedOption::release_string_value() {
clear_has_string_value();
- if (string_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (string_value_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = string_value_;
- string_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ string_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void UninterpretedOption::set_allocated_string_value(::std::string* string_value) {
- if (string_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (string_value_ != &::google::protobuf::internal::kEmptyString) {
delete string_value_;
}
if (string_value) {
@@ -6390,9 +5659,8 @@
string_value_ = string_value;
} else {
clear_has_string_value();
- string_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ string_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.string_value)
}
// optional string aggregate_value = 8;
@@ -6406,59 +5674,54 @@
_has_bits_[0] &= ~0x00000040u;
}
inline void UninterpretedOption::clear_aggregate_value() {
- if (aggregate_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (aggregate_value_ != &::google::protobuf::internal::kEmptyString) {
aggregate_value_->clear();
}
clear_has_aggregate_value();
}
inline const ::std::string& UninterpretedOption::aggregate_value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.aggregate_value)
return *aggregate_value_;
}
inline void UninterpretedOption::set_aggregate_value(const ::std::string& value) {
set_has_aggregate_value();
- if (aggregate_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (aggregate_value_ == &::google::protobuf::internal::kEmptyString) {
aggregate_value_ = new ::std::string;
}
aggregate_value_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.aggregate_value)
}
inline void UninterpretedOption::set_aggregate_value(const char* value) {
set_has_aggregate_value();
- if (aggregate_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (aggregate_value_ == &::google::protobuf::internal::kEmptyString) {
aggregate_value_ = new ::std::string;
}
aggregate_value_->assign(value);
- // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.aggregate_value)
}
inline void UninterpretedOption::set_aggregate_value(const char* value, size_t size) {
set_has_aggregate_value();
- if (aggregate_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (aggregate_value_ == &::google::protobuf::internal::kEmptyString) {
aggregate_value_ = new ::std::string;
}
aggregate_value_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.aggregate_value)
}
inline ::std::string* UninterpretedOption::mutable_aggregate_value() {
set_has_aggregate_value();
- if (aggregate_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (aggregate_value_ == &::google::protobuf::internal::kEmptyString) {
aggregate_value_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.aggregate_value)
return aggregate_value_;
}
inline ::std::string* UninterpretedOption::release_aggregate_value() {
clear_has_aggregate_value();
- if (aggregate_value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (aggregate_value_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = aggregate_value_;
- aggregate_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ aggregate_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void UninterpretedOption::set_allocated_aggregate_value(::std::string* aggregate_value) {
- if (aggregate_value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (aggregate_value_ != &::google::protobuf::internal::kEmptyString) {
delete aggregate_value_;
}
if (aggregate_value) {
@@ -6466,9 +5729,8 @@
aggregate_value_ = aggregate_value;
} else {
clear_has_aggregate_value();
- aggregate_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ aggregate_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.aggregate_value)
}
// -------------------------------------------------------------------
@@ -6483,25 +5745,20 @@
path_.Clear();
}
inline ::google::protobuf::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) {
path_.Set(index, value);
- // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.path)
}
inline void SourceCodeInfo_Location::add_path(::google::protobuf::int32 value) {
path_.Add(value);
- // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.path)
}
inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
SourceCodeInfo_Location::path() const {
- // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.path)
return path_;
}
inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
SourceCodeInfo_Location::mutable_path() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.path)
return &path_;
}
@@ -6513,25 +5770,20 @@
span_.Clear();
}
inline ::google::protobuf::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) {
span_.Set(index, value);
- // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.span)
}
inline void SourceCodeInfo_Location::add_span(::google::protobuf::int32 value) {
span_.Add(value);
- // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.span)
}
inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
SourceCodeInfo_Location::span() const {
- // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.span)
return span_;
}
inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
SourceCodeInfo_Location::mutable_span() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.span)
return &span_;
}
@@ -6546,59 +5798,54 @@
_has_bits_[0] &= ~0x00000004u;
}
inline void SourceCodeInfo_Location::clear_leading_comments() {
- if (leading_comments_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (leading_comments_ != &::google::protobuf::internal::kEmptyString) {
leading_comments_->clear();
}
clear_has_leading_comments();
}
inline const ::std::string& SourceCodeInfo_Location::leading_comments() const {
- // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_comments)
return *leading_comments_;
}
inline void SourceCodeInfo_Location::set_leading_comments(const ::std::string& value) {
set_has_leading_comments();
- if (leading_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (leading_comments_ == &::google::protobuf::internal::kEmptyString) {
leading_comments_ = new ::std::string;
}
leading_comments_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_comments)
}
inline void SourceCodeInfo_Location::set_leading_comments(const char* value) {
set_has_leading_comments();
- if (leading_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (leading_comments_ == &::google::protobuf::internal::kEmptyString) {
leading_comments_ = new ::std::string;
}
leading_comments_->assign(value);
- // @@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) {
set_has_leading_comments();
- if (leading_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (leading_comments_ == &::google::protobuf::internal::kEmptyString) {
leading_comments_ = new ::std::string;
}
leading_comments_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.leading_comments)
}
inline ::std::string* SourceCodeInfo_Location::mutable_leading_comments() {
set_has_leading_comments();
- if (leading_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (leading_comments_ == &::google::protobuf::internal::kEmptyString) {
leading_comments_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_comments)
return leading_comments_;
}
inline ::std::string* SourceCodeInfo_Location::release_leading_comments() {
clear_has_leading_comments();
- if (leading_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (leading_comments_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = leading_comments_;
- leading_comments_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ leading_comments_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void SourceCodeInfo_Location::set_allocated_leading_comments(::std::string* leading_comments) {
- if (leading_comments_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (leading_comments_ != &::google::protobuf::internal::kEmptyString) {
delete leading_comments_;
}
if (leading_comments) {
@@ -6606,9 +5853,8 @@
leading_comments_ = leading_comments;
} else {
clear_has_leading_comments();
- leading_comments_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ leading_comments_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.leading_comments)
}
// optional string trailing_comments = 4;
@@ -6622,59 +5868,54 @@
_has_bits_[0] &= ~0x00000008u;
}
inline void SourceCodeInfo_Location::clear_trailing_comments() {
- if (trailing_comments_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (trailing_comments_ != &::google::protobuf::internal::kEmptyString) {
trailing_comments_->clear();
}
clear_has_trailing_comments();
}
inline const ::std::string& SourceCodeInfo_Location::trailing_comments() const {
- // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.trailing_comments)
return *trailing_comments_;
}
inline void SourceCodeInfo_Location::set_trailing_comments(const ::std::string& value) {
set_has_trailing_comments();
- if (trailing_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (trailing_comments_ == &::google::protobuf::internal::kEmptyString) {
trailing_comments_ = new ::std::string;
}
trailing_comments_->assign(value);
- // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.trailing_comments)
}
inline void SourceCodeInfo_Location::set_trailing_comments(const char* value) {
set_has_trailing_comments();
- if (trailing_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (trailing_comments_ == &::google::protobuf::internal::kEmptyString) {
trailing_comments_ = new ::std::string;
}
trailing_comments_->assign(value);
- // @@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) {
set_has_trailing_comments();
- if (trailing_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (trailing_comments_ == &::google::protobuf::internal::kEmptyString) {
trailing_comments_ = new ::std::string;
}
trailing_comments_->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.trailing_comments)
}
inline ::std::string* SourceCodeInfo_Location::mutable_trailing_comments() {
set_has_trailing_comments();
- if (trailing_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (trailing_comments_ == &::google::protobuf::internal::kEmptyString) {
trailing_comments_ = new ::std::string;
}
- // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.trailing_comments)
return trailing_comments_;
}
inline ::std::string* SourceCodeInfo_Location::release_trailing_comments() {
clear_has_trailing_comments();
- if (trailing_comments_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (trailing_comments_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = trailing_comments_;
- trailing_comments_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ trailing_comments_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void SourceCodeInfo_Location::set_allocated_trailing_comments(::std::string* trailing_comments) {
- if (trailing_comments_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ if (trailing_comments_ != &::google::protobuf::internal::kEmptyString) {
delete trailing_comments_;
}
if (trailing_comments) {
@@ -6682,9 +5923,8 @@
trailing_comments_ = trailing_comments;
} else {
clear_has_trailing_comments();
- trailing_comments_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ trailing_comments_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.trailing_comments)
}
// -------------------------------------------------------------------
@@ -6699,25 +5939,20 @@
location_.Clear();
}
inline const ::google::protobuf::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::mutable_location(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.location)
return location_.Mutable(index);
}
inline ::google::protobuf::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 >&
SourceCodeInfo::location() const {
- // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.location)
return location_;
}
inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >*
SourceCodeInfo::mutable_location() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.location)
return &location_;
}
@@ -6731,22 +5966,18 @@
namespace google {
namespace protobuf {
-template <> struct is_proto_enum< ::google::protobuf::FieldDescriptorProto_Type> : ::google::protobuf::internal::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::FieldDescriptorProto_Type>() {
return ::google::protobuf::FieldDescriptorProto_Type_descriptor();
}
-template <> struct is_proto_enum< ::google::protobuf::FieldDescriptorProto_Label> : ::google::protobuf::internal::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::FieldDescriptorProto_Label>() {
return ::google::protobuf::FieldDescriptorProto_Label_descriptor();
}
-template <> struct is_proto_enum< ::google::protobuf::FileOptions_OptimizeMode> : ::google::protobuf::internal::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::FileOptions_OptimizeMode>() {
return ::google::protobuf::FileOptions_OptimizeMode_descriptor();
}
-template <> struct is_proto_enum< ::google::protobuf::FieldOptions_CType> : ::google::protobuf::internal::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::FieldOptions_CType>() {
return ::google::protobuf::FieldOptions_CType_descriptor();
diff --git a/linux-x86_64/protoc/include/google/protobuf/descriptor.proto b/linux-x86_64/protoc/include/google/protobuf/descriptor.proto
index a753601..a785f79 100644
--- a/linux-x86_64/protoc/include/google/protobuf/descriptor.proto
+++ b/linux-x86_64/protoc/include/google/protobuf/descriptor.proto
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -96,8 +96,6 @@
}
repeated ExtensionRange extension_range = 5;
- repeated OneofDescriptorProto oneof_decl = 8;
-
optional MessageOptions options = 7;
}
@@ -145,7 +143,7 @@
optional Label label = 4;
// If type_name is set, this need not be set. If both this and type_name
- // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
+ // are set, this must be either TYPE_ENUM or TYPE_MESSAGE.
optional Type type = 5;
// For message and enum types, this is the name of the type. If the name
@@ -166,20 +164,9 @@
// TODO(kenton): Base-64 encode?
optional string default_value = 7;
- // If set, gives the index of a oneof in the containing type's oneof_decl
- // list. This field is a member of that oneof. Extensions of a oneof should
- // not set this since the oneof to which they belong will be inferred based
- // on the extension range containing the extension's field number.
- optional int32 oneof_index = 9;
-
optional FieldOptions options = 8;
}
-// Describes a oneof.
-message OneofDescriptorProto {
- optional string name = 1;
-}
-
// Describes an enum type.
message EnumDescriptorProto {
optional string name = 1;
@@ -246,7 +233,7 @@
// number. You can declare multiple options with only one extension number by
// putting them in a sub-message. See the Custom Options section of the docs
// for examples:
-// https://developers.google.com/protocol-buffers/docs/proto#options
+// http://code.google.com/apis/protocolbuffers/docs/proto.html#options
// If this turns out to be popular, a web service will be set up
// to automatically assign option numbers.
@@ -276,26 +263,11 @@
optional bool java_multiple_files = 10 [default=false];
// If set true, then the Java code generator will generate equals() and
- // hashCode() methods for all messages defined in the .proto file.
- // - In the full runtime, this is purely a speed optimization, as the
- // AbstractMessage base class includes reflection-based implementations of
- // these methods.
- //- In the lite runtime, setting this option changes the semantics of
- // equals() and hashCode() to more closely match those of the full runtime;
- // the generated methods compute their results based on field values rather
- // than object identity. (Implementations should not assume that hashcodes
- // will be consistent across runtimes or versions of the protocol compiler.)
+ // hashCode() methods for all messages defined in the .proto file. This is
+ // purely a speed optimization, as the AbstractMessage base class includes
+ // reflection-based implementations of these methods.
optional bool java_generate_equals_and_hash = 20 [default=false];
- // If set true, then the Java2 code generator will generate code that
- // throws an exception whenever an attempt is made to assign a non-UTF-8
- // byte sequence to a string field.
- // Message reflection will do the same.
- // However, an extension field still accepts non-UTF-8 byte sequences.
- // This option has no effect on when used with the lite runtime.
- optional bool java_string_check_utf8 = 27 [default=false];
-
-
// Generated classes can be optimized for speed or code size.
enum OptimizeMode {
SPEED = 1; // Generate complete code for parsing, serialization,
@@ -325,13 +297,6 @@
optional bool java_generic_services = 17 [default=false];
optional bool py_generic_services = 18 [default=false];
- // Is this file deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for everything in the file, or it will be completely ignored; in the very
- // least, this is a formalization for deprecating files.
- optional bool deprecated = 23 [default=false];
-
-
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
@@ -365,12 +330,6 @@
// from proto1 easier; new code should avoid fields named "descriptor".
optional bool no_standard_descriptor_accessor = 2 [default=false];
- // Is this message deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the message, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating messages.
- optional bool deprecated = 3 [default=false];
-
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
@@ -453,8 +412,6 @@
// For Google-internal migration only. Do not use.
optional bool weak = 10 [default=false];
-
-
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
@@ -464,15 +421,9 @@
message EnumOptions {
- // Set this option to true to allow mapping different tag names to the same
+ // Set this option to false to disallow mapping different tag names to a same
// value.
- optional bool allow_alias = 2;
-
- // Is this enum deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the enum, or it will be completely ignored; in the very least, this
- // is a formalization for deprecating enums.
- optional bool deprecated = 3 [default=false];
+ optional bool allow_alias = 2 [default=true];
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
@@ -482,12 +433,6 @@
}
message EnumValueOptions {
- // Is this enum value deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the enum value, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating enum values.
- optional bool deprecated = 1 [default=false];
-
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
@@ -502,12 +447,6 @@
// we were already using them long before we decided to release Protocol
// Buffers.
- // Is this service deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the service, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating services.
- optional bool deprecated = 33 [default=false];
-
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
@@ -522,12 +461,6 @@
// we were already using them long before we decided to release Protocol
// Buffers.
- // Is this method deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the method, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating methods.
- optional bool deprecated = 33 [default=false];
-
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
diff --git a/linux-x86_64/protoc/include/google/protobuf/descriptor_database.h b/linux-x86_64/protoc/include/google/protobuf/descriptor_database.h
index 934e402..2ccb145 100644
--- a/linux-x86_64/protoc/include/google/protobuf/descriptor_database.h
+++ b/linux-x86_64/protoc/include/google/protobuf/descriptor_database.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -96,12 +96,11 @@
//
// This method has a default implementation that always returns
// false.
- virtual bool FindAllExtensionNumbers(const string& /* extendee_type */,
- vector<int>* /* output */) {
+ virtual bool FindAllExtensionNumbers(const string& extendee_type,
+ vector<int>* output) {
return false;
}
-
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DescriptorDatabase);
};
@@ -357,7 +356,6 @@
bool FindAllExtensionNumbers(const string& extendee_type,
vector<int>* output);
-
private:
vector<DescriptorDatabase*> sources_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MergedDescriptorDatabase);
diff --git a/linux-x86_64/protoc/include/google/protobuf/dynamic_message.h b/linux-x86_64/protoc/include/google/protobuf/dynamic_message.h
index 10ed700..b3d1e5d 100644
--- a/linux-x86_64/protoc/include/google/protobuf/dynamic_message.h
+++ b/linux-x86_64/protoc/include/google/protobuf/dynamic_message.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -38,8 +38,6 @@
#ifndef GOOGLE_PROTOBUF_DYNAMIC_MESSAGE_H__
#define GOOGLE_PROTOBUF_DYNAMIC_MESSAGE_H__
-#include <memory>
-
#include <google/protobuf/message.h>
#include <google/protobuf/stubs/common.h>
@@ -129,16 +127,6 @@
friend class DynamicMessage;
const Message* GetPrototypeNoLock(const Descriptor* type);
- // Construct default oneof instance for reflection usage if oneof
- // is defined.
- static void ConstructDefaultOneofInstance(const Descriptor* type,
- const int offsets[],
- void* default_oneof_instance);
- // Delete default oneof instance. Called by ~DynamicMessageFactory.
- static void DeleteDefaultOneofInstance(const Descriptor* type,
- const int offsets[],
- void* default_oneof_instance);
-
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DynamicMessageFactory);
};
diff --git a/linux-x86_64/protoc/include/google/protobuf/extension_set.h b/linux-x86_64/protoc/include/google/protobuf/extension_set.h
index d7ec519..df8f1f3 100644
--- a/linux-x86_64/protoc/include/google/protobuf/extension_set.h
+++ b/linux-x86_64/protoc/include/google/protobuf/extension_set.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -46,8 +46,6 @@
#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/repeated_field.h>
-
namespace google {
namespace protobuf {
@@ -64,7 +62,10 @@
}
namespace internal {
class FieldSkipper; // wire_format_lite.h
+ class RepeatedPtrFieldBase; // repeated_field.h
}
+ template <typename Element> class RepeatedField; // repeated_field.h
+ template <typename Element> class RepeatedPtrField; // repeated_field.h
}
namespace protobuf {
@@ -137,9 +138,6 @@
const MessageLite* containing_type_;
};
-// A FieldSkipper used for parsing MessageSet.
-class MessageSetFieldSkipper;
-
// Note: extension_set_heavy.cc defines DescriptorPoolExtensionFinder for
// finding extensions from a DescriptorPool.
@@ -267,20 +265,6 @@
// repeated fields -------------------------------------------------
- // Fetches a RepeatedField extension by number; returns |default_value|
- // if no such extension exists. User should not touch this directly; it is
- // used by the GetRepeatedExtension() method.
- const void* GetRawRepeatedField(int number, const void* default_value) const;
- // Fetches a mutable version of a RepeatedField extension by number,
- // instantiating one if none exists. Similar to above, user should not use
- // this directly; it underlies MutableRepeatedExtension().
- void* MutableRawRepeatedField(int number, FieldType field_type,
- bool packed, const FieldDescriptor* desc);
-
- // This is an overload of MutableRawRepeatedField to maintain compatibility
- // with old code using a previous API. This version of
- // MutableRawRepeatedField() will GOOGLE_CHECK-fail on a missing extension.
- // (E.g.: borg/clients/internal/proto1/proto2_reflection.cc.)
void* MutableRawRepeatedField(int number);
int32 GetRepeatedInt32 (int number, int index) const;
@@ -339,7 +323,6 @@
void Clear();
void MergeFrom(const ExtensionSet& other);
void Swap(ExtensionSet* other);
- void SwapExtension(ExtensionSet* other, int number);
bool IsInitialized() const;
// Parses a single extension from the input. The input should start out
@@ -359,15 +342,12 @@
bool ParseField(uint32 tag, io::CodedInputStream* input,
const Message* containing_type,
UnknownFieldSet* unknown_fields);
- bool ParseField(uint32 tag, io::CodedInputStream* input,
- const MessageLite* containing_type,
- io::CodedOutputStream* unknown_fields);
// Parse an entire message in MessageSet format. Such messages have no
// fields, only extensions.
bool ParseMessageSet(io::CodedInputStream* input,
ExtensionFinder* extension_finder,
- MessageSetFieldSkipper* field_skipper);
+ FieldSkipper* field_skipper);
// Specific versions for lite or full messages (constructs the appropriate
// FieldSkipper automatically).
@@ -525,38 +505,23 @@
// Returns true and fills field_number and extension if extension is found.
- // Note to support packed repeated field compatibility, it also fills whether
- // the tag on wire is packed, which can be different from
- // extension->is_packed (whether packed=true is specified).
bool FindExtensionInfoFromTag(uint32 tag, ExtensionFinder* extension_finder,
- int* field_number, ExtensionInfo* extension,
- bool* was_packed_on_wire);
-
- // Returns true and fills extension if extension is found.
- // Note to support packed repeated field compatibility, it also fills whether
- // the tag on wire is packed, which can be different from
- // extension->is_packed (whether packed=true is specified).
- bool FindExtensionInfoFromFieldNumber(int wire_type, int field_number,
- ExtensionFinder* extension_finder,
- ExtensionInfo* extension,
- bool* was_packed_on_wire);
+ int* field_number, ExtensionInfo* extension);
// Parses a single extension from the input. The input should start out
// positioned immediately after the wire tag. This method is called in
- // ParseField() after field number and was_packed_on_wire is extracted from
- // the wire tag and ExtensionInfo is found by the field number.
+ // ParseField() after field number is extracted from the wire tag and
+ // ExtensionInfo is found by the field number.
bool ParseFieldWithExtensionInfo(int field_number,
- bool was_packed_on_wire,
const ExtensionInfo& extension,
io::CodedInputStream* input,
FieldSkipper* field_skipper);
// Like ParseField(), but this method may parse singular message extensions
// lazily depending on the value of FLAGS_eagerly_parse_message_sets.
- bool ParseFieldMaybeLazily(int wire_type, int field_number,
- io::CodedInputStream* input,
+ bool ParseFieldMaybeLazily(uint32 tag, io::CodedInputStream* input,
ExtensionFinder* extension_finder,
- MessageSetFieldSkipper* field_skipper);
+ FieldSkipper* field_skipper);
// Gets the extension with the given number, creating it if it does not
// already exist. Returns true if the extension did not already exist.
@@ -567,7 +532,7 @@
// tag has been read.
bool ParseMessageSetItem(io::CodedInputStream* input,
ExtensionFinder* extension_finder,
- MessageSetFieldSkipper* field_skipper);
+ FieldSkipper* field_skipper);
// Hack: RepeatedPtrFieldBase declares ExtensionSet as a friend. This
@@ -622,16 +587,6 @@
// public:
// typedef ? ConstType;
// typedef ? MutableType;
-// // TypeTraits for singular fields and repeated fields will define the
-// // symbol "Singular" or "Repeated" respectively. These two symbols will
-// // be used in extension accessors to distinguish between singular
-// // extensions and repeated extensions. If the TypeTraits for the passed
-// // in extension doesn't have the expected symbol defined, it means the
-// // user is passing a repeated extension to a singular accessor, or the
-// // opposite. In that case the C++ compiler will generate an error
-// // message "no matching member function" to inform the user.
-// typedef ? Singular
-// typedef ? Repeated
//
// static inline ConstType Get(int number, const ExtensionSet& set);
// static inline void Set(int number, ConstType value, ExtensionSet* set);
@@ -670,8 +625,6 @@
class PrimitiveTypeTraits {
public:
typedef Type ConstType;
- typedef Type MutableType;
- typedef PrimitiveTypeTraits<Type> Singular;
static inline ConstType Get(int number, const ExtensionSet& set,
ConstType default_value);
@@ -683,41 +636,11 @@
class RepeatedPrimitiveTypeTraits {
public:
typedef Type ConstType;
- typedef Type MutableType;
- typedef RepeatedPrimitiveTypeTraits<Type> Repeated;
-
- typedef RepeatedField<Type> RepeatedFieldType;
static inline Type Get(int number, const ExtensionSet& set, int index);
static inline void Set(int number, int index, Type value, ExtensionSet* set);
static inline void Add(int number, FieldType field_type,
bool is_packed, Type value, ExtensionSet* set);
-
- static inline const RepeatedField<ConstType>&
- GetRepeated(int number, const ExtensionSet& set);
- static inline RepeatedField<Type>*
- MutableRepeated(int number, FieldType field_type,
- bool is_packed, ExtensionSet* set);
-
- static const RepeatedFieldType* GetDefaultRepeatedField();
-};
-
-// Declared here so that this can be friended below.
-void InitializeDefaultRepeatedFields();
-void DestroyDefaultRepeatedFields();
-
-class LIBPROTOBUF_EXPORT RepeatedPrimitiveGenericTypeTraits {
- private:
- template<typename Type> friend class RepeatedPrimitiveTypeTraits;
- friend void InitializeDefaultRepeatedFields();
- friend void DestroyDefaultRepeatedFields();
- static const RepeatedField<int32>* default_repeated_field_int32_;
- static const RepeatedField<int64>* default_repeated_field_int64_;
- static const RepeatedField<uint32>* default_repeated_field_uint32_;
- static const RepeatedField<uint64>* default_repeated_field_uint64_;
- static const RepeatedField<double>* default_repeated_field_double_;
- static const RepeatedField<float>* default_repeated_field_float_;
- static const RepeatedField<bool>* default_repeated_field_bool_;
};
#define PROTOBUF_DEFINE_PRIMITIVE_TYPE(TYPE, METHOD) \
@@ -742,26 +665,6 @@
int number, FieldType field_type, bool is_packed, \
TYPE value, ExtensionSet* set) { \
set->Add##METHOD(number, field_type, is_packed, value, NULL); \
-} \
-template<> inline const RepeatedField<TYPE>* \
- RepeatedPrimitiveTypeTraits<TYPE>::GetDefaultRepeatedField() { \
- return RepeatedPrimitiveGenericTypeTraits:: \
- default_repeated_field_##TYPE##_; \
-} \
-template<> inline const RepeatedField<TYPE>& \
- RepeatedPrimitiveTypeTraits<TYPE>::GetRepeated(int number, \
- const ExtensionSet& set) { \
- return *reinterpret_cast<const RepeatedField<TYPE>*>( \
- set.GetRawRepeatedField( \
- number, GetDefaultRepeatedField())); \
-} \
-template<> inline RepeatedField<TYPE>* \
- RepeatedPrimitiveTypeTraits<TYPE>::MutableRepeated(int number, \
- FieldType field_type, \
- bool is_packed, \
- ExtensionSet* set) { \
- return reinterpret_cast<RepeatedField<TYPE>*>( \
- set->MutableRawRepeatedField(number, field_type, is_packed, NULL)); \
}
PROTOBUF_DEFINE_PRIMITIVE_TYPE( int32, Int32)
@@ -782,7 +685,6 @@
public:
typedef const string& ConstType;
typedef string* MutableType;
- typedef StringTypeTraits Singular;
static inline const string& Get(int number, const ExtensionSet& set,
ConstType default_value) {
@@ -802,9 +704,6 @@
public:
typedef const string& ConstType;
typedef string* MutableType;
- typedef RepeatedStringTypeTraits Repeated;
-
- typedef RepeatedPtrField<string> RepeatedFieldType;
static inline const string& Get(int number, const ExtensionSet& set,
int index) {
@@ -826,28 +725,6 @@
ExtensionSet* set) {
return set->AddString(number, field_type, NULL);
}
- static inline const RepeatedPtrField<string>&
- GetRepeated(int number, const ExtensionSet& set) {
- return *reinterpret_cast<const RepeatedPtrField<string>*>(
- set.GetRawRepeatedField(number, GetDefaultRepeatedField()));
- }
-
- static inline RepeatedPtrField<string>*
- MutableRepeated(int number, FieldType field_type,
- bool is_packed, ExtensionSet* set) {
- return reinterpret_cast<RepeatedPtrField<string>*>(
- set->MutableRawRepeatedField(number, field_type,
- is_packed, NULL));
- }
-
- static const RepeatedFieldType* GetDefaultRepeatedField() {
- return default_repeated_field_;
- }
-
- private:
- friend void InitializeDefaultRepeatedFields();
- friend void DestroyDefaultRepeatedFields();
- static const RepeatedFieldType *default_repeated_field_;
};
// -------------------------------------------------------------------
@@ -859,8 +736,6 @@
class EnumTypeTraits {
public:
typedef Type ConstType;
- typedef Type MutableType;
- typedef EnumTypeTraits<Type, IsValid> Singular;
static inline ConstType Get(int number, const ExtensionSet& set,
ConstType default_value) {
@@ -877,10 +752,6 @@
class RepeatedEnumTypeTraits {
public:
typedef Type ConstType;
- typedef Type MutableType;
- typedef RepeatedEnumTypeTraits<Type, IsValid> Repeated;
-
- typedef RepeatedField<Type> RepeatedFieldType;
static inline ConstType Get(int number, const ExtensionSet& set, int index) {
return static_cast<Type>(set.GetRepeatedEnum(number, index));
@@ -895,35 +766,6 @@
GOOGLE_DCHECK(IsValid(value));
set->AddEnum(number, field_type, is_packed, value, NULL);
}
- static inline const RepeatedField<Type>& GetRepeated(int number,
- const ExtensionSet&
- set) {
- // Hack: the `Extension` struct stores a RepeatedField<int> for enums.
- // RepeatedField<int> cannot implicitly convert to RepeatedField<EnumType>
- // so we need to do some casting magic. See message.h for similar
- // contortions for non-extension fields.
- return *reinterpret_cast<const RepeatedField<Type>*>(
- set.GetRawRepeatedField(number, GetDefaultRepeatedField()));
- }
-
- static inline RepeatedField<Type>* MutableRepeated(int number,
- FieldType field_type,
- bool is_packed,
- ExtensionSet* set) {
- return reinterpret_cast<RepeatedField<Type>*>(
- set->MutableRawRepeatedField(number, field_type, is_packed, NULL));
- }
-
- static const RepeatedFieldType* GetDefaultRepeatedField() {
- // Hack: as noted above, repeated enum fields are internally stored as a
- // RepeatedField<int>. We need to be able to instantiate global static
- // objects to return as default (empty) repeated fields on non-existent
- // extensions. We would not be able to know a-priori all of the enum types
- // (values of |Type|) to instantiate all of these, so we just re-use int32's
- // default repeated field object.
- return reinterpret_cast<const RepeatedField<Type>*>(
- RepeatedPrimitiveTypeTraits<int32>::GetDefaultRepeatedField());
- }
};
// -------------------------------------------------------------------
@@ -937,7 +779,6 @@
public:
typedef const Type& ConstType;
typedef Type* MutableType;
- typedef MessageTypeTraits<Type> Singular;
static inline ConstType Get(int number, const ExtensionSet& set,
ConstType default_value) {
@@ -953,24 +794,18 @@
MutableType message, ExtensionSet* set) {
set->SetAllocatedMessage(number, field_type, NULL, message);
}
- static inline MutableType Release(int number, FieldType /* field_type */,
+ static inline MutableType Release(int number, FieldType field_type,
ExtensionSet* set) {
return static_cast<Type*>(set->ReleaseMessage(
number, Type::default_instance()));
}
};
-// forward declaration
-class RepeatedMessageGenericTypeTraits;
-
template <typename Type>
class RepeatedMessageTypeTraits {
public:
typedef const Type& ConstType;
typedef Type* MutableType;
- typedef RepeatedMessageTypeTraits<Type> Repeated;
-
- typedef RepeatedPtrField<Type> RepeatedFieldType;
static inline ConstType Get(int number, const ExtensionSet& set, int index) {
return static_cast<const Type&>(set.GetRepeatedMessage(number, index));
@@ -983,47 +818,8 @@
return static_cast<Type*>(
set->AddMessage(number, field_type, Type::default_instance(), NULL));
}
- static inline const RepeatedPtrField<Type>& GetRepeated(int number,
- const ExtensionSet&
- set) {
- // See notes above in RepeatedEnumTypeTraits::GetRepeated(): same
- // casting hack applies here, because a RepeatedPtrField<MessageLite>
- // cannot naturally become a RepeatedPtrType<Type> even though Type is
- // presumably a message. google::protobuf::Message goes through similar contortions
- // with a reinterpret_cast<>.
- return *reinterpret_cast<const RepeatedPtrField<Type>*>(
- set.GetRawRepeatedField(number, GetDefaultRepeatedField()));
- }
- static inline RepeatedPtrField<Type>* MutableRepeated(int number,
- FieldType field_type,
- bool is_packed,
- ExtensionSet* set) {
- return reinterpret_cast<RepeatedPtrField<Type>*>(
- set->MutableRawRepeatedField(number, field_type, is_packed, NULL));
- }
-
- static const RepeatedFieldType* GetDefaultRepeatedField();
};
-// This class exists only to hold a generic default empty repeated field for all
-// message-type repeated field extensions.
-class LIBPROTOBUF_EXPORT RepeatedMessageGenericTypeTraits {
- public:
- typedef RepeatedPtrField< ::google::protobuf::MessageLite*> RepeatedFieldType;
- private:
- template<typename Type> friend class RepeatedMessageTypeTraits;
- friend void InitializeDefaultRepeatedFields();
- friend void DestroyDefaultRepeatedFields();
- static const RepeatedFieldType* default_repeated_field_;
-};
-
-template<typename Type> inline
- const typename RepeatedMessageTypeTraits<Type>::RepeatedFieldType*
- RepeatedMessageTypeTraits<Type>::GetDefaultRepeatedField() {
- return reinterpret_cast<const RepeatedFieldType*>(
- RepeatedMessageGenericTypeTraits::default_repeated_field_);
-}
-
// -------------------------------------------------------------------
// ExtensionIdentifier
@@ -1106,7 +902,7 @@
template <typename _proto_TypeTraits, \
::google::protobuf::internal::FieldType _field_type, \
bool _is_packed> \
- inline typename _proto_TypeTraits::Singular::ConstType GetExtension( \
+ inline typename _proto_TypeTraits::ConstType GetExtension( \
const ::google::protobuf::internal::ExtensionIdentifier< \
CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id) const { \
return _proto_TypeTraits::Get(id.number(), _extensions_, \
@@ -1116,7 +912,7 @@
template <typename _proto_TypeTraits, \
::google::protobuf::internal::FieldType _field_type, \
bool _is_packed> \
- inline typename _proto_TypeTraits::Singular::MutableType MutableExtension( \
+ inline typename _proto_TypeTraits::MutableType MutableExtension( \
const ::google::protobuf::internal::ExtensionIdentifier< \
CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id) { \
return _proto_TypeTraits::Mutable(id.number(), _field_type, \
@@ -1129,7 +925,7 @@
inline void SetExtension( \
const ::google::protobuf::internal::ExtensionIdentifier< \
CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id, \
- typename _proto_TypeTraits::Singular::ConstType value) { \
+ typename _proto_TypeTraits::ConstType value) { \
_proto_TypeTraits::Set(id.number(), _field_type, value, &_extensions_); \
} \
\
@@ -1139,14 +935,14 @@
inline void SetAllocatedExtension( \
const ::google::protobuf::internal::ExtensionIdentifier< \
CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id, \
- typename _proto_TypeTraits::Singular::MutableType value) { \
+ typename _proto_TypeTraits::MutableType value) { \
_proto_TypeTraits::SetAllocated(id.number(), _field_type, \
value, &_extensions_); \
} \
template <typename _proto_TypeTraits, \
::google::protobuf::internal::FieldType _field_type, \
bool _is_packed> \
- inline typename _proto_TypeTraits::Singular::MutableType ReleaseExtension( \
+ inline typename _proto_TypeTraits::MutableType ReleaseExtension( \
const ::google::protobuf::internal::ExtensionIdentifier< \
CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id) { \
return _proto_TypeTraits::Release(id.number(), _field_type, \
@@ -1157,7 +953,7 @@
template <typename _proto_TypeTraits, \
::google::protobuf::internal::FieldType _field_type, \
bool _is_packed> \
- inline typename _proto_TypeTraits::Repeated::ConstType GetExtension( \
+ inline typename _proto_TypeTraits::ConstType GetExtension( \
const ::google::protobuf::internal::ExtensionIdentifier< \
CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id, \
int index) const { \
@@ -1167,7 +963,7 @@
template <typename _proto_TypeTraits, \
::google::protobuf::internal::FieldType _field_type, \
bool _is_packed> \
- inline typename _proto_TypeTraits::Repeated::MutableType MutableExtension( \
+ inline typename _proto_TypeTraits::MutableType MutableExtension( \
const ::google::protobuf::internal::ExtensionIdentifier< \
CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id, \
int index) { \
@@ -1180,14 +976,14 @@
inline void SetExtension( \
const ::google::protobuf::internal::ExtensionIdentifier< \
CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id, \
- int index, typename _proto_TypeTraits::Repeated::ConstType value) { \
+ int index, typename _proto_TypeTraits::ConstType value) { \
_proto_TypeTraits::Set(id.number(), index, value, &_extensions_); \
} \
\
template <typename _proto_TypeTraits, \
::google::protobuf::internal::FieldType _field_type, \
bool _is_packed> \
- inline typename _proto_TypeTraits::Repeated::MutableType AddExtension( \
+ inline typename _proto_TypeTraits::MutableType AddExtension( \
const ::google::protobuf::internal::ExtensionIdentifier< \
CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id) { \
return _proto_TypeTraits::Add(id.number(), _field_type, &_extensions_); \
@@ -1199,32 +995,9 @@
inline void AddExtension( \
const ::google::protobuf::internal::ExtensionIdentifier< \
CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id, \
- typename _proto_TypeTraits::Repeated::ConstType value) { \
+ typename _proto_TypeTraits::ConstType value) { \
_proto_TypeTraits::Add(id.number(), _field_type, _is_packed, \
value, &_extensions_); \
- } \
- \
- template <typename _proto_TypeTraits, \
- ::google::protobuf::internal::FieldType _field_type, \
- bool _is_packed> \
- inline const typename _proto_TypeTraits::Repeated::RepeatedFieldType& \
- GetRepeatedExtension( \
- const ::google::protobuf::internal::ExtensionIdentifier< \
- CLASSNAME, _proto_TypeTraits, _field_type, \
- _is_packed>& id) const { \
- return _proto_TypeTraits::GetRepeated(id.number(), _extensions_); \
- } \
- \
- template <typename _proto_TypeTraits, \
- ::google::protobuf::internal::FieldType _field_type, \
- bool _is_packed> \
- inline typename _proto_TypeTraits::Repeated::RepeatedFieldType* \
- MutableRepeatedExtension( \
- const ::google::protobuf::internal::ExtensionIdentifier< \
- CLASSNAME, _proto_TypeTraits, _field_type, \
- _is_packed>& id) { \
- return _proto_TypeTraits::MutableRepeated(id.number(), _field_type, \
- _is_packed, &_extensions_); \
}
} // namespace internal
diff --git a/linux-x86_64/protoc/include/google/protobuf/generated_enum_reflection.h b/linux-x86_64/protoc/include/google/protobuf/generated_enum_reflection.h
index 3852cea..a09a540 100644
--- a/linux-x86_64/protoc/include/google/protobuf/generated_enum_reflection.h
+++ b/linux-x86_64/protoc/include/google/protobuf/generated_enum_reflection.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -41,8 +41,6 @@
#include <string>
-#include <google/protobuf/stubs/template_util.h>
-
namespace google {
namespace protobuf {
class EnumDescriptor;
@@ -50,10 +48,6 @@
namespace protobuf {
-// This type trait can be used to cause templates to only match proto2 enum
-// types.
-template <typename T> struct is_proto_enum : ::google::protobuf::internal::false_type {};
-
// Returns the EnumDescriptor for enum type E, which must be a
// proto-declared enum type. Code generated by the protocol compiler
// will include specializations of this template for each enum type declared.
diff --git a/linux-x86_64/protoc/include/google/protobuf/generated_message_reflection.h b/linux-x86_64/protoc/include/google/protobuf/generated_message_reflection.h
index b6671ad..c1c142f 100644
--- a/linux-x86_64/protoc/include/google/protobuf/generated_message_reflection.h
+++ b/linux-x86_64/protoc/include/google/protobuf/generated_message_reflection.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -61,7 +61,6 @@
namespace protobuf {
namespace internal {
-class DefaultEmptyOneof;
// Defined in this file.
class GeneratedMessageReflection;
@@ -135,42 +134,6 @@
const DescriptorPool* pool,
MessageFactory* factory,
int object_size);
-
- // Similar with the construction above. Call this construction if the
- // message has oneof definition.
- // Parameters:
- // offsets: An array of ints giving the byte offsets.
- // For each oneof field, the offset is relative to the
- // default_oneof_instance. These can be computed at compile
- // time using the
- // PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET() macro.
- // For each none oneof field, the offset is related to
- // the start of the message object. These can be computed
- // at compile time using the
- // GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET() macro.
- // Besides offsets for all fields, this array also contains
- // offsets for oneof unions. The offset of the i-th oneof
- // union is offsets[descriptor->field_count() + i].
- // default_oneof_instance: The default instance of the oneofs. It is a
- // struct holding the default value of all oneof fields
- // for this message. It is only used to obtain pointers
- // to default instances of oneof fields, which Get
- // methods will return if the field is not set.
- // oneof_case_offset: Offset in the message of an array of uint32s of
- // size descriptor->oneof_decl_count(). Each uint32
- // indicates what field is set for each oneof.
- // other parameters are the same with the construction above.
- GeneratedMessageReflection(const Descriptor* descriptor,
- const Message* default_instance,
- const int offsets[],
- int has_bits_offset,
- int unknown_fields_offset,
- int extensions_offset,
- const void* default_oneof_instance,
- int oneof_case_offset,
- const DescriptorPool* pool,
- MessageFactory* factory,
- int object_size);
~GeneratedMessageReflection();
// implements Reflection -------------------------------------------
@@ -183,16 +146,11 @@
bool HasField(const Message& message, const FieldDescriptor* field) const;
int FieldSize(const Message& message, const FieldDescriptor* field) const;
void ClearField(Message* message, const FieldDescriptor* field) const;
- bool HasOneof(const Message& message,
- const OneofDescriptor* oneof_descriptor) const;
- void ClearOneof(Message* message, const OneofDescriptor* field) const;
void RemoveLast(Message* message, const FieldDescriptor* field) const;
Message* ReleaseLast(Message* message, const FieldDescriptor* field) const;
void Swap(Message* message1, Message* message2) const;
- void SwapFields(Message* message1, Message* message2,
- const vector<const FieldDescriptor*>& fields) const;
void SwapElements(Message* message, const FieldDescriptor* field,
- int index1, int index2) const;
+ int index1, int index2) const;
void ListFields(const Message& message,
vector<const FieldDescriptor*>* output) const;
@@ -221,11 +179,6 @@
const FieldDescriptor* field,
MessageFactory* factory = NULL) const;
- const FieldDescriptor* GetOneofFieldDescriptor(
- const Message& message,
- const OneofDescriptor* oneof_descriptor) const;
-
- public:
void SetInt32 (Message* message,
const FieldDescriptor* field, int32 value) const;
void SetInt64 (Message* message,
@@ -247,9 +200,6 @@
const EnumValueDescriptor* value) const;
Message* MutableMessage(Message* message, const FieldDescriptor* field,
MessageFactory* factory = NULL) const;
- void SetAllocatedMessage(Message* message,
- Message* sub_message,
- const FieldDescriptor* field) const;
Message* ReleaseMessage(Message* message, const FieldDescriptor* field,
MessageFactory* factory = NULL) const;
@@ -343,11 +293,9 @@
const Descriptor* descriptor_;
const Message* default_instance_;
- const void* default_oneof_instance_;
const int* offsets_;
int has_bits_offset_;
- int oneof_case_offset_;
int unknown_fields_offset_;
int extensions_offset_;
int object_size_;
@@ -363,17 +311,9 @@
const FieldDescriptor* field) const;
template <typename Type>
inline const Type& DefaultRaw(const FieldDescriptor* field) const;
- template <typename Type>
- inline const Type& DefaultOneofRaw(const FieldDescriptor* field) const;
inline const uint32* GetHasBits(const Message& message) const;
inline uint32* MutableHasBits(Message* message) const;
- inline uint32 GetOneofCase(
- const Message& message,
- const OneofDescriptor* oneof_descriptor) const;
- inline uint32* MutableOneofCase(
- Message* message,
- const OneofDescriptor* oneof_descriptor) const;
inline const ExtensionSet& GetExtensionSet(const Message& message) const;
inline ExtensionSet* MutableExtensionSet(Message* message) const;
@@ -383,26 +323,6 @@
const FieldDescriptor* field) const;
inline void ClearBit(Message* message,
const FieldDescriptor* field) const;
- inline void SwapBit(Message* message1,
- Message* message2,
- const FieldDescriptor* field) const;
-
- // This function only swaps the field. Should swap corresponding has_bit
- // before or after using this function.
- void SwapField(Message* message1,
- Message* message2,
- const FieldDescriptor* field) const;
-
- void SwapOneofField(Message* message1,
- Message* message2,
- const OneofDescriptor* oneof_descriptor) const;
-
- inline bool HasOneofField(const Message& message,
- const FieldDescriptor* field) const;
- inline void SetOneofCase(Message* message,
- const FieldDescriptor* field) const;
- inline void ClearOneofField(Message* message,
- const FieldDescriptor* field) const;
template <typename Type>
inline const Type& GetField(const Message& message,
@@ -456,14 +376,9 @@
// be confused by an unaligned pointer.
#define GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TYPE, FIELD) \
static_cast<int>( \
- reinterpret_cast<const char*>( \
- &reinterpret_cast<const TYPE*>(16)->FIELD) - \
- reinterpret_cast<const char*>(16))
-
-#define PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ONEOF, FIELD) \
- static_cast<int>( \
- reinterpret_cast<const char*>(&(ONEOF->FIELD)) \
- - reinterpret_cast<const char*>(ONEOF))
+ reinterpret_cast<const char*>( \
+ &reinterpret_cast<const TYPE*>(16)->FIELD) - \
+ reinterpret_cast<const char*>(16))
// There are some places in proto2 where dynamic_cast would be useful as an
// optimization. For example, take Message::MergeFrom(const Message& other).
diff --git a/linux-x86_64/protoc/include/google/protobuf/generated_message_util.h b/linux-x86_64/protoc/include/google/protobuf/generated_message_util.h
index 678f92a..b2fb8f0 100644
--- a/linux-x86_64/protoc/include/google/protobuf/generated_message_util.h
+++ b/linux-x86_64/protoc/include/google/protobuf/generated_message_util.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -38,18 +38,13 @@
#ifndef GOOGLE_PROTOBUF_GENERATED_MESSAGE_UTIL_H__
#define GOOGLE_PROTOBUF_GENERATED_MESSAGE_UTIL_H__
-#include <assert.h>
#include <string>
-#include <google/protobuf/stubs/once.h>
-
#include <google/protobuf/stubs/common.h>
namespace google {
-
namespace protobuf {
namespace internal {
-
// Annotation for the compiler to emit a deprecation message if a field marked
// with option 'deprecated=true' is used in the code, or for other things in
// generated code which are deprecated.
@@ -64,26 +59,8 @@
LIBPROTOBUF_EXPORT double Infinity();
LIBPROTOBUF_EXPORT double NaN();
-// TODO(jieluo): Change to template. We have tried to use template,
-// but it causes net/rpc/python:rpcutil_test fail (the empty string will
-// init twice). It may related to swig. Change to template after we
-// found the solution.
-
-// Default empty string object. Don't use the pointer directly. Instead, call
-// GetEmptyString() to get the reference.
-LIBPROTOBUF_EXPORT extern const ::std::string* empty_string_;
-LIBPROTOBUF_EXPORT extern ProtobufOnceType empty_string_once_init_;
-LIBPROTOBUF_EXPORT void InitEmptyString();
-
-
-LIBPROTOBUF_EXPORT inline const ::std::string& GetEmptyStringAlreadyInited() {
- assert(empty_string_ != NULL);
- return *empty_string_;
-}
-LIBPROTOBUF_EXPORT inline const ::std::string& GetEmptyString() {
- ::google::protobuf::GoogleOnceInit(&empty_string_once_init_, &InitEmptyString);
- return GetEmptyStringAlreadyInited();
-}
+// Constant used for empty default strings.
+LIBPROTOBUF_EXPORT extern const ::std::string kEmptyString;
// Defined in generated_message_reflection.cc -- not actually part of the lite
// library.
@@ -93,19 +70,6 @@
// get the declaration from this file.
LIBPROTOBUF_EXPORT int StringSpaceUsedExcludingSelf(const string& str);
-
-// True if IsInitialized() is true for all elements of t. Type is expected
-// to be a RepeatedPtrField<some message type>. It's useful to have this
-// helper here to keep the protobuf compiler from ever having to emit loops in
-// IsInitialized() methods. We want the C++ compiler to inline this or not
-// as it sees fit.
-template <class Type> bool AllAreInitialized(const Type& t) {
- for (int i = t.size(); --i >= 0; ) {
- if (!t.Get(i).IsInitialized()) return false;
- }
- return true;
-}
-
} // namespace internal
} // namespace protobuf
diff --git a/linux-x86_64/protoc/include/google/protobuf/io/coded_stream.h b/linux-x86_64/protoc/include/google/protobuf/io/coded_stream.h
index 81fabb1..66cbee0 100644
--- a/linux-x86_64/protoc/include/google/protobuf/io/coded_stream.h
+++ b/linux-x86_64/protoc/include/google/protobuf/io/coded_stream.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -233,22 +233,11 @@
// Read a tag. This calls ReadVarint32() and returns the result, or returns
// zero (which is not a valid tag) if ReadVarint32() fails. Also, it updates
// the last tag value, which can be checked with LastTagWas().
- // Always inline because this is only called in one place per parse loop
+ // Always inline because this is only called in once place per parse loop
// but it is called for every iteration of said loop, so it should be fast.
// GCC doesn't want to inline this by default.
uint32 ReadTag() GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
- // This usually a faster alternative to ReadTag() when cutoff is a manifest
- // constant. It does particularly well for cutoff >= 127. The first part
- // of the return value is the tag that was read, though it can also be 0 in
- // the cases where ReadTag() would return 0. If the second part is true
- // then the tag is known to be in [0, cutoff]. If not, the tag either is
- // above cutoff or is 0. (There's intentional wiggle room when tag is 0,
- // because that can arise in several ways, and for best performance we want
- // to avoid an extra "is tag == 0?" check here.)
- inline std::pair<uint32, bool> ReadTagWithCutoff(uint32 cutoff)
- GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
-
// Usually returns true if calling ReadVarint32() now would produce the given
// value. Will always return false if ReadVarint32() would not return the
// given value. If ExpectTag() returns true, it also advances past
@@ -275,8 +264,8 @@
// zero, and ConsumedEntireMessage() will return true.
bool ExpectAtEnd();
- // If the last call to ReadTag() or ReadTagWithCutoff() returned the
- // given value, returns true. Otherwise, returns false;
+ // If the last call to ReadTag() returned the given value, returns true.
+ // Otherwise, returns false;
//
// This is needed because parsers for some types of embedded messages
// (with field type TYPE_GROUP) don't actually know that they've reached the
@@ -344,7 +333,7 @@
// cause integer overflows is 512MB. The default limit is 64MB. Apps
// should set shorter limits if possible. If warning_threshold is not -1,
// a warning will be printed to stderr after warning_threshold bytes are
- // read. For backwards compatibility all negative values get squashed to -1,
+ // read. For backwards compatibility all negative values get squached to -1,
// as other negative values might have special internal meanings.
// An error will always be printed to stderr if the limit is reached.
//
@@ -367,10 +356,6 @@
// something unusual.
void SetTotalBytesLimit(int total_bytes_limit, int warning_threshold);
- // The Total Bytes Limit minus the Current Position, or -1 if there
- // is no Total Bytes Limit.
- int BytesUntilTotalBytesLimit() const;
-
// Recursion Limit -------------------------------------------------
// To prevent corrupt or malicious messages from causing stack overflows,
// we must keep track of the depth of recursion when parsing embedded
@@ -481,7 +466,7 @@
int overflow_bytes_;
// LastTagWas() stuff.
- uint32 last_tag_; // result of last ReadTag() or ReadTagWithCutoff().
+ uint32 last_tag_; // result of last ReadTag().
// This is set true by ReadTag{Fallback/Slow}() if it is called when exactly
// at EOF, or by ExpectAtEnd() when it returns true. This happens when we
@@ -653,9 +638,6 @@
// Write raw bytes, copying them from the given buffer.
void WriteRaw(const void* buffer, int size);
- // Like WriteRaw() but will try to write aliased data if aliasing is
- // turned on.
- void WriteRawMaybeAliased(const void* data, int size);
// Like WriteRaw() but writing directly to the target array.
// This is _not_ inlined, as the compiler often optimizes memcpy into inline
// copy loops. Since this gets called by every field with string or bytes
@@ -667,21 +649,8 @@
void WriteString(const string& str);
// Like WriteString() but writing directly to the target array.
static uint8* WriteStringToArray(const string& str, uint8* target);
- // Write the varint-encoded size of str followed by str.
- static uint8* WriteStringWithSizeToArray(const string& str, uint8* target);
- // Instructs the CodedOutputStream to allow the underlying
- // ZeroCopyOutputStream to hold pointers to the original structure instead of
- // copying, if it supports it (i.e. output->AllowsAliasing() is true). If the
- // underlying stream does not support aliasing, then enabling it has no
- // affect. For now, this only affects the behavior of
- // WriteRawMaybeAliased().
- //
- // NOTE: It is caller's responsibility to ensure that the chunk of memory
- // remains live until all of the data has been consumed from the stream.
- void EnableAliasing(bool enabled);
-
// Write a 32-bit little-endian integer.
void WriteLittleEndian32(uint32 value);
// Like WriteLittleEndian32() but writing directly to the target array.
@@ -756,7 +725,6 @@
int buffer_size_;
int total_bytes_; // Sum of sizes of all buffers seen so far.
bool had_error_; // Whether an error occurred during output.
- bool aliasing_enabled_; // See EnableAliasing().
// Advance the buffer by a given number of bytes.
void Advance(int amount);
@@ -765,10 +733,6 @@
// Advance(buffer_size_).
bool Refresh();
- // Like WriteRaw() but may avoid copying if the underlying
- // ZeroCopyOutputStream supports it.
- void WriteAliasedRaw(const void* buffer, int size);
-
static uint8* WriteVarint32FallbackToArray(uint32 value, uint8* target);
// Always-inlined versions of WriteVarint* functions so that code can be
@@ -886,45 +850,6 @@
}
}
-inline std::pair<uint32, bool> CodedInputStream::ReadTagWithCutoff(
- uint32 cutoff) {
- // In performance-sensitive code we can expect cutoff to be a compile-time
- // constant, and things like "cutoff >= kMax1ByteVarint" to be evaluated at
- // compile time.
- if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_)) {
- // Hot case: buffer_ non_empty, buffer_[0] in [1, 128).
- // TODO(gpike): Is it worth rearranging this? E.g., if the number of fields
- // is large enough then is it better to check for the two-byte case first?
- if (static_cast<int8>(buffer_[0]) > 0) {
- const uint32 kMax1ByteVarint = 0x7f;
- uint32 tag = last_tag_ = buffer_[0];
- Advance(1);
- return make_pair(tag, cutoff >= kMax1ByteVarint || tag <= cutoff);
- }
- // Other hot case: cutoff >= 0x80, buffer_ has at least two bytes available,
- // and tag is two bytes. The latter is tested by bitwise-and-not of the
- // first byte and the second byte.
- if (cutoff >= 0x80 &&
- GOOGLE_PREDICT_TRUE(buffer_ + 1 < buffer_end_) &&
- GOOGLE_PREDICT_TRUE((buffer_[0] & ~buffer_[1]) >= 0x80)) {
- const uint32 kMax2ByteVarint = (0x7f << 7) + 0x7f;
- uint32 tag = last_tag_ = (1u << 7) * buffer_[1] + (buffer_[0] - 0x80);
- Advance(2);
- // It might make sense to test for tag == 0 now, but it is so rare that
- // that we don't bother. A varint-encoded 0 should be one byte unless
- // the encoder lost its mind. The second part of the return value of
- // this function is allowed to be either true or false if the tag is 0,
- // so we don't have to check for tag == 0. We may need to check whether
- // it exceeds cutoff.
- bool at_or_below_cutoff = cutoff >= kMax2ByteVarint || tag <= cutoff;
- return make_pair(tag, at_or_below_cutoff);
- }
- }
- // Slow path
- last_tag_ = ReadTagFallback();
- return make_pair(last_tag_, static_cast<uint32>(last_tag_ - 1) < cutoff);
-}
-
inline bool CodedInputStream::LastTagWas(uint32 expected) {
return last_tag_ == expected;
}
@@ -1104,15 +1029,6 @@
WriteRaw(str.data(), static_cast<int>(str.size()));
}
-inline void CodedOutputStream::WriteRawMaybeAliased(
- const void* data, int size) {
- if (aliasing_enabled_) {
- WriteAliasedRaw(data, size);
- } else {
- WriteRaw(data, size);
- }
-}
-
inline uint8* CodedOutputStream::WriteStringToArray(
const string& str, uint8* target) {
return WriteRawToArray(str.data(), static_cast<int>(str.size()), target);
diff --git a/linux-x86_64/protoc/include/google/protobuf/io/gzip_stream.h b/linux-x86_64/protoc/include/google/protobuf/io/gzip_stream.h
index c7ccc26..365e9ea 100644
--- a/linux-x86_64/protoc/include/google/protobuf/io/gzip_stream.h
+++ b/linux-x86_64/protoc/include/google/protobuf/io/gzip_stream.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -118,7 +118,7 @@
ZLIB = 2,
};
- struct Options {
+ struct LIBPROTOBUF_EXPORT Options {
// Defaults to GZIP.
Format format;
diff --git a/linux-x86_64/protoc/include/google/protobuf/io/printer.h b/linux-x86_64/protoc/include/google/protobuf/io/printer.h
index f06cbf2..5be4854 100644
--- a/linux-x86_64/protoc/include/google/protobuf/io/printer.h
+++ b/linux-x86_64/protoc/include/google/protobuf/io/printer.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
diff --git a/linux-x86_64/protoc/include/google/protobuf/io/tokenizer.h b/linux-x86_64/protoc/include/google/protobuf/io/tokenizer.h
index 8c6220a..d85b82f 100644
--- a/linux-x86_64/protoc/include/google/protobuf/io/tokenizer.h
+++ b/linux-x86_64/protoc/include/google/protobuf/io/tokenizer.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -67,8 +67,7 @@
// Indicates that there was a warning in the input at the given line and
// column numbers. The numbers are zero-based, so you may want to add
// 1 to each before printing them.
- virtual void AddWarning(int /* line */, int /* column */,
- const string& /* message */) { }
+ virtual void AddWarning(int line, int column, const string& message) { }
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ErrorCollector);
@@ -229,21 +228,6 @@
// Sets the comment style.
void set_comment_style(CommentStyle style) { comment_style_ = style; }
- // Whether to require whitespace between a number and a field name.
- // Default is true. Do not use this; for Google-internal cleanup only.
- void set_require_space_after_number(bool require) {
- require_space_after_number_ = require;
- }
-
- // Whether to allow string literals to span multiple lines. Default is false.
- // Do not use this; for Google-internal cleanup only.
- void set_allow_multiline_strings(bool allow) {
- allow_multiline_strings_ = allow;
- }
-
- // External helper: validate an identifier.
- static bool IsIdentifier(const string& text);
-
// -----------------------------------------------------------------
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Tokenizer);
@@ -274,8 +258,6 @@
// Options.
bool allow_f_after_float_;
CommentStyle comment_style_;
- bool require_space_after_number_;
- bool allow_multiline_strings_;
// Since we count columns we need to interpret tabs somehow. We'll take
// the standard 8-character definition for lack of any way to do better.
diff --git a/linux-x86_64/protoc/include/google/protobuf/io/zero_copy_stream.h b/linux-x86_64/protoc/include/google/protobuf/io/zero_copy_stream.h
index 52650fc..db5326f 100644
--- a/linux-x86_64/protoc/include/google/protobuf/io/zero_copy_stream.h
+++ b/linux-x86_64/protoc/include/google/protobuf/io/zero_copy_stream.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -226,16 +226,6 @@
// Returns the total number of bytes written since this object was created.
virtual int64 ByteCount() const = 0;
- // Write a given chunk of data to the output. Some output streams may
- // implement this in a way that avoids copying. Check AllowsAliasing() before
- // calling WriteAliasedRaw(). It will GOOGLE_CHECK fail if WriteAliasedRaw() is
- // called on a stream that does not allow aliasing.
- //
- // NOTE: It is caller's responsibility to ensure that the chunk of memory
- // remains live until all of the data has been consumed from the stream.
- virtual bool WriteAliasedRaw(const void* data, int size);
- virtual bool AllowsAliasing() const { return false; }
-
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ZeroCopyOutputStream);
diff --git a/linux-x86_64/protoc/include/google/protobuf/io/zero_copy_stream_impl.h b/linux-x86_64/protoc/include/google/protobuf/io/zero_copy_stream_impl.h
index 0746fa6..9fedb00 100644
--- a/linux-x86_64/protoc/include/google/protobuf/io/zero_copy_stream_impl.h
+++ b/linux-x86_64/protoc/include/google/protobuf/io/zero_copy_stream_impl.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -344,7 +344,6 @@
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);
};
diff --git a/linux-x86_64/protoc/include/google/protobuf/io/zero_copy_stream_impl_lite.h b/linux-x86_64/protoc/include/google/protobuf/io/zero_copy_stream_impl_lite.h
index e18da72..153f543 100644
--- a/linux-x86_64/protoc/include/google/protobuf/io/zero_copy_stream_impl_lite.h
+++ b/linux-x86_64/protoc/include/google/protobuf/io/zero_copy_stream_impl_lite.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -48,7 +48,6 @@
#include <iosfwd>
#include <google/protobuf/io/zero_copy_stream.h>
#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/stubs/stl_util.h>
namespace google {
@@ -334,19 +333,6 @@
// ===================================================================
-// Return a pointer to mutable characters underlying the given string. The
-// 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(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
-}
-
} // namespace io
} // namespace protobuf
diff --git a/linux-x86_64/protoc/include/google/protobuf/message.h b/linux-x86_64/protoc/include/google/protobuf/message.h
index 9593560..0f90bc1 100644
--- a/linux-x86_64/protoc/include/google/protobuf/message.h
+++ b/linux-x86_64/protoc/include/google/protobuf/message.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -110,9 +110,15 @@
#ifndef GOOGLE_PROTOBUF_MESSAGE_H__
#define GOOGLE_PROTOBUF_MESSAGE_H__
-#include <iosfwd>
-#include <string>
#include <vector>
+#include <string>
+
+#ifdef __DECCXX
+// HP C++'s iosfwd doesn't work.
+#include <iostream>
+#else
+#include <iosfwd>
+#endif
#include <google/protobuf/message_lite.h>
@@ -120,8 +126,6 @@
#include <google/protobuf/descriptor.h>
-#define GOOGLE_PROTOBUF_HAS_ONEOF
-
namespace google {
namespace protobuf {
@@ -180,10 +184,9 @@
virtual void CopyFrom(const Message& from);
// Merge the fields from the given message into this message. Singular
- // fields will be overwritten, if specified in from, except for embedded
- // messages which will be merged. Repeated fields will be concatenated.
- // The given message must be of the same type as this message (i.e. the
- // exact same class).
+ // fields will be overwritten, except for embedded messages which will
+ // be merged. Repeated fields will be concatenated. The given message
+ // must be of the same type as this message (i.e. the exact same class).
virtual void MergeFrom(const Message& from);
// Verifies that IsInitialized() returns true. GOOGLE_CHECK-fails otherwise, with
@@ -385,26 +388,6 @@
virtual void ClearField(Message* message,
const FieldDescriptor* field) const = 0;
- // Check if the oneof is set. Returns ture if any field in oneof
- // is set, false otherwise.
- // TODO(jieluo) - make it pure virtual after updating all
- // the subclasses.
- virtual bool HasOneof(const Message& message,
- const OneofDescriptor* oneof_descriptor) const {
- return false;
- }
-
- virtual void ClearOneof(Message* message,
- const OneofDescriptor* oneof_descriptor) const {}
-
- // Returns the field descriptor if the oneof is set. NULL otherwise.
- // TODO(jieluo) - make it pure virtual.
- virtual const FieldDescriptor* GetOneofFieldDescriptor(
- const Message& message,
- const OneofDescriptor* oneof_descriptor) const {
- return NULL;
- }
-
// Removes the last element of a repeated field.
// We don't provide a way to remove any element other than the last
// because it invites inefficient use, such as O(n^2) filtering loops
@@ -422,17 +405,11 @@
// Swap the complete contents of two messages.
virtual void Swap(Message* message1, Message* message2) const = 0;
- // Swap fields listed in fields vector of two messages.
- virtual void SwapFields(Message* message1,
- Message* message2,
- const vector<const FieldDescriptor*>& fields)
- const = 0;
-
// Swap two elements of a repeated field.
virtual void SwapElements(Message* message,
- const FieldDescriptor* field,
- int index1,
- int index2) const = 0;
+ const FieldDescriptor* field,
+ int index1,
+ int index2) const = 0;
// List all fields of the message which are currently set. This includes
// extensions. Singular fields will only be listed if HasField(field) would
@@ -525,13 +502,6 @@
virtual Message* MutableMessage(Message* message,
const FieldDescriptor* field,
MessageFactory* factory = NULL) const = 0;
- // Replaces the message specified by 'field' with the already-allocated object
- // sub_message, passing ownership to the message. If the field contained a
- // message, that message is deleted. If sub_message is NULL, the field is
- // cleared.
- virtual void SetAllocatedMessage(Message* message,
- Message* sub_message,
- const FieldDescriptor* field) const = 0;
// Releases the message specified by 'field' and returns the pointer,
// ReleaseMessage() will return the message the message object if it exists.
// Otherwise, it may or may not return NULL. In any case, if the return value
@@ -729,7 +699,7 @@
// Calling this method twice with the same Descriptor returns the same
// object. The returned object remains property of the factory. Also, any
// objects created by calling the prototype's New() method share some data
- // with the prototype, so these must be destroyed before the MessageFactory
+ // with the prototype, so these must be destoyed before the MessageFactory
// is destroyed.
//
// The given descriptor must outlive the returned message, and hence must
@@ -787,6 +757,7 @@
const Message& message, const FieldDescriptor* field) const; \
\
template<> \
+LIBPROTOBUF_EXPORT \
RepeatedField<TYPE>* Reflection::MutableRepeatedField<TYPE>( \
Message* message, const FieldDescriptor* field) const;
diff --git a/linux-x86_64/protoc/include/google/protobuf/message_lite.h b/linux-x86_64/protoc/include/google/protobuf/message_lite.h
index 027cabf..1ec3068 100644
--- a/linux-x86_64/protoc/include/google/protobuf/message_lite.h
+++ b/linux-x86_64/protoc/include/google/protobuf/message_lite.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -109,8 +109,7 @@
// Parsing ---------------------------------------------------------
// Methods for parsing in protocol buffer format. Most of these are
- // just simple wrappers around MergeFromCodedStream(). Clear() will be called
- // before merging the input.
+ // just simple wrappers around MergeFromCodedStream().
// Fill the message with a protocol buffer parsed from the given input
// stream. Returns false on a read error or if the input is in the
diff --git a/linux-x86_64/protoc/include/google/protobuf/reflection_ops.h b/linux-x86_64/protoc/include/google/protobuf/reflection_ops.h
index 4775911..60165c2 100644
--- a/linux-x86_64/protoc/include/google/protobuf/reflection_ops.h
+++ b/linux-x86_64/protoc/include/google/protobuf/reflection_ops.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
diff --git a/linux-x86_64/protoc/include/google/protobuf/repeated_field.h b/linux-x86_64/protoc/include/google/protobuf/repeated_field.h
index 5005183..570d4b7 100644
--- a/linux-x86_64/protoc/include/google/protobuf/repeated_field.h
+++ b/linux-x86_64/protoc/include/google/protobuf/repeated_field.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -46,11 +46,7 @@
#ifndef GOOGLE_PROTOBUF_REPEATED_FIELD_H__
#define GOOGLE_PROTOBUF_REPEATED_FIELD_H__
-#ifdef _MSC_VER
-// This is required for min/max on VS2013 only.
#include <algorithm>
-#endif
-
#include <string>
#include <iterator>
#include <google/protobuf/stubs/common.h>
@@ -76,22 +72,6 @@
// A utility function for logging that doesn't need any template types.
void LogIndexOutOfBounds(int index, int size);
-
-template <typename Iter>
-inline int CalculateReserve(Iter begin, Iter end, std::forward_iterator_tag) {
- return std::distance(begin, end);
-}
-
-template <typename Iter>
-inline int CalculateReserve(Iter begin, Iter end, std::input_iterator_tag) {
- return -1;
-}
-
-template <typename Iter>
-inline int CalculateReserve(Iter begin, Iter end) {
- typedef typename std::iterator_traits<Iter>::iterator_category Category;
- return CalculateReserve(begin, end, Category());
-}
} // namespace internal
@@ -110,7 +90,6 @@
RepeatedField& operator=(const RepeatedField& other);
- bool empty() const;
int size() const;
const Element& Get(int index) const;
@@ -142,11 +121,6 @@
Element* AddAlreadyReserved();
int Capacity() const;
- // Like STL resize. Uses value to fill appended elements.
- // Like Truncate() if new_size <= size(), otherwise this is
- // O(new_size - size()).
- void Resize(int new_size, const Element& value);
-
// Gets the underlying array. This pointer is possibly invalidated by
// any add or remove operation.
Element* mutable_data();
@@ -271,7 +245,6 @@
template <typename TypeHandler>
void Destroy();
- bool empty() const;
int size() const;
template <typename TypeHandler>
@@ -336,6 +309,8 @@
typename TypeHandler::Type* ReleaseCleared();
private:
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedPtrFieldBase);
+
static const int kInitialSize = 0;
void** elements_;
@@ -351,8 +326,6 @@
static inline const typename TypeHandler::Type* cast(const void* element) {
return reinterpret_cast<const typename TypeHandler::Type*>(element);
}
-
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedPtrFieldBase);
};
template <typename GenericType>
@@ -410,7 +383,7 @@
static void Clear(string* value) { value->clear(); }
static void Merge(const string& from, string* to) { *to = from; }
static const Type& default_instance() {
- return ::google::protobuf::internal::GetEmptyString();
+ return ::google::protobuf::internal::kEmptyString;
}
};
@@ -437,7 +410,6 @@
RepeatedPtrField& operator=(const RepeatedPtrField& other);
- bool empty() const;
int size() const;
const Element& Get(int index) const;
@@ -596,16 +568,8 @@
: elements_(NULL),
current_size_(0),
total_size_(kInitialSize) {
- int reserve = internal::CalculateReserve(begin, end);
- if (reserve != -1) {
- Reserve(reserve);
- for (; begin != end; ++begin) {
- AddAlreadyReserved(*begin);
- }
- } else {
- for (; begin != end; ++begin) {
- Add(*begin);
- }
+ for (; begin != end; ++begin) {
+ Add(*begin);
}
}
@@ -623,11 +587,6 @@
}
template <typename Element>
-inline bool RepeatedField<Element>::empty() const {
- return current_size_ == 0;
-}
-
-template <typename Element>
inline int RepeatedField<Element>::size() const {
return current_size_;
}
@@ -649,33 +608,20 @@
return &elements_[current_size_++];
}
-template<typename Element>
-inline void RepeatedField<Element>::Resize(int new_size, const Element& value) {
- GOOGLE_DCHECK_GE(new_size, 0);
- if (new_size > size()) {
- Reserve(new_size);
- std::fill(&elements_[current_size_], &elements_[new_size], value);
- }
- current_size_ = new_size;
-}
-
template <typename Element>
inline const Element& RepeatedField<Element>::Get(int index) const {
- GOOGLE_DCHECK_GE(index, 0);
GOOGLE_DCHECK_LT(index, size());
return elements_[index];
}
template <typename Element>
inline Element* RepeatedField<Element>::Mutable(int index) {
- GOOGLE_DCHECK_GE(index, 0);
GOOGLE_DCHECK_LT(index, size());
return elements_ + index;
}
template <typename Element>
inline void RepeatedField<Element>::Set(int index, const Element& value) {
- GOOGLE_DCHECK_GE(index, 0);
GOOGLE_DCHECK_LT(index, size());
elements_[index] = value;
}
@@ -726,7 +672,6 @@
template <typename Element>
inline void RepeatedField<Element>::MergeFrom(const RepeatedField& other) {
- GOOGLE_CHECK_NE(&other, this);
if (other.current_size_ != 0) {
Reserve(current_size_ + other.current_size_);
CopyArray(elements_ + current_size_, other.elements_, other.current_size_);
@@ -736,7 +681,6 @@
template <typename Element>
inline void RepeatedField<Element>::CopyFrom(const RepeatedField& other) {
- if (&other == this) return;
Clear();
MergeFrom(other);
}
@@ -770,8 +714,7 @@
template <typename Element>
void RepeatedField<Element>::SwapElements(int index1, int index2) {
- using std::swap; // enable ADL with fallback
- swap(elements_[index1], elements_[index2]);
+ std::swap(elements_[index1], elements_[index2]);
}
template <typename Element>
@@ -871,10 +814,6 @@
delete [] elements_;
}
-inline bool RepeatedPtrFieldBase::empty() const {
- return current_size_ == 0;
-}
-
inline int RepeatedPtrFieldBase::size() const {
return current_size_;
}
@@ -882,7 +821,6 @@
template <typename TypeHandler>
inline const typename TypeHandler::Type&
RepeatedPtrFieldBase::Get(int index) const {
- GOOGLE_DCHECK_GE(index, 0);
GOOGLE_DCHECK_LT(index, size());
return *cast<TypeHandler>(elements_[index]);
}
@@ -891,7 +829,6 @@
template <typename TypeHandler>
inline typename TypeHandler::Type*
RepeatedPtrFieldBase::Mutable(int index) {
- GOOGLE_DCHECK_GE(index, 0);
GOOGLE_DCHECK_LT(index, size());
return cast<TypeHandler>(elements_[index]);
}
@@ -902,8 +839,8 @@
return cast<TypeHandler>(elements_[current_size_++]);
}
if (allocated_size_ == total_size_) Reserve(total_size_ + 1);
- typename TypeHandler::Type* result = TypeHandler::New();
++allocated_size_;
+ typename TypeHandler::Type* result = TypeHandler::New();
elements_[current_size_++] = result;
return result;
}
@@ -924,7 +861,6 @@
template <typename TypeHandler>
inline void RepeatedPtrFieldBase::MergeFrom(const RepeatedPtrFieldBase& other) {
- GOOGLE_CHECK_NE(&other, this);
Reserve(current_size_ + other.current_size_);
for (int i = 0; i < other.current_size_; i++) {
TypeHandler::Merge(other.template Get<TypeHandler>(i), Add<TypeHandler>());
@@ -933,7 +869,6 @@
template <typename TypeHandler>
inline void RepeatedPtrFieldBase::CopyFrom(const RepeatedPtrFieldBase& other) {
- if (&other == this) return;
RepeatedPtrFieldBase::Clear<TypeHandler>();
RepeatedPtrFieldBase::MergeFrom<TypeHandler>(other);
}
@@ -966,8 +901,7 @@
}
inline void RepeatedPtrFieldBase::SwapElements(int index1, int index2) {
- using std::swap; // enable ADL with fallback
- swap(elements_[index1], elements_[index2]);
+ std::swap(elements_[index1], elements_[index2]);
}
template <typename TypeHandler>
@@ -1067,8 +1001,7 @@
template <typename Element>
inline RepeatedPtrField<Element>::RepeatedPtrField(
- const RepeatedPtrField& other)
- : RepeatedPtrFieldBase() {
+ const RepeatedPtrField& other) {
CopyFrom(other);
}
@@ -1076,10 +1009,6 @@
template <typename Iter>
inline RepeatedPtrField<Element>::RepeatedPtrField(
Iter begin, const Iter& end) {
- int reserve = internal::CalculateReserve(begin, end);
- if (reserve != -1) {
- Reserve(reserve);
- }
for (; begin != end; ++begin) {
*Add() = *begin;
}
@@ -1099,11 +1028,6 @@
}
template <typename Element>
-inline bool RepeatedPtrField<Element>::empty() const {
- return RepeatedPtrFieldBase::empty();
-}
-
-template <typename Element>
inline int RepeatedPtrField<Element>::size() const {
return RepeatedPtrFieldBase::size();
}
@@ -1258,10 +1182,6 @@
typedef std::iterator<
std::random_access_iterator_tag, Element> superclass;
- // Shadow the value_type in std::iterator<> because const_iterator::value_type
- // needs to be T, not const T.
- typedef typename remove_const<Element>::type value_type;
-
// Let the compiler know that these are type names, so we don't have to
// write "typename" in front of them everywhere.
typedef typename superclass::reference reference;
@@ -1353,10 +1273,6 @@
typedef std::iterator<
std::random_access_iterator_tag, Element*> superclass;
- // Shadow the value_type in std::iterator<> because const_iterator::value_type
- // needs to be T, not const T.
- typedef typename remove_const<Element*>::type value_type;
-
// Let the compiler know that these are type names, so we don't have to
// write "typename" in front of them everywhere.
typedef typename superclass::reference reference;
diff --git a/linux-x86_64/protoc/include/google/protobuf/service.h b/linux-x86_64/protoc/include/google/protobuf/service.h
index cc0b45d..a6a7d16 100644
--- a/linux-x86_64/protoc/include/google/protobuf/service.h
+++ b/linux-x86_64/protoc/include/google/protobuf/service.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
diff --git a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops.h b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops.h
index b1336e3..b8581fa 100644
--- a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops.h
+++ b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2012 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -66,10 +66,9 @@
#ifdef GOOGLE_PROTOBUF_ARCH_64_BIT
// We need to be able to go between Atomic64 and AtomicWord implicitly. This
// means Atomic64 and AtomicWord should be the same type on 64-bit.
-#if defined(__ILP32__) || defined(GOOGLE_PROTOBUF_OS_NACL) || defined(GOOGLE_PROTOBUF_ARCH_SPARC)
+#if defined(GOOGLE_PROTOBUF_OS_NACL)
// NaCl's intptr_t is not actually 64-bits on 64-bit!
// http://code.google.com/p/nativeclient/issues/detail?id=1162
-// sparcv9's pointer type is 32bits
typedef int64 Atomic64;
#else
typedef intptr_t Atomic64;
@@ -121,9 +120,6 @@
Atomic32 old_value,
Atomic32 new_value);
-#if defined(__MINGW32__) && defined(MemoryBarrier)
-#undef MemoryBarrier
-#endif
void MemoryBarrier();
void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value);
void Acquire_Store(volatile Atomic32* ptr, Atomic32 value);
@@ -164,21 +160,14 @@
#define GOOGLE_PROTOBUF_ATOMICOPS_ERROR \
#error "Atomic operations are not supported on your platform"
-// ThreadSanitizer, http://clang.llvm.org/docs/ThreadSanitizer.html.
-#if defined(THREAD_SANITIZER)
-#include <google/protobuf/stubs/atomicops_internals_tsan.h>
// MSVC.
-#elif defined(_MSC_VER)
+#if defined(_MSC_VER)
#if defined(GOOGLE_PROTOBUF_ARCH_IA32) || defined(GOOGLE_PROTOBUF_ARCH_X64)
#include <google/protobuf/stubs/atomicops_internals_x86_msvc.h>
#else
GOOGLE_PROTOBUF_ATOMICOPS_ERROR
#endif
-// Solaris
-#elif defined(GOOGLE_PROTOBUF_OS_SOLARIS)
-#include <google/protobuf/stubs/atomicops_internals_solaris.h>
-
// Apple.
#elif defined(GOOGLE_PROTOBUF_OS_APPLE)
#include <google/protobuf/stubs/atomicops_internals_macosx.h>
@@ -187,24 +176,14 @@
#elif defined(__GNUC__)
#if defined(GOOGLE_PROTOBUF_ARCH_IA32) || defined(GOOGLE_PROTOBUF_ARCH_X64)
#include <google/protobuf/stubs/atomicops_internals_x86_gcc.h>
-#elif defined(GOOGLE_PROTOBUF_ARCH_ARM) && defined(__linux__)
+#elif defined(GOOGLE_PROTOBUF_ARCH_ARM)
#include <google/protobuf/stubs/atomicops_internals_arm_gcc.h>
-#elif defined(GOOGLE_PROTOBUF_ARCH_AARCH64)
-#include <google/protobuf/stubs/atomicops_internals_arm64_gcc.h>
#elif defined(GOOGLE_PROTOBUF_ARCH_ARM_QNX)
#include <google/protobuf/stubs/atomicops_internals_arm_qnx.h>
-#elif defined(GOOGLE_PROTOBUF_ARCH_MIPS) || defined(GOOGLE_PROTOBUF_ARCH_MIPS64)
+#elif defined(GOOGLE_PROTOBUF_ARCH_MIPS)
#include <google/protobuf/stubs/atomicops_internals_mips_gcc.h>
-#elif defined(__native_client__)
+#elif defined(__pnacl__)
#include <google/protobuf/stubs/atomicops_internals_pnacl.h>
-#elif (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4))
-#include <google/protobuf/stubs/atomicops_internals_generic_gcc.h>
-#elif defined(__clang__)
-#if __has_extension(c_atomic)
-#include <google/protobuf/stubs/atomicops_internals_generic_gcc.h>
-#else
-GOOGLE_PROTOBUF_ATOMICOPS_ERROR
-#endif
#else
GOOGLE_PROTOBUF_ATOMICOPS_ERROR
#endif
diff --git a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_arm64_gcc.h b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_arm64_gcc.h
deleted file mode 100644
index 0a2d2b8..0000000
--- a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_arm64_gcc.h
+++ /dev/null
@@ -1,325 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2012 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This file is an internal atomic implementation, use atomicops.h instead.
-
-#ifndef GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_ARM64_GCC_H_
-#define GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_ARM64_GCC_H_
-
-namespace google {
-namespace protobuf {
-namespace internal {
-
-inline void MemoryBarrier() {
- __asm__ __volatile__ ("dmb ish" ::: "memory"); // NOLINT
-}
-
-// NoBarrier versions of the operation include "memory" in the clobber list.
-// This is not required for direct usage of the NoBarrier versions of the
-// operations. However this is required for correctness when they are used as
-// part of the Acquire or Release versions, to ensure that nothing from outside
-// the call is reordered between the operation and the memory barrier. This does
-// not change the code generated, so has no or minimal impact on the
-// NoBarrier operations.
-
-inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
- Atomic32 prev;
- int32_t temp;
-
- __asm__ __volatile__ ( // NOLINT
- "0: \n\t"
- "ldxr %w[prev], %[ptr] \n\t" // Load the previous value.
- "cmp %w[prev], %w[old_value] \n\t"
- "bne 1f \n\t"
- "stxr %w[temp], %w[new_value], %[ptr] \n\t" // Try to store the new value.
- "cbnz %w[temp], 0b \n\t" // Retry if it did not work.
- "1: \n\t"
- : [prev]"=&r" (prev),
- [temp]"=&r" (temp),
- [ptr]"+Q" (*ptr)
- : [old_value]"IJr" (old_value),
- [new_value]"r" (new_value)
- : "cc", "memory"
- ); // NOLINT
-
- return prev;
-}
-
-inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
- Atomic32 new_value) {
- Atomic32 result;
- int32_t temp;
-
- __asm__ __volatile__ ( // NOLINT
- "0: \n\t"
- "ldxr %w[result], %[ptr] \n\t" // Load the previous value.
- "stxr %w[temp], %w[new_value], %[ptr] \n\t" // Try to store the new value.
- "cbnz %w[temp], 0b \n\t" // Retry if it did not work.
- : [result]"=&r" (result),
- [temp]"=&r" (temp),
- [ptr]"+Q" (*ptr)
- : [new_value]"r" (new_value)
- : "memory"
- ); // NOLINT
-
- return result;
-}
-
-inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
- Atomic32 increment) {
- Atomic32 result;
- int32_t temp;
-
- __asm__ __volatile__ ( // NOLINT
- "0: \n\t"
- "ldxr %w[result], %[ptr] \n\t" // Load the previous value.
- "add %w[result], %w[result], %w[increment]\n\t"
- "stxr %w[temp], %w[result], %[ptr] \n\t" // Try to store the result.
- "cbnz %w[temp], 0b \n\t" // Retry on failure.
- : [result]"=&r" (result),
- [temp]"=&r" (temp),
- [ptr]"+Q" (*ptr)
- : [increment]"IJr" (increment)
- : "memory"
- ); // NOLINT
-
- return result;
-}
-
-inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
- Atomic32 increment) {
- MemoryBarrier();
- Atomic32 result = NoBarrier_AtomicIncrement(ptr, increment);
- MemoryBarrier();
-
- return result;
-}
-
-inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
- Atomic32 prev = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
- MemoryBarrier();
-
- return prev;
-}
-
-inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
- MemoryBarrier();
- Atomic32 prev = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
-
- return prev;
-}
-
-inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
- *ptr = value;
-}
-
-inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
- *ptr = value;
- MemoryBarrier();
-}
-
-inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
- __asm__ __volatile__ ( // NOLINT
- "stlr %w[value], %[ptr] \n\t"
- : [ptr]"=Q" (*ptr)
- : [value]"r" (value)
- : "memory"
- ); // NOLINT
-}
-
-inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
- return *ptr;
-}
-
-inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
- Atomic32 value;
-
- __asm__ __volatile__ ( // NOLINT
- "ldar %w[value], %[ptr] \n\t"
- : [value]"=r" (value)
- : [ptr]"Q" (*ptr)
- : "memory"
- ); // NOLINT
-
- return value;
-}
-
-inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
- MemoryBarrier();
- return *ptr;
-}
-
-// 64-bit versions of the operations.
-// See the 32-bit versions for comments.
-
-inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
- Atomic64 old_value,
- Atomic64 new_value) {
- Atomic64 prev;
- int32_t temp;
-
- __asm__ __volatile__ ( // NOLINT
- "0: \n\t"
- "ldxr %[prev], %[ptr] \n\t"
- "cmp %[prev], %[old_value] \n\t"
- "bne 1f \n\t"
- "stxr %w[temp], %[new_value], %[ptr] \n\t"
- "cbnz %w[temp], 0b \n\t"
- "1: \n\t"
- : [prev]"=&r" (prev),
- [temp]"=&r" (temp),
- [ptr]"+Q" (*ptr)
- : [old_value]"IJr" (old_value),
- [new_value]"r" (new_value)
- : "cc", "memory"
- ); // NOLINT
-
- return prev;
-}
-
-inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr,
- Atomic64 new_value) {
- Atomic64 result;
- int32_t temp;
-
- __asm__ __volatile__ ( // NOLINT
- "0: \n\t"
- "ldxr %[result], %[ptr] \n\t"
- "stxr %w[temp], %[new_value], %[ptr] \n\t"
- "cbnz %w[temp], 0b \n\t"
- : [result]"=&r" (result),
- [temp]"=&r" (temp),
- [ptr]"+Q" (*ptr)
- : [new_value]"r" (new_value)
- : "memory"
- ); // NOLINT
-
- return result;
-}
-
-inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,
- Atomic64 increment) {
- Atomic64 result;
- int32_t temp;
-
- __asm__ __volatile__ ( // NOLINT
- "0: \n\t"
- "ldxr %[result], %[ptr] \n\t"
- "add %[result], %[result], %[increment] \n\t"
- "stxr %w[temp], %[result], %[ptr] \n\t"
- "cbnz %w[temp], 0b \n\t"
- : [result]"=&r" (result),
- [temp]"=&r" (temp),
- [ptr]"+Q" (*ptr)
- : [increment]"IJr" (increment)
- : "memory"
- ); // NOLINT
-
- return result;
-}
-
-inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,
- Atomic64 increment) {
- MemoryBarrier();
- Atomic64 result = NoBarrier_AtomicIncrement(ptr, increment);
- MemoryBarrier();
-
- return result;
-}
-
-inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
- Atomic64 old_value,
- Atomic64 new_value) {
- Atomic64 prev = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
- MemoryBarrier();
-
- return prev;
-}
-
-inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
- Atomic64 old_value,
- Atomic64 new_value) {
- MemoryBarrier();
- Atomic64 prev = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
-
- return prev;
-}
-
-inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
- *ptr = value;
-}
-
-inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
- *ptr = value;
- MemoryBarrier();
-}
-
-inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
- __asm__ __volatile__ ( // NOLINT
- "stlr %x[value], %[ptr] \n\t"
- : [ptr]"=Q" (*ptr)
- : [value]"r" (value)
- : "memory"
- ); // NOLINT
-}
-
-inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
- return *ptr;
-}
-
-inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
- Atomic64 value;
-
- __asm__ __volatile__ ( // NOLINT
- "ldar %x[value], %[ptr] \n\t"
- : [value]"=r" (value)
- : [ptr]"Q" (*ptr)
- : "memory"
- ); // NOLINT
-
- return value;
-}
-
-inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
- MemoryBarrier();
- return *ptr;
-}
-
-} // namespace internal
-} // namespace protobuf
-} // namespace google
-
-#endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_ARM64_GCC_H_
diff --git a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_arm_gcc.h b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_arm_gcc.h
index 90e727b..1f4dedc 100644
--- a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_arm_gcc.h
+++ b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_arm_gcc.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2012 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
diff --git a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_arm_qnx.h b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_arm_qnx.h
index 17dfaa5..f050769 100644
--- a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_arm_qnx.h
+++ b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_arm_qnx.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2012 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
diff --git a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_atomicword_compat.h b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_atomicword_compat.h
index eb198ff..e9d8679 100644
--- a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_atomicword_compat.h
+++ b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_atomicword_compat.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2012 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
diff --git a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_generic_gcc.h b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_generic_gcc.h
deleted file mode 100644
index dd7abf6..0000000
--- a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_generic_gcc.h
+++ /dev/null
@@ -1,137 +0,0 @@
-// Copyright 2013 Red Hat Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Red Hat Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This file is an internal atomic implementation, use atomicops.h instead.
-
-#ifndef GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_GCC_H_
-#define GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_GCC_H_
-
-namespace google {
-namespace protobuf {
-namespace internal {
-
-inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
- __atomic_compare_exchange_n(ptr, &old_value, new_value, true,
- __ATOMIC_RELAXED, __ATOMIC_RELAXED);
- return old_value;
-}
-
-inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
- Atomic32 new_value) {
- return __atomic_exchange_n(ptr, new_value, __ATOMIC_RELAXED);
-}
-
-inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
- Atomic32 increment) {
- return __atomic_add_fetch(ptr, increment, __ATOMIC_RELAXED);
-}
-
-inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
- Atomic32 increment) {
- return __atomic_add_fetch(ptr, increment, __ATOMIC_SEQ_CST);
-}
-
-inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
- __atomic_compare_exchange(ptr, &old_value, &new_value, true,
- __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);
- return old_value;
-}
-
-inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
- __atomic_compare_exchange_n(ptr, &old_value, new_value, true,
- __ATOMIC_RELEASE, __ATOMIC_ACQUIRE);
- return old_value;
-}
-
-inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
- __atomic_store_n(ptr, value, __ATOMIC_RELAXED);
-}
-
-inline void MemoryBarrier() {
- __sync_synchronize();
-}
-
-inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
- __atomic_store_n(ptr, value, __ATOMIC_SEQ_CST);
-}
-
-inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
- __atomic_store_n(ptr, value, __ATOMIC_RELEASE);
-}
-
-inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
- return __atomic_load_n(ptr, __ATOMIC_RELAXED);
-}
-
-inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
- return __atomic_load_n(ptr, __ATOMIC_ACQUIRE);
-}
-
-inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
- return __atomic_load_n(ptr, __ATOMIC_SEQ_CST);
-}
-
-#ifdef __LP64__
-
-inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
- __atomic_store_n(ptr, value, __ATOMIC_RELEASE);
-}
-
-inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
- return __atomic_load_n(ptr, __ATOMIC_ACQUIRE);
-}
-
-inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
- Atomic64 old_value,
- Atomic64 new_value) {
- __atomic_compare_exchange_n(ptr, &old_value, new_value, true,
- __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);
- return old_value;
-}
-
-inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
- Atomic64 old_value,
- Atomic64 new_value) {
- __atomic_compare_exchange_n(ptr, &old_value, new_value, true,
- __ATOMIC_RELAXED, __ATOMIC_RELAXED);
- return old_value;
-}
-
-#endif // defined(__LP64__)
-
-} // namespace internal
-} // namespace protobuf
-} // namespace google
-
-#endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_GCC_H_
diff --git a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_macosx.h b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_macosx.h
index 7963324..f9b7581 100644
--- a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_macosx.h
+++ b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_macosx.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2012 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
diff --git a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_mips_gcc.h b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_mips_gcc.h
index e3cd14c..dc46851 100644
--- a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_mips_gcc.h
+++ b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_mips_gcc.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2012 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -78,7 +78,7 @@
__asm__ __volatile__(".set push\n"
".set noreorder\n"
"1:\n"
- "ll %1, %4\n" // old = *ptr
+ "ll %1, %2\n" // old = *ptr
"move %0, %3\n" // temp = new_value
"sc %0, %2\n" // *ptr = temp (with atomic check)
"beqz %0, 1b\n" // start again on atomic error
@@ -100,7 +100,7 @@
__asm__ __volatile__(".set push\n"
".set noreorder\n"
"1:\n"
- "ll %0, %4\n" // temp = *ptr
+ "ll %0, %2\n" // temp = *ptr
"addu %1, %0, %3\n" // temp2 = temp + increment
"sc %1, %2\n" // *ptr = temp2 (with atomic check)
"beqz %1, 1b\n" // start again on atomic error
@@ -178,132 +178,6 @@
return *ptr;
}
-#if defined(__LP64__)
-// 64-bit versions of the atomic ops.
-
-inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
- Atomic64 old_value,
- Atomic64 new_value) {
- Atomic64 prev, tmp;
- __asm__ __volatile__(".set push\n"
- ".set noreorder\n"
- "1:\n"
- "lld %0, %5\n" // prev = *ptr
- "bne %0, %3, 2f\n" // if (prev != old_value) goto 2
- "move %2, %4\n" // tmp = new_value
- "scd %2, %1\n" // *ptr = tmp (with atomic check)
- "beqz %2, 1b\n" // start again on atomic error
- "nop\n" // delay slot nop
- "2:\n"
- ".set pop\n"
- : "=&r" (prev), "=m" (*ptr), "=&r" (tmp)
- : "Ir" (old_value), "r" (new_value), "m" (*ptr)
- : "memory");
- return prev;
-}
-
-// Atomically store new_value into *ptr, returning the previous value held in
-// *ptr. This routine implies no memory barriers.
-inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr,
- Atomic64 new_value) {
- Atomic64 temp, old;
- __asm__ __volatile__(".set push\n"
- ".set noreorder\n"
- "1:\n"
- "lld %1, %4\n" // old = *ptr
- "move %0, %3\n" // temp = new_value
- "scd %0, %2\n" // *ptr = temp (with atomic check)
- "beqz %0, 1b\n" // start again on atomic error
- "nop\n" // delay slot nop
- ".set pop\n"
- : "=&r" (temp), "=&r" (old), "=m" (*ptr)
- : "r" (new_value), "m" (*ptr)
- : "memory");
-
- return old;
-}
-
-// Atomically increment *ptr by "increment". Returns the new value of
-// *ptr with the increment applied. This routine implies no memory barriers.
-inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,
- Atomic64 increment) {
- Atomic64 temp, temp2;
-
- __asm__ __volatile__(".set push\n"
- ".set noreorder\n"
- "1:\n"
- "lld %0, %4\n" // temp = *ptr
- "daddu %1, %0, %3\n" // temp2 = temp + increment
- "scd %1, %2\n" // *ptr = temp2 (with atomic check)
- "beqz %1, 1b\n" // start again on atomic error
- "daddu %1, %0, %3\n" // temp2 = temp + increment
- ".set pop\n"
- : "=&r" (temp), "=&r" (temp2), "=m" (*ptr)
- : "Ir" (increment), "m" (*ptr)
- : "memory");
- // temp2 now holds the final value.
- return temp2;
-}
-
-inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,
- Atomic64 increment) {
- MemoryBarrier();
- Atomic64 res = NoBarrier_AtomicIncrement(ptr, increment);
- MemoryBarrier();
- return res;
-}
-
-// "Acquire" operations
-// ensure that no later memory access can be reordered ahead of the operation.
-// "Release" operations ensure that no previous memory access can be reordered
-// after the operation. "Barrier" operations have both "Acquire" and "Release"
-// semantics. A MemoryBarrier() has "Barrier" semantics, but does no memory
-// access.
-inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
- Atomic64 old_value,
- Atomic64 new_value) {
- Atomic64 res = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
- MemoryBarrier();
- return res;
-}
-
-inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
- Atomic64 old_value,
- Atomic64 new_value) {
- MemoryBarrier();
- return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
-}
-
-inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
- *ptr = value;
-}
-
-inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
- *ptr = value;
- MemoryBarrier();
-}
-
-inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
- MemoryBarrier();
- *ptr = value;
-}
-
-inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
- return *ptr;
-}
-
-inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
- Atomic64 value = *ptr;
- MemoryBarrier();
- return value;
-}
-
-inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
- MemoryBarrier();
- return *ptr;
-}
-#endif
-
} // namespace internal
} // namespace protobuf
} // namespace google
diff --git a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_pnacl.h b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_pnacl.h
index b10ac02..04a91a8 100644
--- a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_pnacl.h
+++ b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_pnacl.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2012 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
diff --git a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_solaris.h b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_solaris.h
deleted file mode 100644
index d8057ec..0000000
--- a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_solaris.h
+++ /dev/null
@@ -1,188 +0,0 @@
-// Copyright 2014 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This file is an internal atomic implementation, use atomicops.h instead.
-
-#ifndef GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_SPARC_GCC_H_
-#define GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_SPARC_GCC_H_
-
-#include <atomic.h>
-
-namespace google {
-namespace protobuf {
-namespace internal {
-
-inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
- return (Atomic32)atomic_cas_32((volatile uint32_t*)ptr, (uint32_t)old_value, (uint32_t)new_value);
-}
-
-inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
- Atomic32 new_value) {
- return (Atomic32)atomic_swap_32((volatile uint32_t*)ptr, (uint32_t)new_value);
-}
-
-inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
- Atomic32 increment) {
- return (Atomic32)atomic_add_32_nv((volatile uint32_t*)ptr, (uint32_t)increment);
-}
-
-inline void MemoryBarrier(void) {
- membar_producer();
- membar_consumer();
-}
-
-inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
- Atomic32 increment) {
- MemoryBarrier();
- Atomic32 ret = NoBarrier_AtomicIncrement(ptr, increment);
- MemoryBarrier();
-
- return ret;
-}
-
-inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
- Atomic32 ret = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
- MemoryBarrier();
-
- return ret;
-}
-
-inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
- MemoryBarrier();
- return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
-}
-
-inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
- *ptr = value;
-}
-
-inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
- *ptr = value;
- membar_producer();
-}
-
-inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
- membar_consumer();
- *ptr = value;
-}
-
-inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
- return *ptr;
-}
-
-inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
- Atomic32 val = *ptr;
- membar_consumer();
- return val;
-}
-
-inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
- membar_producer();
- return *ptr;
-}
-
-#ifdef GOOGLE_PROTOBUF_ARCH_64_BIT
-inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
- Atomic64 old_value,
- Atomic64 new_value) {
- return atomic_cas_64((volatile uint64_t*)ptr, (uint64_t)old_value, (uint64_t)new_value);
-}
-
-inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr, Atomic64 new_value) {
- return atomic_swap_64((volatile uint64_t*)ptr, (uint64_t)new_value);
-}
-
-inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr, Atomic64 increment) {
- return atomic_add_64_nv((volatile uint64_t*)ptr, increment);
-}
-
-inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr, Atomic64 increment) {
- MemoryBarrier();
- Atomic64 ret = atomic_add_64_nv((volatile uint64_t*)ptr, increment);
- MemoryBarrier();
- return ret;
-}
-
-inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
- Atomic64 old_value,
- Atomic64 new_value) {
- Atomic64 ret = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
- MemoryBarrier();
- return ret;
-}
-
-inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
- Atomic64 old_value,
- Atomic64 new_value) {
- MemoryBarrier();
- return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
-}
-
-inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
- *ptr = value;
-}
-
-inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
- *ptr = value;
- membar_producer();
-}
-
-inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
- membar_consumer();
- *ptr = value;
-}
-
-inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
- return *ptr;
-}
-
-inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
- Atomic64 ret = *ptr;
- membar_consumer();
- return ret;
-}
-
-inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
- membar_producer();
- return *ptr;
-}
-#endif
-
-} // namespace internal
-} // namespace protobuf
-} // namespace google
-
-#endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_SPARC_GCC_H_
-
diff --git a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_tsan.h b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_tsan.h
deleted file mode 100644
index 0c90354..0000000
--- a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_tsan.h
+++ /dev/null
@@ -1,219 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2013 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This file is an internal atomic implementation for compiler-based
-// ThreadSanitizer (http://clang.llvm.org/docs/ThreadSanitizer.html).
-// Use atomicops.h instead.
-
-#ifndef GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_TSAN_H_
-#define GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_TSAN_H_
-
-#define ATOMICOPS_COMPILER_BARRIER() __asm__ __volatile__("" : : : "memory")
-
-#include <sanitizer/tsan_interface_atomic.h>
-
-namespace google {
-namespace protobuf {
-namespace internal {
-
-inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32 *ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
- Atomic32 cmp = old_value;
- __tsan_atomic32_compare_exchange_strong(ptr, &cmp, new_value,
- __tsan_memory_order_relaxed, __tsan_memory_order_relaxed);
- return cmp;
-}
-
-inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32 *ptr,
- Atomic32 new_value) {
- return __tsan_atomic32_exchange(ptr, new_value,
- __tsan_memory_order_relaxed);
-}
-
-inline Atomic32 Acquire_AtomicExchange(volatile Atomic32 *ptr,
- Atomic32 new_value) {
- return __tsan_atomic32_exchange(ptr, new_value,
- __tsan_memory_order_acquire);
-}
-
-inline Atomic32 Release_AtomicExchange(volatile Atomic32 *ptr,
- Atomic32 new_value) {
- return __tsan_atomic32_exchange(ptr, new_value,
- __tsan_memory_order_release);
-}
-
-inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32 *ptr,
- Atomic32 increment) {
- return increment + __tsan_atomic32_fetch_add(ptr, increment,
- __tsan_memory_order_relaxed);
-}
-
-inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32 *ptr,
- Atomic32 increment) {
- return increment + __tsan_atomic32_fetch_add(ptr, increment,
- __tsan_memory_order_acq_rel);
-}
-
-inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32 *ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
- Atomic32 cmp = old_value;
- __tsan_atomic32_compare_exchange_strong(ptr, &cmp, new_value,
- __tsan_memory_order_acquire, __tsan_memory_order_acquire);
- return cmp;
-}
-
-inline Atomic32 Release_CompareAndSwap(volatile Atomic32 *ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
- Atomic32 cmp = old_value;
- __tsan_atomic32_compare_exchange_strong(ptr, &cmp, new_value,
- __tsan_memory_order_release, __tsan_memory_order_relaxed);
- return cmp;
-}
-
-inline void NoBarrier_Store(volatile Atomic32 *ptr, Atomic32 value) {
- __tsan_atomic32_store(ptr, value, __tsan_memory_order_relaxed);
-}
-
-inline void Acquire_Store(volatile Atomic32 *ptr, Atomic32 value) {
- __tsan_atomic32_store(ptr, value, __tsan_memory_order_relaxed);
- __tsan_atomic_thread_fence(__tsan_memory_order_seq_cst);
-}
-
-inline void Release_Store(volatile Atomic32 *ptr, Atomic32 value) {
- __tsan_atomic32_store(ptr, value, __tsan_memory_order_release);
-}
-
-inline Atomic32 NoBarrier_Load(volatile const Atomic32 *ptr) {
- return __tsan_atomic32_load(ptr, __tsan_memory_order_relaxed);
-}
-
-inline Atomic32 Acquire_Load(volatile const Atomic32 *ptr) {
- return __tsan_atomic32_load(ptr, __tsan_memory_order_acquire);
-}
-
-inline Atomic32 Release_Load(volatile const Atomic32 *ptr) {
- __tsan_atomic_thread_fence(__tsan_memory_order_seq_cst);
- return __tsan_atomic32_load(ptr, __tsan_memory_order_relaxed);
-}
-
-inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64 *ptr,
- Atomic64 old_value,
- Atomic64 new_value) {
- Atomic64 cmp = old_value;
- __tsan_atomic64_compare_exchange_strong(ptr, &cmp, new_value,
- __tsan_memory_order_relaxed, __tsan_memory_order_relaxed);
- return cmp;
-}
-
-inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64 *ptr,
- Atomic64 new_value) {
- return __tsan_atomic64_exchange(ptr, new_value, __tsan_memory_order_relaxed);
-}
-
-inline Atomic64 Acquire_AtomicExchange(volatile Atomic64 *ptr,
- Atomic64 new_value) {
- return __tsan_atomic64_exchange(ptr, new_value, __tsan_memory_order_acquire);
-}
-
-inline Atomic64 Release_AtomicExchange(volatile Atomic64 *ptr,
- Atomic64 new_value) {
- return __tsan_atomic64_exchange(ptr, new_value, __tsan_memory_order_release);
-}
-
-inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64 *ptr,
- Atomic64 increment) {
- return increment + __tsan_atomic64_fetch_add(ptr, increment,
- __tsan_memory_order_relaxed);
-}
-
-inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64 *ptr,
- Atomic64 increment) {
- return increment + __tsan_atomic64_fetch_add(ptr, increment,
- __tsan_memory_order_acq_rel);
-}
-
-inline void NoBarrier_Store(volatile Atomic64 *ptr, Atomic64 value) {
- __tsan_atomic64_store(ptr, value, __tsan_memory_order_relaxed);
-}
-
-inline void Acquire_Store(volatile Atomic64 *ptr, Atomic64 value) {
- __tsan_atomic64_store(ptr, value, __tsan_memory_order_relaxed);
- __tsan_atomic_thread_fence(__tsan_memory_order_seq_cst);
-}
-
-inline void Release_Store(volatile Atomic64 *ptr, Atomic64 value) {
- __tsan_atomic64_store(ptr, value, __tsan_memory_order_release);
-}
-
-inline Atomic64 NoBarrier_Load(volatile const Atomic64 *ptr) {
- return __tsan_atomic64_load(ptr, __tsan_memory_order_relaxed);
-}
-
-inline Atomic64 Acquire_Load(volatile const Atomic64 *ptr) {
- return __tsan_atomic64_load(ptr, __tsan_memory_order_acquire);
-}
-
-inline Atomic64 Release_Load(volatile const Atomic64 *ptr) {
- __tsan_atomic_thread_fence(__tsan_memory_order_seq_cst);
- return __tsan_atomic64_load(ptr, __tsan_memory_order_relaxed);
-}
-
-inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64 *ptr,
- Atomic64 old_value,
- Atomic64 new_value) {
- Atomic64 cmp = old_value;
- __tsan_atomic64_compare_exchange_strong(ptr, &cmp, new_value,
- __tsan_memory_order_acquire, __tsan_memory_order_acquire);
- return cmp;
-}
-
-inline Atomic64 Release_CompareAndSwap(volatile Atomic64 *ptr,
- Atomic64 old_value,
- Atomic64 new_value) {
- Atomic64 cmp = old_value;
- __tsan_atomic64_compare_exchange_strong(ptr, &cmp, new_value,
- __tsan_memory_order_release, __tsan_memory_order_relaxed);
- return cmp;
-}
-
-inline void MemoryBarrier() {
- __tsan_atomic_thread_fence(__tsan_memory_order_seq_cst);
-}
-
-} // namespace internal
-} // namespace protobuf
-} // namespace google
-
-#undef ATOMICOPS_COMPILER_BARRIER
-
-#endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_TSAN_H_
diff --git a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_x86_gcc.h b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_x86_gcc.h
index edccc59..5324dfb 100644
--- a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_x86_gcc.h
+++ b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_x86_gcc.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2012 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
diff --git a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_x86_msvc.h b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_x86_msvc.h
index e53a641..6f9869d 100644
--- a/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_x86_msvc.h
+++ b/linux-x86_64/protoc/include/google/protobuf/stubs/atomicops_internals_x86_msvc.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2012 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
diff --git a/linux-x86_64/protoc/include/google/protobuf/stubs/common.h b/linux-x86_64/protoc/include/google/protobuf/stubs/common.h
index f096fa9..f287ddf 100644
--- a/linux-x86_64/protoc/include/google/protobuf/stubs/common.h
+++ b/linux-x86_64/protoc/include/google/protobuf/stubs/common.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -113,24 +113,24 @@
// The current version, represented as a single integer to make comparison
// easier: major * 10^6 + minor * 10^3 + micro
-#define GOOGLE_PROTOBUF_VERSION 2006001
+#define GOOGLE_PROTOBUF_VERSION 2005000
// The minimum library version which works with the current version of the
// headers.
-#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 2006000
+#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 2005000
// The minimum header version which works with the current version of
// the library. This constant should only be used by protoc's C++ code
// generator.
-static const int kMinHeaderVersionForLibrary = 2006000;
+static const int kMinHeaderVersionForLibrary = 2005000;
// The minimum protoc version which works with the current version of the
// headers.
-#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 2006000
+#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 2005000
// The minimum header version which works with the current version of
// protoc. This constant should only be used in VerifyVersion().
-static const int kMinHeaderVersionForProtoc = 2006000;
+static const int kMinHeaderVersionForProtoc = 2005000;
// Verifies that the headers and libraries are compatible. Use the macro
// below to call this.
@@ -685,7 +685,6 @@
#undef GOOGLE_LOG_IF
#undef GOOGLE_CHECK
-#undef GOOGLE_CHECK_OK
#undef GOOGLE_CHECK_EQ
#undef GOOGLE_CHECK_NE
#undef GOOGLE_CHECK_LT
@@ -712,7 +711,6 @@
#define GOOGLE_CHECK(EXPRESSION) \
GOOGLE_LOG_IF(FATAL, !(EXPRESSION)) << "CHECK failed: " #EXPRESSION ": "
-#define GOOGLE_CHECK_OK(A) GOOGLE_CHECK(A)
#define GOOGLE_CHECK_EQ(A, B) GOOGLE_CHECK((A) == (B))
#define GOOGLE_CHECK_NE(A, B) GOOGLE_CHECK((A) != (B))
#define GOOGLE_CHECK_LT(A, B) GOOGLE_CHECK((A) < (B))
@@ -722,8 +720,7 @@
namespace internal {
template<typename T>
-T* CheckNotNull(const char* /* file */, int /* line */,
- const char* name, T* val) {
+T* CheckNotNull(const char *file, int line, const char *name, T* val) {
if (val == NULL) {
GOOGLE_LOG(FATAL) << name;
}
diff --git a/linux-x86_64/protoc/include/google/protobuf/stubs/once.h b/linux-x86_64/protoc/include/google/protobuf/stubs/once.h
index cc62bba..7fbc117 100644
--- a/linux-x86_64/protoc/include/google/protobuf/stubs/once.h
+++ b/linux-x86_64/protoc/include/google/protobuf/stubs/once.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -139,24 +139,6 @@
#endif // GOOGLE_PROTOBUF_NO_THREAD_SAFETY
-class GoogleOnceDynamic {
- public:
- GoogleOnceDynamic() : state_(GOOGLE_PROTOBUF_ONCE_INIT) { }
-
- // If this->Init() has not been called before by any thread,
- // execute (*func_with_arg)(arg) then return.
- // Otherwise, wait until that prior invocation has finished
- // executing its function, then return.
- template<typename T>
- void Init(void (*func_with_arg)(T*), T* arg) {
- GoogleOnceInit<T>(&this->state_,
- func_with_arg,
- arg);
- }
- private:
- ProtobufOnceType state_;
-};
-
#define GOOGLE_PROTOBUF_DECLARE_ONCE(NAME) \
::google::protobuf::ProtobufOnceType NAME = GOOGLE_PROTOBUF_ONCE_INIT
diff --git a/linux-x86_64/protoc/include/google/protobuf/stubs/platform_macros.h b/linux-x86_64/protoc/include/google/protobuf/stubs/platform_macros.h
index 7956d07..b1df60e 100644
--- a/linux-x86_64/protoc/include/google/protobuf/stubs/platform_macros.h
+++ b/linux-x86_64/protoc/include/google/protobuf/stubs/platform_macros.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2012 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -33,9 +33,6 @@
#include <google/protobuf/stubs/common.h>
-#define GOOGLE_PROTOBUF_PLATFORM_ERROR \
-#error "Host platform was not detected as supported by protobuf"
-
// Processor architecture detection. For more info on what's defined, see:
// http://msdn.microsoft.com/en-us/library/b0084kay.aspx
// http://www.agner.org/optimize/calling_conventions.pdf
@@ -52,52 +49,22 @@
#elif defined(__ARMEL__)
#define GOOGLE_PROTOBUF_ARCH_ARM 1
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
-#elif defined(__aarch64__)
-#define GOOGLE_PROTOBUF_ARCH_AARCH64 1
-#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
#elif defined(__MIPSEL__)
-#if defined(__LP64__)
-#define GOOGLE_PROTOBUF_ARCH_MIPS64 1
-#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
-#else
#define GOOGLE_PROTOBUF_ARCH_MIPS 1
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
-#endif
#elif defined(__pnacl__)
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
-#elif defined(sparc)
-#define GOOGLE_PROTOBUF_ARCH_SPARC 1
-#ifdef SOLARIS_64BIT_ENABLED
-#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
-#else
+#elif defined(__ppc__)
+#define GOOGLE_PROTOBUF_ARCH_PPC 1
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
-#endif
-#elif defined(__GNUC__)
-# if (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4))
-// We fallback to the generic Clang/GCC >= 4.7 implementation in atomicops.h
-# elif defined(__clang__)
-# if !__has_extension(c_atomic)
-GOOGLE_PROTOBUF_PLATFORM_ERROR
-# endif
-// We fallback to the generic Clang/GCC >= 4.7 implementation in atomicops.h
-# endif
-# if __LP64__
-# define GOOGLE_PROTOBUF_ARCH_64_BIT 1
-# else
-# define GOOGLE_PROTOBUF_ARCH_32_BIT 1
-# endif
#else
-GOOGLE_PROTOBUF_PLATFORM_ERROR
+#error Host architecture was not detected as supported by protobuf
#endif
#if defined(__APPLE__)
#define GOOGLE_PROTOBUF_OS_APPLE
#elif defined(__native_client__)
#define GOOGLE_PROTOBUF_OS_NACL
-#elif defined(sun)
-#define GOOGLE_PROTOBUF_OS_SOLARIS
#endif
-#undef GOOGLE_PROTOBUF_PLATFORM_ERROR
-
#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_
diff --git a/linux-x86_64/protoc/include/google/protobuf/stubs/stl_util.h b/linux-x86_64/protoc/include/google/protobuf/stubs/stl_util.h
deleted file mode 100644
index 9e4c82a..0000000
--- a/linux-x86_64/protoc/include/google/protobuf/stubs/stl_util.h
+++ /dev/null
@@ -1,121 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// from google3/util/gtl/stl_util.h
-
-#ifndef GOOGLE_PROTOBUF_STUBS_STL_UTIL_H__
-#define GOOGLE_PROTOBUF_STUBS_STL_UTIL_H__
-
-#include <google/protobuf/stubs/common.h>
-
-namespace google {
-namespace protobuf {
-
-// STLDeleteContainerPointers()
-// For a range within a container of pointers, calls delete
-// (non-array version) on these pointers.
-// NOTE: for these three functions, we could just implement a DeleteObject
-// functor and then call for_each() on the range and functor, but this
-// requires us to pull in all of algorithm.h, which seems expensive.
-// For hash_[multi]set, it is important that this deletes behind the iterator
-// because the hash_set may call the hash function on the iterator when it is
-// advanced, which could result in the hash function trying to deference a
-// stale pointer.
-template <class ForwardIterator>
-void STLDeleteContainerPointers(ForwardIterator begin,
- ForwardIterator end) {
- while (begin != end) {
- ForwardIterator temp = begin;
- ++begin;
- delete *temp;
- }
-}
-
-// Inside Google, this function implements a horrible, disgusting hack in which
-// we reach into the string's private implementation and resize it without
-// initializing the new bytes. In some cases doing this can significantly
-// improve performance. However, since it's totally non-portable it has no
-// place in open source code. Feel free to fill this function in with your
-// own disgusting hack if you want the perf boost.
-inline void STLStringResizeUninitialized(string* s, size_t new_size) {
- s->resize(new_size);
-}
-
-// Return a mutable char* pointing to a string's internal buffer,
-// which may not be null-terminated. Writing through this pointer will
-// modify the string.
-//
-// string_as_array(&str)[i] is valid for 0 <= i < str.size() until the
-// next call to a string method that invalidates iterators.
-//
-// As of 2006-04, there is no standard-blessed way of getting a
-// mutable reference to a string's internal buffer. However, issue 530
-// (http://www.open-std.org/JTC1/SC22/WG21/docs/lwg-active.html#530)
-// proposes this as the method. According to Matt Austern, this should
-// already work on all current implementations.
-inline char* string_as_array(string* str) {
- // DO NOT USE const_cast<char*>(str->data())! See the unittest for why.
- return str->empty() ? NULL : &*str->begin();
-}
-
-// STLDeleteElements() deletes all the elements in an STL container and clears
-// the container. This function is suitable for use with a vector, set,
-// hash_set, or any other STL container which defines sensible begin(), end(),
-// and clear() methods.
-//
-// If container is NULL, this function is a no-op.
-//
-// As an alternative to calling STLDeleteElements() directly, consider
-// ElementDeleter (defined below), which ensures that your container's elements
-// are deleted when the ElementDeleter goes out of scope.
-template <class T>
-void STLDeleteElements(T *container) {
- if (!container) return;
- STLDeleteContainerPointers(container->begin(), container->end());
- container->clear();
-}
-
-// Given an STL container consisting of (key, value) pairs, STLDeleteValues
-// deletes all the "value" components and clears the container. Does nothing
-// in the case it's given a NULL pointer.
-
-template <class T>
-void STLDeleteValues(T *v) {
- if (!v) return;
- for (typename T::iterator i = v->begin(); i != v->end(); ++i) {
- delete i->second;
- }
- v->clear();
-}
-
-} // namespace protobuf
-} // namespace google
-
-#endif // GOOGLE_PROTOBUF_STUBS_STL_UTIL_H__
diff --git a/linux-x86_64/protoc/include/google/protobuf/text_format.h b/linux-x86_64/protoc/include/google/protobuf/text_format.h
index 2954941..01f3ffb 100644
--- a/linux-x86_64/protoc/include/google/protobuf/text_format.h
+++ b/linux-x86_64/protoc/include/google/protobuf/text_format.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -39,13 +39,11 @@
#define GOOGLE_PROTOBUF_TEXT_FORMAT_H__
#include <map>
-#include <memory>
#include <string>
#include <vector>
-
#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/descriptor.h>
#include <google/protobuf/message.h>
+#include <google/protobuf/descriptor.h>
namespace google {
namespace protobuf {
@@ -87,41 +85,6 @@
int index,
string* output);
- // The default printer that converts scalar values from fields into
- // their string representation.
- // You can derive from this FieldValuePrinter if you want to have
- // fields to be printed in a different way and register it at the
- // Printer.
- class LIBPROTOBUF_EXPORT FieldValuePrinter {
- public:
- FieldValuePrinter();
- virtual ~FieldValuePrinter();
- virtual string PrintBool(bool val) const;
- virtual string PrintInt32(int32 val) const;
- virtual string PrintUInt32(uint32 val) const;
- virtual string PrintInt64(int64 val) const;
- virtual string PrintUInt64(uint64 val) const;
- virtual string PrintFloat(float val) const;
- virtual string PrintDouble(double val) const;
- virtual string PrintString(const string& val) const;
- virtual string PrintBytes(const string& val) const;
- virtual string PrintEnum(int32 val, const string& name) const;
- virtual string PrintFieldName(const Message& message,
- const Reflection* reflection,
- const FieldDescriptor* field) const;
- virtual string PrintMessageStart(const Message& message,
- int field_index,
- int field_count,
- bool single_line_mode) const;
- virtual string PrintMessageEnd(const Message& message,
- int field_index,
- int field_count,
- bool single_line_mode) const;
-
- private:
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldValuePrinter);
- };
-
// Class for those users which require more fine-grained control over how
// a protobuffer message is printed out.
class LIBPROTOBUF_EXPORT Printer {
@@ -157,15 +120,6 @@
single_line_mode_ = single_line_mode;
}
- bool IsInSingleLineMode() {
- return single_line_mode_;
- }
-
- // If use_field_number is true, uses field number instead of field name.
- void SetUseFieldNumber(bool use_field_number) {
- use_field_number_ = use_field_number;
- }
-
// Set true to print repeated primitives in a format like:
// field_name: [1, 2, 3, 4]
// instead of printing each value on its own line. Short format applies
@@ -178,41 +132,11 @@
// Set true to output UTF-8 instead of ASCII. The only difference
// is that bytes >= 0x80 in string fields will not be escaped,
// because they are assumed to be part of UTF-8 multi-byte
- // sequences. This will change the default FieldValuePrinter.
- void SetUseUtf8StringEscaping(bool as_utf8);
-
- // Set the default FieldValuePrinter that is used for all fields that
- // don't have a field-specific printer registered.
- // Takes ownership of the printer.
- void SetDefaultFieldValuePrinter(const FieldValuePrinter* printer);
-
- // Sets whether we want to hide unknown fields or not.
- // Usually unknown fields are printed in a generic way that includes the
- // tag number of the field instead of field name. However, sometimes it
- // is useful to be able to print the message without unknown fields (e.g.
- // for the python protobuf version to maintain consistency between its pure
- // python and c++ implementations).
- void SetHideUnknownFields(bool hide) {
- hide_unknown_fields_ = hide;
+ // sequences.
+ void SetUseUtf8StringEscaping(bool as_utf8) {
+ utf8_string_escaping_ = as_utf8;
}
- // If print_message_fields_in_index_order is true, print fields of a proto
- // message using the order defined in source code instead of the field
- // number. By default, use the field number order.
- void SetPrintMessageFieldsInIndexOrder(
- bool print_message_fields_in_index_order) {
- print_message_fields_in_index_order_ =
- print_message_fields_in_index_order;
- }
-
- // Register a custom field-specific FieldValuePrinter for fields
- // with a particular FieldDescriptor.
- // Returns "true" if the registration succeeded, or "false", if there is
- // already a printer for that FieldDescriptor.
- // Takes ownership of the printer on successful registration.
- bool RegisterFieldValuePrinter(const FieldDescriptor* field,
- const FieldValuePrinter* printer);
-
private:
// Forward declaration of an internal class used to print the text
// output to the OutputStream (see text_format.cc for implementation).
@@ -260,18 +184,9 @@
bool single_line_mode_;
- bool use_field_number_;
-
bool use_short_repeated_primitives_;
- bool hide_unknown_fields_;
-
- bool print_message_fields_in_index_order_;
-
- scoped_ptr<const FieldValuePrinter> default_field_value_printer_;
- typedef map<const FieldDescriptor*,
- const FieldValuePrinter*> CustomPrinterMap;
- CustomPrinterMap custom_printers_;
+ bool utf8_string_escaping_;
};
// Parses a text-format protocol message from the given input stream to
@@ -399,24 +314,12 @@
allow_partial_ = allow;
}
- // Allow field names to be matched case-insensitively.
- // This is not advisable if there are fields that only differ in case, or
- // if you want to enforce writing in the canonical form.
- // This is 'false' by default.
- void AllowCaseInsensitiveField(bool allow) {
- allow_case_insensitive_field_ = allow;
- }
-
// Like TextFormat::ParseFieldValueFromString
bool ParseFieldValueFromString(const string& input,
const FieldDescriptor* field,
Message* output);
- void AllowFieldNumber(bool allow) {
- allow_field_number_ = allow;
- }
-
private:
// Forward declaration of an internal class used to parse text
// representations (see text_format.cc for implementation).
@@ -432,15 +335,9 @@
Finder* finder_;
ParseInfoTree* parse_info_tree_;
bool allow_partial_;
- bool allow_case_insensitive_field_;
bool allow_unknown_field_;
- bool allow_unknown_enum_;
- bool allow_field_number_;
- bool allow_relaxed_whitespace_;
- bool allow_singular_overwrites_;
};
-
private:
// Hack: ParseInfoTree declares TextFormat as a friend which should extend
// the friendship to TextFormat::Parser::ParserImpl, but unfortunately some
@@ -461,7 +358,6 @@
info_tree->RecordLocation(field, location);
}
-
inline TextFormat::ParseInfoTree* TextFormat::CreateNested(
ParseInfoTree* info_tree, const FieldDescriptor* field) {
return info_tree->CreateNested(field);
diff --git a/linux-x86_64/protoc/include/google/protobuf/unknown_field_set.h b/linux-x86_64/protoc/include/google/protobuf/unknown_field_set.h
index ba202eb..825bba8 100644
--- a/linux-x86_64/protoc/include/google/protobuf/unknown_field_set.h
+++ b/linux-x86_64/protoc/include/google/protobuf/unknown_field_set.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -42,6 +42,7 @@
#include <string>
#include <vector>
#include <google/protobuf/stubs/common.h>
+// TODO(jasonh): some people seem to rely on protobufs to include this for them!
namespace google {
namespace protobuf {
@@ -52,7 +53,7 @@
}
namespace internal {
class WireFormat; // wire_format.h
- class MessageSetFieldSkipperUsingCord;
+ class UnknownFieldSetFieldSkipperUsingCord;
// extension_set_heavy.cc
}
@@ -138,7 +139,7 @@
bool ParseFromZeroCopyStream(io::ZeroCopyInputStream* input);
bool ParseFromArray(const void* data, int size);
inline bool ParseFromString(const string& data) {
- return ParseFromArray(data.data(), static_cast<int>(data.size()));
+ return ParseFromArray(data.data(), data.size());
}
private:
@@ -201,12 +202,9 @@
// Make a deep copy of any pointers in this UnknownField.
void DeepCopy();
- // Set the wire type of this UnknownField. Should only be used when this
- // UnknownField is being created.
- inline void SetType(Type type);
- uint32 number_;
- uint32 type_;
+ unsigned int number_ : 29;
+ unsigned int type_ : 3;
union {
uint64 varint_;
uint32 fixed32_;
@@ -236,7 +234,7 @@
}
inline int UnknownFieldSet::field_count() const {
- return (fields_ == NULL) ? 0 : static_cast<int>(fields_->size());
+ return (fields_ == NULL) ? 0 : fields_->size();
}
inline const UnknownField& UnknownFieldSet::field(int index) const {
return (*fields_)[index];
@@ -256,62 +254,57 @@
return static_cast<Type>(type_);
}
-inline uint64 UnknownField::varint() const {
- assert(type() == TYPE_VARINT);
+inline uint64 UnknownField::varint () const {
+ assert(type_ == TYPE_VARINT);
return varint_;
}
inline uint32 UnknownField::fixed32() const {
- assert(type() == TYPE_FIXED32);
+ assert(type_ == TYPE_FIXED32);
return fixed32_;
}
inline uint64 UnknownField::fixed64() const {
- assert(type() == TYPE_FIXED64);
+ assert(type_ == TYPE_FIXED64);
return fixed64_;
}
inline const string& UnknownField::length_delimited() const {
- assert(type() == TYPE_LENGTH_DELIMITED);
+ assert(type_ == TYPE_LENGTH_DELIMITED);
return *length_delimited_.string_value_;
}
inline const UnknownFieldSet& UnknownField::group() const {
- assert(type() == TYPE_GROUP);
+ assert(type_ == TYPE_GROUP);
return *group_;
}
inline void UnknownField::set_varint(uint64 value) {
- assert(type() == TYPE_VARINT);
+ assert(type_ == TYPE_VARINT);
varint_ = value;
}
inline void UnknownField::set_fixed32(uint32 value) {
- assert(type() == TYPE_FIXED32);
+ assert(type_ == TYPE_FIXED32);
fixed32_ = value;
}
inline void UnknownField::set_fixed64(uint64 value) {
- assert(type() == TYPE_FIXED64);
+ assert(type_ == TYPE_FIXED64);
fixed64_ = value;
}
inline void UnknownField::set_length_delimited(const string& value) {
- assert(type() == TYPE_LENGTH_DELIMITED);
+ assert(type_ == TYPE_LENGTH_DELIMITED);
length_delimited_.string_value_->assign(value);
}
inline string* UnknownField::mutable_length_delimited() {
- assert(type() == TYPE_LENGTH_DELIMITED);
+ assert(type_ == TYPE_LENGTH_DELIMITED);
return length_delimited_.string_value_;
}
inline UnknownFieldSet* UnknownField::mutable_group() {
- assert(type() == TYPE_GROUP);
+ assert(type_ == TYPE_GROUP);
return group_;
}
inline int UnknownField::GetLengthDelimitedSize() const {
- GOOGLE_DCHECK_EQ(TYPE_LENGTH_DELIMITED, type());
- return static_cast<int>(length_delimited_.string_value_->size());
+ GOOGLE_DCHECK_EQ(TYPE_LENGTH_DELIMITED, type_);
+ return length_delimited_.string_value_->size();
}
-inline void UnknownField::SetType(Type type) {
- type_ = type;
-}
-
-
} // namespace protobuf
} // namespace google
diff --git a/linux-x86_64/protoc/include/google/protobuf/wire_format.h b/linux-x86_64/protoc/include/google/protobuf/wire_format.h
index 9f26eb2..6cc9002 100644
--- a/linux-x86_64/protoc/include/google/protobuf/wire_format.h
+++ b/linux-x86_64/protoc/include/google/protobuf/wire_format.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -79,7 +79,7 @@
static inline WireFormatLite::WireType WireTypeForField(
const FieldDescriptor* field);
- // Given a FieldDescriptor::Type return its WireType
+ // Given a FieldSescriptor::Type return its WireType
static inline WireFormatLite::WireType WireTypeForFieldType(
FieldDescriptor::Type type);
@@ -180,7 +180,7 @@
// of packed repeated fields.
static uint32 MakeTag(const FieldDescriptor* field);
- // Parse a single field. The input should start out positioned immediately
+ // Parse a single field. The input should start out positioned immidately
// after the tag.
static bool ParseAndMergeField(
uint32 tag,
@@ -228,34 +228,14 @@
};
// Verifies that a string field is valid UTF8, logging an error if not.
- // This function will not be called by newly generated protobuf code
- // but remains present to support existing code.
static void VerifyUTF8String(const char* data, int size, Operation op);
- // The NamedField variant takes a field name in order to produce an
- // informative error message if verification fails.
- static void VerifyUTF8StringNamedField(const char* data,
- int size,
- Operation op,
- const char* field_name);
private:
// Verifies that a string field is valid UTF8, logging an error if not.
static void VerifyUTF8StringFallback(
const char* data,
int size,
- Operation op,
- const char* field_name);
-
- // Skip a MessageSet field.
- static bool SkipMessageSetField(io::CodedInputStream* input,
- uint32 field_number,
- UnknownFieldSet* unknown_fields);
-
- // Parse a MessageSet field.
- static bool ParseAndMergeMessageSetField(uint32 field_number,
- const FieldDescriptor* field,
- Message* message,
- io::CodedInputStream* input);
+ Operation op);
@@ -313,21 +293,13 @@
inline void WireFormat::VerifyUTF8String(const char* data, int size,
WireFormat::Operation op) {
#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
- WireFormat::VerifyUTF8StringFallback(data, size, op, NULL);
+ WireFormat::VerifyUTF8StringFallback(data, size, op);
#else
// Avoid the compiler warning about unsued variables.
(void)data; (void)size; (void)op;
#endif
}
-inline void WireFormat::VerifyUTF8StringNamedField(
- const char* data, int size, WireFormat::Operation op,
- const char* field_name) {
-#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
- WireFormat::VerifyUTF8StringFallback(data, size, op, field_name);
-#endif
-}
-
} // namespace internal
} // namespace protobuf
diff --git a/linux-x86_64/protoc/include/google/protobuf/wire_format_lite.h b/linux-x86_64/protoc/include/google/protobuf/wire_format_lite.h
index 21aa488..cb4fc91 100644
--- a/linux-x86_64/protoc/include/google/protobuf/wire_format_lite.h
+++ b/linux-x86_64/protoc/include/google/protobuf/wire_format_lite.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -163,22 +163,11 @@
// records to an UnknownFieldSet.
static bool SkipField(io::CodedInputStream* input, uint32 tag);
- // Skips a field value with the given tag. The input should start
- // positioned immediately after the tag. Skipped values are recorded to a
- // CodedOutputStream.
- static bool SkipField(io::CodedInputStream* input, uint32 tag,
- io::CodedOutputStream* output);
-
// Reads and ignores a message from the input. Skipped values are simply
// discarded, not recorded anywhere. See WireFormat::SkipMessage() for a
// version that records to an UnknownFieldSet.
static bool SkipMessage(io::CodedInputStream* input);
- // Reads and ignores a message from the input. Skipped values are recorded
- // to a CodedOutputStream.
- static bool SkipMessage(io::CodedInputStream* input,
- io::CodedOutputStream* output);
-
// This macro does the same thing as WireFormatLite::MakeTag(), but the
// result is usable as a compile-time constant, which makes it usable
// as a switch case or a template input. WireFormatLite::MakeTag() is more
@@ -239,9 +228,9 @@
// that file to use these.
// Avoid ugly line wrapping
-#define input io::CodedInputStream* input_arg
-#define output io::CodedOutputStream* output_arg
-#define field_number int field_number_arg
+#define input io::CodedInputStream* input
+#define output io::CodedOutputStream* output
+#define field_number int field_number
#define INL GOOGLE_ATTRIBUTE_ALWAYS_INLINE
// Read fields, not including tags. The assumption is that you already
@@ -351,10 +340,6 @@
static void WriteString(field_number, const string& value, output);
static void WriteBytes (field_number, const string& value, output);
- static void WriteStringMaybeAliased(
- field_number, const string& value, output);
- static void WriteBytesMaybeAliased(
- field_number, const string& value, output);
static void WriteGroup(
field_number, const MessageLite& value, output);
@@ -505,12 +490,6 @@
google::protobuf::io::CodedInputStream* input,
RepeatedField<CType>* value) GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
- // Like ReadRepeatedFixedSizePrimitive but for packed primitive fields.
- template <typename CType, enum FieldType DeclaredType>
- static inline bool ReadPackedFixedSizePrimitive(
- google::protobuf::io::CodedInputStream* input,
- RepeatedField<CType>* value) GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
-
static const CppType kFieldTypeToCppTypeMap[];
static const WireFormatLite::WireType kWireTypeForFieldType[];
@@ -539,24 +518,6 @@
virtual void SkipUnknownEnum(int field_number, int value);
};
-// Subclass of FieldSkipper which saves skipped fields to a CodedOutputStream.
-
-class LIBPROTOBUF_EXPORT CodedOutputStreamFieldSkipper : public FieldSkipper {
- public:
- explicit CodedOutputStreamFieldSkipper(io::CodedOutputStream* unknown_fields)
- : unknown_fields_(unknown_fields) {}
- virtual ~CodedOutputStreamFieldSkipper() {}
-
- // implements FieldSkipper -----------------------------------------
- virtual bool SkipField(io::CodedInputStream* input, uint32 tag);
- virtual bool SkipMessage(io::CodedInputStream* input);
- virtual void SkipUnknownEnum(int field_number, int value);
-
- protected:
- io::CodedOutputStream* unknown_fields_;
-};
-
-
// inline methods ====================================================
inline WireFormatLite::CppType
diff --git a/linux-x86_64/protoc/include/google/protobuf/wire_format_lite_inl.h b/linux-x86_64/protoc/include/google/protobuf/wire_format_lite_inl.h
index 4e8ac9b..641cc92 100644
--- a/linux-x86_64/protoc/include/google/protobuf/wire_format_lite_inl.h
+++ b/linux-x86_64/protoc/include/google/protobuf/wire_format_lite_inl.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -36,11 +36,6 @@
#ifndef GOOGLE_PROTOBUF_WIRE_FORMAT_LITE_INL_H__
#define GOOGLE_PROTOBUF_WIRE_FORMAT_LITE_INL_H__
-#ifdef _MSC_VER
-// This is required for min/max on VS2013 only.
-#include <algorithm>
-#endif
-
#include <string>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/message_lite.h>
@@ -155,8 +150,8 @@
inline bool WireFormatLite::ReadPrimitive<bool, WireFormatLite::TYPE_BOOL>(
io::CodedInputStream* input,
bool* value) {
- uint64 temp;
- if (!input->ReadVarint64(&temp)) return false;
+ uint32 temp;
+ if (!input->ReadVarint32(&temp)) return false;
*value = temp != 0;
return true;
}
@@ -226,11 +221,10 @@
}
template <typename CType, enum WireFormatLite::FieldType DeclaredType>
-inline bool WireFormatLite::ReadRepeatedPrimitive(
- int, // tag_size, unused.
- uint32 tag,
- io::CodedInputStream* input,
- RepeatedField<CType>* values) {
+inline bool WireFormatLite::ReadRepeatedPrimitive(int, // tag_size, unused.
+ uint32 tag,
+ io::CodedInputStream* input,
+ RepeatedField<CType>* values) {
CType value;
if (!ReadPrimitive<CType, DeclaredType>(input, &value)) return false;
values->Add(value);
@@ -290,7 +284,7 @@
return true;
}
-// Specializations of ReadRepeatedPrimitive for the fixed size types, which use
+// Specializations of ReadRepeatedPrimitive for the fixed size types, which use
// the optimized code path.
#define READ_REPEATED_FIXED_SIZE_PRIMITIVE(CPPTYPE, DECLARED_TYPE) \
template <> \
@@ -340,86 +334,6 @@
}
template <typename CType, enum WireFormatLite::FieldType DeclaredType>
-inline bool WireFormatLite::ReadPackedFixedSizePrimitive(
- io::CodedInputStream* input, RepeatedField<CType>* values) {
- uint32 length;
- if (!input->ReadVarint32(&length)) return false;
- const uint32 old_entries = values->size();
- const uint32 new_entries = length / sizeof(CType);
- const uint32 new_bytes = new_entries * sizeof(CType);
- if (new_bytes != length) return false;
- // We would *like* to pre-allocate the buffer to write into (for
- // speed), but *must* avoid performing a very large allocation due
- // to a malicious user-supplied "length" above. So we have a fast
- // path that pre-allocates when the "length" is less than a bound.
- // We determine the bound by calling BytesUntilTotalBytesLimit() and
- // BytesUntilLimit(). These return -1 to mean "no limit set".
- // There are four cases:
- // TotalBytesLimit Limit
- // -1 -1 Use slow path.
- // -1 >= 0 Use fast path if length <= Limit.
- // >= 0 -1 Use slow path.
- // >= 0 >= 0 Use fast path if length <= min(both limits).
- int64 bytes_limit = input->BytesUntilTotalBytesLimit();
- if (bytes_limit == -1) {
- bytes_limit = input->BytesUntilLimit();
- } else {
- bytes_limit =
- min(bytes_limit, static_cast<int64>(input->BytesUntilLimit()));
- }
- if (bytes_limit >= new_bytes) {
- // Fast-path that pre-allocates *values to the final size.
-#if defined(PROTOBUF_LITTLE_ENDIAN)
- values->Resize(old_entries + new_entries, 0);
- // values->mutable_data() may change after Resize(), so do this after:
- void* dest = reinterpret_cast<void*>(values->mutable_data() + old_entries);
- if (!input->ReadRaw(dest, new_bytes)) {
- values->Truncate(old_entries);
- return false;
- }
-#else
- values->Reserve(old_entries + new_entries);
- CType value;
- for (int i = 0; i < new_entries; ++i) {
- if (!ReadPrimitive<CType, DeclaredType>(input, &value)) return false;
- values->AddAlreadyReserved(value);
- }
-#endif
- } else {
- // This is the slow-path case where "length" may be too large to
- // safely allocate. We read as much as we can into *values
- // without pre-allocating "length" bytes.
- CType value;
- for (uint32 i = 0; i < new_entries; ++i) {
- if (!ReadPrimitive<CType, DeclaredType>(input, &value)) return false;
- values->Add(value);
- }
- }
- return true;
-}
-
-// Specializations of ReadPackedPrimitive for the fixed size types, which use
-// an optimized code path.
-#define READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(CPPTYPE, DECLARED_TYPE) \
-template <> \
-inline bool WireFormatLite::ReadPackedPrimitive< \
- CPPTYPE, WireFormatLite::DECLARED_TYPE>( \
- io::CodedInputStream* input, \
- RepeatedField<CPPTYPE>* values) { \
- return ReadPackedFixedSizePrimitive< \
- CPPTYPE, WireFormatLite::DECLARED_TYPE>(input, values); \
-}
-
-READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(uint32, TYPE_FIXED32);
-READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(uint64, TYPE_FIXED64);
-READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(int32, TYPE_SFIXED32);
-READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(int64, TYPE_SFIXED64);
-READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(float, TYPE_FLOAT);
-READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(double, TYPE_DOUBLE);
-
-#undef READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE
-
-template <typename CType, enum WireFormatLite::FieldType DeclaredType>
bool WireFormatLite::ReadPackedPrimitiveNoInline(io::CodedInputStream* input,
RepeatedField<CType>* values) {
return ReadPackedPrimitive<CType, DeclaredType>(input, values);
@@ -746,13 +660,15 @@
// WriteString() to avoid code duplication. If the implementations become
// different, you will need to update that usage.
target = WriteTagToArray(field_number, WIRETYPE_LENGTH_DELIMITED, target);
- return io::CodedOutputStream::WriteStringWithSizeToArray(value, target);
+ target = io::CodedOutputStream::WriteVarint32ToArray(value.size(), target);
+ return io::CodedOutputStream::WriteStringToArray(value, target);
}
inline uint8* WireFormatLite::WriteBytesToArray(int field_number,
const string& value,
uint8* target) {
target = WriteTagToArray(field_number, WIRETYPE_LENGTH_DELIMITED, target);
- return io::CodedOutputStream::WriteStringWithSizeToArray(value, target);
+ target = io::CodedOutputStream::WriteVarint32ToArray(value.size(), target);
+ return io::CodedOutputStream::WriteStringToArray(value, target);
}
diff --git a/linux-x86_64/protoc/lib/libprotobuf-lite.a b/linux-x86_64/protoc/lib/libprotobuf-lite.a
index 2a8a90b..9aeaa14 100644
--- a/linux-x86_64/protoc/lib/libprotobuf-lite.a
+++ b/linux-x86_64/protoc/lib/libprotobuf-lite.a
Binary files differ
diff --git a/linux-x86_64/protoc/lib/libprotobuf-lite.la b/linux-x86_64/protoc/lib/libprotobuf-lite.la
old mode 100644
new mode 100755
index a5bcca5..fac3414
--- a/linux-x86_64/protoc/lib/libprotobuf-lite.la
+++ b/linux-x86_64/protoc/lib/libprotobuf-lite.la
@@ -23,9 +23,9 @@
weak_library_names=''
# Version information for libprotobuf-lite.
-current=9
+current=8
age=0
-revision=1
+revision=0
# Is this an already installed library?
installed=yes
@@ -38,4 +38,4 @@
dlpreopen=''
# Directory that this library needs to be installed in:
-libdir='/tmp/proto/bits/lib'
+libdir='/usr/local/lib'
diff --git a/linux-x86_64/protoc/lib/libprotobuf.a b/linux-x86_64/protoc/lib/libprotobuf.a
index 493e4d8..7653b09 100644
--- a/linux-x86_64/protoc/lib/libprotobuf.a
+++ b/linux-x86_64/protoc/lib/libprotobuf.a
Binary files differ
diff --git a/linux-x86_64/protoc/lib/libprotobuf.la b/linux-x86_64/protoc/lib/libprotobuf.la
old mode 100644
new mode 100755
index 524d80b..9e34964
--- a/linux-x86_64/protoc/lib/libprotobuf.la
+++ b/linux-x86_64/protoc/lib/libprotobuf.la
@@ -23,9 +23,9 @@
weak_library_names=''
# Version information for libprotobuf.
-current=9
+current=8
age=0
-revision=1
+revision=0
# Is this an already installed library?
installed=yes
@@ -38,4 +38,4 @@
dlpreopen=''
# Directory that this library needs to be installed in:
-libdir='/tmp/proto/bits/lib'
+libdir='/usr/local/lib'
diff --git a/linux-x86_64/protoc/lib/libprotoc.a b/linux-x86_64/protoc/lib/libprotoc.a
index 26aeb6b..825c041 100644
--- a/linux-x86_64/protoc/lib/libprotoc.a
+++ b/linux-x86_64/protoc/lib/libprotoc.a
Binary files differ
diff --git a/linux-x86_64/protoc/lib/libprotoc.la b/linux-x86_64/protoc/lib/libprotoc.la
old mode 100644
new mode 100755
index 8947804..0b42f87
--- a/linux-x86_64/protoc/lib/libprotoc.la
+++ b/linux-x86_64/protoc/lib/libprotoc.la
@@ -17,15 +17,15 @@
inherited_linker_flags=' -pthread'
# Libraries that this one depends upon.
-dependency_libs=' /tmp/proto/bits/lib/libprotobuf.la -lpthread -lz'
+dependency_libs=' /usr/local/lib/libprotobuf.la -lpthread -lz'
# Names of additional weak libraries provided by this library
weak_library_names=''
# Version information for libprotoc.
-current=9
+current=8
age=0
-revision=1
+revision=0
# Is this an already installed library?
installed=yes
@@ -38,4 +38,4 @@
dlpreopen=''
# Directory that this library needs to be installed in:
-libdir='/tmp/proto/bits/lib'
+libdir='/usr/local/lib'
diff --git a/linux-x86_64/protoc/lib/pkgconfig/protobuf-lite.pc b/linux-x86_64/protoc/lib/pkgconfig/protobuf-lite.pc
index 2dfbca1..21fa7a7 100644
--- a/linux-x86_64/protoc/lib/pkgconfig/protobuf-lite.pc
+++ b/linux-x86_64/protoc/lib/pkgconfig/protobuf-lite.pc
@@ -1,11 +1,11 @@
-prefix=/tmp/proto/bits
+prefix=/tmp/protoc
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: Protocol Buffers
Description: Google's Data Interchange Format
-Version: 2.6.1
+Version: 2.5.0
Libs: -L${libdir} -lprotobuf-lite -pthread -lpthread
Cflags: -I${includedir} -pthread
# Commented out because it crashes pkg-config *sigh*:
diff --git a/linux-x86_64/protoc/lib/pkgconfig/protobuf.pc b/linux-x86_64/protoc/lib/pkgconfig/protobuf.pc
index edde759..43ee0e5 100644
--- a/linux-x86_64/protoc/lib/pkgconfig/protobuf.pc
+++ b/linux-x86_64/protoc/lib/pkgconfig/protobuf.pc
@@ -1,11 +1,11 @@
-prefix=/tmp/proto/bits
+prefix=/tmp/protoc
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: Protocol Buffers
Description: Google's Data Interchange Format
-Version: 2.6.1
+Version: 2.5.0
Libs: -L${libdir} -lprotobuf -pthread -lpthread
Libs.private: -lz
Cflags: -I${includedir} -pthread
diff --git a/windows/protoc/protoc.exe b/windows/protoc/protoc.exe
index e68f40e..caeaf6c 100755
--- a/windows/protoc/protoc.exe
+++ b/windows/protoc/protoc.exe
Binary files differ
diff --git a/windows/protoc/readme.txt b/windows/protoc/readme.txt
index 220e905..d919519 100644
--- a/windows/protoc/readme.txt
+++ b/windows/protoc/readme.txt
@@ -1,6 +1,6 @@
Protocol Buffers - Google's data interchange format
Copyright 2008 Google Inc.
-https://developers.google.com/protocol-buffers/
+http://code.google.com/p/protobuf/
This package contains a precompiled Win32 binary version of the protocol buffer
compiler (protoc). This binary is intended for Windows users who want to
@@ -12,4 +12,4 @@
You will still need to download the source code package in order to obtain the
Java or Python runtime libraries. Get it from:
- https://github.com/google/protobuf/releases/
+ http://code.google.com/p/protobuf/downloads/