Merge pull request #5038 from xfxyjwf/proto2
Down-integrate proto2 namespace fix.
This commit is contained in:
commit
4c70c9cb17
@ -75,7 +75,7 @@ class MapReflectionFriend {
|
||||
struct MapIterator {
|
||||
PyObject_HEAD;
|
||||
|
||||
std::unique_ptr<google::protobuf::MapIterator> iter;
|
||||
std::unique_ptr<::google::protobuf::MapIterator> iter;
|
||||
|
||||
// A pointer back to the container, so we can notice changes to the version.
|
||||
// We own a ref on this.
|
||||
@ -314,7 +314,7 @@ static MapContainer* GetMap(PyObject* obj) {
|
||||
|
||||
Py_ssize_t MapReflectionFriend::Length(PyObject* _self) {
|
||||
MapContainer* self = GetMap(_self);
|
||||
const Message* message = self->message;
|
||||
const google::protobuf::Message* message = self->message;
|
||||
return message->GetReflection()->MapSize(*message,
|
||||
self->parent_field_descriptor);
|
||||
}
|
||||
@ -423,7 +423,7 @@ int MapContainer::Release() {
|
||||
// ScalarMap ///////////////////////////////////////////////////////////////////
|
||||
|
||||
PyObject *NewScalarMapContainer(
|
||||
CMessage* parent, const FieldDescriptor* parent_field_descriptor) {
|
||||
CMessage* parent, const google::protobuf::FieldDescriptor* parent_field_descriptor) {
|
||||
if (!CheckFieldBelongsToMessage(parent_field_descriptor, parent->message)) {
|
||||
return NULL;
|
||||
}
|
||||
@ -704,7 +704,7 @@ static PyObject* GetCMessage(MessageMapContainer* self, Message* message,
|
||||
}
|
||||
|
||||
PyObject* NewMessageMapContainer(
|
||||
CMessage* parent, const FieldDescriptor* parent_field_descriptor,
|
||||
CMessage* parent, const google::protobuf::FieldDescriptor* parent_field_descriptor,
|
||||
CMessageClass* message_class) {
|
||||
if (!CheckFieldBelongsToMessage(parent_field_descriptor, parent->message)) {
|
||||
return NULL;
|
||||
@ -1011,7 +1011,7 @@ PyObject* MapReflectionFriend::GetIterator(PyObject *_self) {
|
||||
Message* message = self->GetMutableMessage();
|
||||
const Reflection* reflection = message->GetReflection();
|
||||
|
||||
iter->iter.reset(new google::protobuf::MapIterator(
|
||||
iter->iter.reset(new ::google::protobuf::MapIterator(
|
||||
reflection->MapBegin(message, self->parent_field_descriptor)));
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,7 @@ static int AddDescriptors(PyObject* cls, const Descriptor* descriptor) {
|
||||
// <message descriptor>.extensions_by_name[name]
|
||||
// which was defined previously.
|
||||
for (int i = 0; i < descriptor->extension_count(); ++i) {
|
||||
const FieldDescriptor* field = descriptor->extension(i);
|
||||
const google::protobuf::FieldDescriptor* field = descriptor->extension(i);
|
||||
ScopedPyObjectPtr extension_field(PyFieldDescriptor_FromDescriptor(field));
|
||||
if (extension_field == NULL) {
|
||||
return -1;
|
||||
@ -2344,7 +2344,7 @@ static PyObject* RichCompare(CMessage* self, PyObject* other, int opid) {
|
||||
if (!PyObject_TypeCheck(other, CMessage_Type)) {
|
||||
equals = false;
|
||||
}
|
||||
const Message* other_message =
|
||||
const google::protobuf::Message* other_message =
|
||||
reinterpret_cast<CMessage*>(other)->message;
|
||||
// If messages don't have the same descriptors, they are not equal.
|
||||
if (equals &&
|
||||
@ -2352,7 +2352,7 @@ static PyObject* RichCompare(CMessage* self, PyObject* other, int opid) {
|
||||
equals = false;
|
||||
}
|
||||
// Check the message contents.
|
||||
if (equals && !util::MessageDifferencer::Equals(
|
||||
if (equals && !google::protobuf::util::MessageDifferencer::Equals(
|
||||
*self->message,
|
||||
*reinterpret_cast<CMessage*>(other)->message)) {
|
||||
equals = false;
|
||||
|
@ -138,7 +138,7 @@ class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message /* @@protoc_in
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
|
@ -132,7 +132,7 @@ class LIBPROTOBUF_EXPORT Api : public ::google::protobuf::Message /* @@protoc_in
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -322,7 +322,7 @@ class LIBPROTOBUF_EXPORT Method : public ::google::protobuf::Message /* @@protoc
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -505,7 +505,7 @@ class LIBPROTOBUF_EXPORT Mixin : public ::google::protobuf::Message /* @@protoc_
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
|
@ -73,10 +73,10 @@ class DiskSourceTree; // importer.h
|
||||
// then write a main() procedure like this:
|
||||
//
|
||||
// int main(int argc, char* argv[]) {
|
||||
// proto2::compiler::CommandLineInterface cli;
|
||||
// google::protobuf::compiler::CommandLineInterface cli;
|
||||
//
|
||||
// // Support generation of C++ source and headers.
|
||||
// proto2::compiler::cpp::CppGenerator cpp_generator;
|
||||
// google::protobuf::compiler::cpp::CppGenerator cpp_generator;
|
||||
// cli.RegisterGenerator("--cpp_out", &cpp_generator,
|
||||
// "Generate C++ source and header.");
|
||||
//
|
||||
|
@ -1324,7 +1324,7 @@ void GenerateCaseBody(internal::WireFormatLite::WireType wiretype,
|
||||
format(
|
||||
"object = "
|
||||
"CastToBase(&msg->$1$_)->AddWeak(reinterpret_cast<const "
|
||||
"::proto2::MessageLite*>(&$2$::_$3$_default_instance_));\n",
|
||||
"::google::protobuf::MessageLite*>(&$2$::_$3$_default_instance_));\n",
|
||||
FieldName(field), Namespace(field->message_type()),
|
||||
ClassName(field->message_type()));
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ string DefaultInstanceName(const Descriptor* descriptor);
|
||||
// fields.
|
||||
string ReferenceFunctionName(const Descriptor* descriptor);
|
||||
|
||||
// Name of the base class: proto2::Message or proto2::MessageLite.
|
||||
// Name of the base class: google::protobuf::Message or google::protobuf::MessageLite.
|
||||
string SuperClassName(const Descriptor* descriptor, const Options& options);
|
||||
|
||||
// Get the (unqualified) name that should be used for this field in C++ code.
|
||||
|
@ -941,7 +941,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
|
||||
"public:\n"
|
||||
"#if $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"
|
||||
" static const char* _InternalParse(const char* begin, const char* "
|
||||
"end, void* object, ::proto2::internal::ParseContext* ctx);\n"
|
||||
"end, void* object, ::$proto_ns$::internal::ParseContext* ctx);\n"
|
||||
"#endif // $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"
|
||||
" typedef ::$proto_ns$::internal::MapEntry$lite$<$classname$, \n"
|
||||
" $key_cpp$, $val_cpp$,\n"
|
||||
@ -1158,7 +1158,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
|
||||
"size_t ByteSizeLong() const final;\n"
|
||||
"#if $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"
|
||||
"static const char* _InternalParse(const char* begin, const char* end, "
|
||||
"void* object, ::proto2::internal::ParseContext* ctx);\n"
|
||||
"void* object, ::$proto_ns$::internal::ParseContext* ctx);\n"
|
||||
"::$proto_ns$::internal::ParseFunc _ParseFunc() const final { return "
|
||||
"_InternalParse; }\n"
|
||||
"#else\n"
|
||||
@ -1170,7 +1170,8 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
|
||||
format(
|
||||
"#if $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"
|
||||
"static const char* InternalParseMessageSetItem(const char* begin, "
|
||||
"const char* end, void* object, ::proto2::internal::ParseContext* "
|
||||
"const char* end, void* object, "
|
||||
"::$proto_ns$::internal::ParseContext* "
|
||||
"ctx);\n"
|
||||
"#endif // $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n");
|
||||
}
|
||||
@ -1879,7 +1880,7 @@ void MessageGenerator::GenerateClassMethods(io::Printer* printer) {
|
||||
format(
|
||||
"#if $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"
|
||||
"const char* $classname$::_InternalParse(const char* begin, const "
|
||||
"char* end, void* object, ::proto2::internal::ParseContext* ctx) { "
|
||||
"char* end, void* object, ::$proto_ns$::internal::ParseContext* ctx) { "
|
||||
"return end; }\n"
|
||||
"#endif // $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n");
|
||||
format("\n");
|
||||
|
@ -48,7 +48,7 @@ namespace {
|
||||
// When we are generating code for implicit weak fields, we need to insert some
|
||||
// additional casts. These functions return the casted expression if
|
||||
// implicit_weak_field is true but otherwise return the original expression.
|
||||
// Ordinarily a static_cast is enough to cast proto2::MessageLite* to a class
|
||||
// Ordinarily a static_cast is enough to cast google::protobuf::MessageLite* to a class
|
||||
// deriving from it, but we need a reinterpret_cast in cases where the generated
|
||||
// message is forward-declared but its full definition is not visible.
|
||||
string StaticCast(const string& type, const string& expression,
|
||||
|
@ -28,14 +28,14 @@
|
||||
// (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 declares the namespace proto2::protobuf_unittest in order to expose
|
||||
// This header declares the namespace google::protobuf::protobuf_unittest in order to expose
|
||||
// any problems with the generated class names. We use this header to ensure
|
||||
// unittest.cc will declare the namespace prior to other includes, while obeying
|
||||
// normal include ordering.
|
||||
//
|
||||
// When generating a class name of "foo.Bar" we must ensure we prefix the class
|
||||
// name with "::", in case the namespace proto2::foo exists. We intentionally
|
||||
// trigger that case here by declaring proto2::protobuf_unittest.
|
||||
// name with "::", in case the namespace google::protobuf::foo exists. We intentionally
|
||||
// trigger that case here by declaring google::protobuf::protobuf_unittest.
|
||||
//
|
||||
// See ClassName in helpers.h for more details.
|
||||
|
||||
|
@ -105,7 +105,7 @@ class MockErrorCollector : public MultiFileErrorCollector {
|
||||
#ifndef PROTOBUF_TEST_NO_DESCRIPTORS
|
||||
|
||||
// Test that generated code has proper descriptors:
|
||||
// Parse a descriptor directly (using proto2::compiler::Importer) and
|
||||
// Parse a descriptor directly (using google::protobuf::compiler::Importer) and
|
||||
// compare it to the one that was produced by generated code.
|
||||
TEST(GENERATED_DESCRIPTOR_TEST_NAME, IdenticalDescriptors) {
|
||||
const FileDescriptor* generated_descriptor =
|
||||
|
@ -32,7 +32,7 @@
|
||||
// Based on original Protocol Buffers design by
|
||||
// Sanjay Ghemawat, Jeff Dean, and others.
|
||||
//
|
||||
// This file exists solely to document the proto2::compiler namespace.
|
||||
// This file exists solely to document the google::protobuf::compiler namespace.
|
||||
// It is not compiled into anything, but it may be read by an automated
|
||||
// documentation generator.
|
||||
|
||||
|
@ -151,7 +151,7 @@ class LIBPROTOC_EXPORT Version : public ::google::protobuf::Message /* @@protoc_
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -303,7 +303,7 @@ class LIBPROTOC_EXPORT CodeGeneratorRequest : public ::google::protobuf::Message
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -477,7 +477,7 @@ class LIBPROTOC_EXPORT CodeGeneratorResponse_File : public ::google::protobuf::M
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -637,7 +637,7 @@ class LIBPROTOC_EXPORT CodeGeneratorResponse : public ::google::protobuf::Messag
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
|
@ -376,7 +376,7 @@ class LIBPROTOBUF_EXPORT FileDescriptorSet : public ::google::protobuf::Message
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -516,7 +516,7 @@ class LIBPROTOBUF_EXPORT FileDescriptorProto : public ::google::protobuf::Messag
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -845,7 +845,7 @@ class LIBPROTOBUF_EXPORT DescriptorProto_ExtensionRange : public ::google::proto
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -1001,7 +1001,7 @@ class LIBPROTOBUF_EXPORT DescriptorProto_ReservedRange : public ::google::protob
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -1144,7 +1144,7 @@ class LIBPROTOBUF_EXPORT DescriptorProto : public ::google::protobuf::Message /*
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -1426,7 +1426,7 @@ class LIBPROTOBUF_EXPORT ExtensionRangeOptions : public ::google::protobuf::Mess
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -1569,7 +1569,7 @@ class LIBPROTOBUF_EXPORT FieldDescriptorProto : public ::google::protobuf::Messa
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -1952,7 +1952,7 @@ class LIBPROTOBUF_EXPORT OneofDescriptorProto : public ::google::protobuf::Messa
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -2117,7 +2117,7 @@ class LIBPROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange : public ::google
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -2260,7 +2260,7 @@ class LIBPROTOBUF_EXPORT EnumDescriptorProto : public ::google::protobuf::Messag
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -2476,7 +2476,7 @@ class LIBPROTOBUF_EXPORT EnumValueDescriptorProto : public ::google::protobuf::M
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -2649,7 +2649,7 @@ class LIBPROTOBUF_EXPORT ServiceDescriptorProto : public ::google::protobuf::Mes
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -2827,7 +2827,7 @@ class LIBPROTOBUF_EXPORT MethodDescriptorProto : public ::google::protobuf::Mess
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -3058,7 +3058,7 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message /* @@p
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -3559,7 +3559,7 @@ class LIBPROTOBUF_EXPORT MessageOptions : public ::google::protobuf::Message /*
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -3734,7 +3734,7 @@ class LIBPROTOBUF_EXPORT FieldOptions : public ::google::protobuf::Message /* @@
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -3981,7 +3981,7 @@ class LIBPROTOBUF_EXPORT OneofOptions : public ::google::protobuf::Message /* @@
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -4124,7 +4124,7 @@ class LIBPROTOBUF_EXPORT EnumOptions : public ::google::protobuf::Message /* @@p
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -4283,7 +4283,7 @@ class LIBPROTOBUF_EXPORT EnumValueOptions : public ::google::protobuf::Message /
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -4434,7 +4434,7 @@ class LIBPROTOBUF_EXPORT ServiceOptions : public ::google::protobuf::Message /*
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -4585,7 +4585,7 @@ class LIBPROTOBUF_EXPORT MethodOptions : public ::google::protobuf::Message /* @
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -4772,7 +4772,7 @@ class LIBPROTOBUF_EXPORT UninterpretedOption_NamePart : public ::google::protobu
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -4935,7 +4935,7 @@ class LIBPROTOBUF_EXPORT UninterpretedOption : public ::google::protobuf::Messag
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -5176,7 +5176,7 @@ class LIBPROTOBUF_EXPORT SourceCodeInfo_Location : public ::google::protobuf::Me
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -5404,7 +5404,7 @@ class LIBPROTOBUF_EXPORT SourceCodeInfo : public ::google::protobuf::Message /*
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -5546,7 +5546,7 @@ class LIBPROTOBUF_EXPORT GeneratedCodeInfo_Annotation : public ::google::protobu
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -5728,7 +5728,7 @@ class LIBPROTOBUF_EXPORT GeneratedCodeInfo : public ::google::protobuf::Message
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
|
@ -129,7 +129,7 @@ class LIBPROTOBUF_EXPORT Duration : public ::google::protobuf::Message /* @@prot
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
|
@ -129,7 +129,7 @@ class LIBPROTOBUF_EXPORT Empty : public ::google::protobuf::Message /* @@protoc_
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
|
@ -1241,7 +1241,7 @@ class RepeatedMessageTypeTraits {
|
||||
// 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. proto2::Message goes through similar contortions
|
||||
// presumably a message. google::protobuf::Message goes through similar contortions
|
||||
// with a reinterpret_cast<>.
|
||||
return *reinterpret_cast<const RepeatedPtrField<Type>*>(
|
||||
set.GetRawRepeatedField(number, GetDefaultRepeatedField()));
|
||||
|
@ -129,7 +129,7 @@ class LIBPROTOBUF_EXPORT FieldMask : public ::google::protobuf::Message /* @@pro
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
|
@ -103,7 +103,7 @@ void ReportReflectionUsageError(
|
||||
const char* method, const char* description) {
|
||||
GOOGLE_LOG(FATAL)
|
||||
<< "Protocol Buffer reflection usage error:\n"
|
||||
" Method : proto2::Reflection::" << method << "\n"
|
||||
" Method : google::protobuf::Reflection::" << method << "\n"
|
||||
" Message type: " << descriptor->full_name() << "\n"
|
||||
" Field : " << field->full_name() << "\n"
|
||||
" Problem : " << description;
|
||||
@ -129,7 +129,7 @@ static void ReportReflectionUsageTypeError(
|
||||
FieldDescriptor::CppType expected_type) {
|
||||
GOOGLE_LOG(FATAL)
|
||||
<< "Protocol Buffer reflection usage error:\n"
|
||||
" Method : proto2::Reflection::" << method << "\n"
|
||||
" Method : google::protobuf::Reflection::" << method << "\n"
|
||||
" Message type: " << descriptor->full_name() << "\n"
|
||||
" Field : " << field->full_name() << "\n"
|
||||
" Problem : Field is not the right type for this message:\n"
|
||||
@ -142,7 +142,7 @@ static void ReportReflectionUsageEnumTypeError(
|
||||
const char* method, const EnumValueDescriptor* value) {
|
||||
GOOGLE_LOG(FATAL)
|
||||
<< "Protocol Buffer reflection usage error:\n"
|
||||
" Method : proto2::Reflection::" << method << "\n"
|
||||
" Method : google::protobuf::Reflection::" << method << "\n"
|
||||
" Message type: " << descriptor->full_name() << "\n"
|
||||
" Field : " << field->full_name() << "\n"
|
||||
" Problem : Enum value did not match field type:\n"
|
||||
|
@ -138,7 +138,7 @@ class WeakFieldMap; // weak_field_map.h
|
||||
// -1.
|
||||
struct ReflectionSchema {
|
||||
public:
|
||||
// Size of a proto2::Message object of this type.
|
||||
// Size of a google::protobuf::Message object of this type.
|
||||
uint32 GetObjectSize() const { return static_cast<uint32>(object_size_); }
|
||||
|
||||
// Offset of a non-oneof field. Getting a field offset is slightly more
|
||||
|
@ -1002,7 +1002,7 @@ TEST(GeneratedMessageReflectionTest, UsageErrors) {
|
||||
reflection->GetInt32(
|
||||
message, descriptor->FindFieldByName("optional_int64")),
|
||||
"Protocol Buffer reflection usage error:\n"
|
||||
" Method : proto2::Reflection::GetInt32\n"
|
||||
" Method : google::protobuf::Reflection::GetInt32\n"
|
||||
" Message type: protobuf_unittest\\.TestAllTypes\n"
|
||||
" Field : protobuf_unittest\\.TestAllTypes\\.optional_int64\n"
|
||||
" Problem : Field is not the right type for this message:\n"
|
||||
@ -1012,7 +1012,7 @@ TEST(GeneratedMessageReflectionTest, UsageErrors) {
|
||||
reflection->GetInt32(
|
||||
message, descriptor->FindFieldByName("repeated_int32")),
|
||||
"Protocol Buffer reflection usage error:\n"
|
||||
" Method : proto2::Reflection::GetInt32\n"
|
||||
" Method : google::protobuf::Reflection::GetInt32\n"
|
||||
" Message type: protobuf_unittest.TestAllTypes\n"
|
||||
" Field : protobuf_unittest.TestAllTypes.repeated_int32\n"
|
||||
" Problem : Field is repeated; the method requires a singular field.");
|
||||
@ -1020,7 +1020,7 @@ TEST(GeneratedMessageReflectionTest, UsageErrors) {
|
||||
reflection->GetInt32(
|
||||
message, unittest::ForeignMessage::descriptor()->FindFieldByName("c")),
|
||||
"Protocol Buffer reflection usage error:\n"
|
||||
" Method : proto2::Reflection::GetInt32\n"
|
||||
" Method : google::protobuf::Reflection::GetInt32\n"
|
||||
" Message type: protobuf_unittest.TestAllTypes\n"
|
||||
" Field : protobuf_unittest.ForeignMessage.c\n"
|
||||
" Problem : Field does not match message type.");
|
||||
@ -1028,7 +1028,7 @@ TEST(GeneratedMessageReflectionTest, UsageErrors) {
|
||||
reflection->HasField(
|
||||
message, unittest::ForeignMessage::descriptor()->FindFieldByName("c")),
|
||||
"Protocol Buffer reflection usage error:\n"
|
||||
" Method : proto2::Reflection::HasField\n"
|
||||
" Method : google::protobuf::Reflection::HasField\n"
|
||||
" Message type: protobuf_unittest.TestAllTypes\n"
|
||||
" Field : protobuf_unittest.ForeignMessage.c\n"
|
||||
" Problem : Field does not match message type.");
|
||||
|
@ -32,7 +32,7 @@
|
||||
// Based on original Protocol Buffers design by
|
||||
// Sanjay Ghemawat, Jeff Dean, and others.
|
||||
//
|
||||
// This file exists solely to document the proto2::io namespace.
|
||||
// This file exists solely to document the google::protobuf::io namespace.
|
||||
// It is not compiled into anything, but it may be read by an automated
|
||||
// documentation generator.
|
||||
|
||||
|
@ -62,8 +62,8 @@ namespace google {
|
||||
namespace protobuf {
|
||||
namespace internal {
|
||||
|
||||
// MapEntry is the returned proto2::Message when calling AddMessage of
|
||||
// proto2::Reflection. In order to let it work with generated message
|
||||
// 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
|
||||
|
@ -154,28 +154,28 @@ namespace internal {
|
||||
|
||||
class ReflectionAccessor {
|
||||
public:
|
||||
static void* GetOffset(void* msg, const proto2::FieldDescriptor* f,
|
||||
const proto2::Reflection* r) {
|
||||
static void* GetOffset(void* msg, const google::protobuf::FieldDescriptor* f,
|
||||
const google::protobuf::Reflection* r) {
|
||||
auto gr =
|
||||
dynamic_cast<const proto2::internal::GeneratedMessageReflection*>(r);
|
||||
dynamic_cast<const google::protobuf::internal::GeneratedMessageReflection*>(r);
|
||||
GOOGLE_CHECK(gr != nullptr);
|
||||
return static_cast<char*>(msg) + gr->schema_.GetFieldOffset(f);
|
||||
}
|
||||
|
||||
static proto2::internal::ExtensionSet* GetExtensionSet(
|
||||
void* msg, const proto2::Reflection* r) {
|
||||
static google::protobuf::internal::ExtensionSet* GetExtensionSet(
|
||||
void* msg, const google::protobuf::Reflection* r) {
|
||||
auto gr =
|
||||
dynamic_cast<const proto2::internal::GeneratedMessageReflection*>(r);
|
||||
dynamic_cast<const google::protobuf::internal::GeneratedMessageReflection*>(r);
|
||||
GOOGLE_CHECK(gr != nullptr);
|
||||
return reinterpret_cast<proto2::internal::ExtensionSet*>(
|
||||
return reinterpret_cast<google::protobuf::internal::ExtensionSet*>(
|
||||
static_cast<char*>(msg) + gr->schema_.GetExtensionSetOffset());
|
||||
}
|
||||
static proto2::internal::InternalMetadataWithArena* GetMetadata(
|
||||
void* msg, const proto2::Reflection* r) {
|
||||
static google::protobuf::internal::InternalMetadataWithArena* GetMetadata(
|
||||
void* msg, const google::protobuf::Reflection* r) {
|
||||
auto gr =
|
||||
dynamic_cast<const proto2::internal::GeneratedMessageReflection*>(r);
|
||||
dynamic_cast<const google::protobuf::internal::GeneratedMessageReflection*>(r);
|
||||
GOOGLE_CHECK(gr != nullptr);
|
||||
return reinterpret_cast<proto2::internal::InternalMetadataWithArena*>(
|
||||
return reinterpret_cast<google::protobuf::internal::InternalMetadataWithArena*>(
|
||||
static_cast<char*>(msg) + gr->schema_.GetMetadataOffset());
|
||||
}
|
||||
};
|
||||
|
@ -802,7 +802,7 @@ class LIBPROTOBUF_EXPORT Reflection {
|
||||
// CPPTYPE_BOOL bool
|
||||
// CPPTYPE_ENUM generated enum type or int32
|
||||
// CPPTYPE_STRING string
|
||||
// CPPTYPE_MESSAGE generated message type or proto2::Message
|
||||
// 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
|
||||
@ -855,8 +855,8 @@ class LIBPROTOBUF_EXPORT Reflection {
|
||||
|
||||
// DEPRECATED. Please use GetRepeatedFieldRef().
|
||||
//
|
||||
// for T = string, proto2::internal::StringPieceField
|
||||
// proto2::Message & descendants.
|
||||
// for T = string, google::protobuf::internal::StringPieceField
|
||||
// google::protobuf::Message & descendants.
|
||||
template <typename T>
|
||||
GOOGLE_PROTOBUF_DEPRECATED_MSG(
|
||||
"Please use GetRepeatedFieldRef() instead")
|
||||
@ -865,8 +865,8 @@ class LIBPROTOBUF_EXPORT Reflection {
|
||||
|
||||
// DEPRECATED. Please use GetMutableRepeatedFieldRef().
|
||||
//
|
||||
// for T = string, proto2::internal::StringPieceField
|
||||
// proto2::Message & descendants.
|
||||
// for T = string, google::protobuf::internal::StringPieceField
|
||||
// google::protobuf::Message & descendants.
|
||||
template <typename T>
|
||||
GOOGLE_PROTOBUF_DEPRECATED_MSG(
|
||||
"Please use GetMutableRepeatedFieldRef() instead")
|
||||
@ -921,7 +921,7 @@ class LIBPROTOBUF_EXPORT Reflection {
|
||||
// useful for determining if a message is a generated message or not, for
|
||||
// example:
|
||||
// if (message->GetReflection()->GetMessageFactory() ==
|
||||
// proto2::MessageFactory::generated_factory()) {
|
||||
// google::protobuf::MessageFactory::generated_factory()) {
|
||||
// // This is a generated message.
|
||||
// }
|
||||
// It can also be used to create more messages of this type, though
|
||||
@ -1155,7 +1155,7 @@ const T* DynamicCastToGenerated(const Message* from) {
|
||||
const T&(*get_default_instance)() = &T::default_instance;
|
||||
(void)get_default_instance;
|
||||
|
||||
// Compile-time assert that T is a subclass of proto2::Message.
|
||||
// Compile-time assert that T is a subclass of google::protobuf::Message.
|
||||
const Message* unused = static_cast<T*>(nullptr);
|
||||
(void)unused;
|
||||
|
||||
@ -1192,8 +1192,8 @@ T dynamic_cast_if_available(Message* from) {
|
||||
// Implementation details for {Get,Mutable}RawRepeatedPtrField. We provide
|
||||
// specializations for <string>, <StringPieceField> and <Message> and handle
|
||||
// everything else with the default template which will match any type having
|
||||
// a method with signature "static const proto2::Descriptor* descriptor()".
|
||||
// Such a type presumably is a descendant of proto2::Message.
|
||||
// a method with signature "static const google::protobuf::Descriptor* descriptor()".
|
||||
// Such a type presumably is a descendant of google::protobuf::Message.
|
||||
|
||||
template<>
|
||||
inline const RepeatedPtrField<string>& Reflection::GetRepeatedPtrField<string>(
|
||||
|
@ -268,7 +268,7 @@ class LIBPROTOBUF_EXPORT MessageLite {
|
||||
// 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 proto2::TextFormat::ParseFromString().
|
||||
// object, see google::protobuf::TextFormat::ParseFromString().
|
||||
bool ParseFromString(const string& data);
|
||||
// Like ParseFromString(), but accepts messages that are missing
|
||||
// required fields.
|
||||
|
@ -32,7 +32,7 @@
|
||||
// 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 proto2::Metadata, which encapsulates
|
||||
// Note that this is distinct from google::protobuf::Metadata, which encapsulates
|
||||
// Descriptor and Reflection pointers.
|
||||
|
||||
#ifndef GOOGLE_PROTOBUF_METADATA_H__
|
||||
|
@ -337,8 +337,8 @@ namespace internal {
|
||||
// CPPTYPE_BOOL bool bool
|
||||
// CPPTYPE_ENUM generated enum type int32
|
||||
// CPPTYPE_STRING string string
|
||||
// CPPTYPE_MESSAGE generated message type proto2::Message
|
||||
// or proto2::Message
|
||||
// CPPTYPE_MESSAGE generated message type google::protobuf::Message
|
||||
// or google::protobuf::Message
|
||||
//
|
||||
// Note that for enums we use int32 in the interface.
|
||||
//
|
||||
|
@ -179,7 +179,7 @@ class RepeatedPtrFieldWrapper : public RandomAccessRepeatedFieldAccessor {
|
||||
}
|
||||
|
||||
// Create a new T instance. For repeated message fields, T can be specified
|
||||
// as proto2::Message so we can't use "new T()" directly. In that case, value
|
||||
// as google::protobuf::Message so we can't use "new T()" directly. In that case, value
|
||||
// should be a message of the same type (it's ensured by the caller) and a
|
||||
// new message object will be created using it.
|
||||
virtual T* New(const Value* value) const = 0;
|
||||
|
@ -1651,8 +1651,8 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, Sort) {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Unit-tests for the insert iterators
|
||||
// proto2::RepeatedFieldBackInserter,
|
||||
// proto2::AllocatedRepeatedPtrFieldBackInserter
|
||||
// google::protobuf::RepeatedFieldBackInserter,
|
||||
// google::protobuf::AllocatedRepeatedPtrFieldBackInserter
|
||||
// Ported from util/gtl/proto-array-iterators_unittest.
|
||||
|
||||
class RepeatedFieldInsertionIteratorsTest : public testing::Test {
|
||||
|
@ -61,7 +61,7 @@
|
||||
//
|
||||
// // implements MyService ---------------------------------------
|
||||
//
|
||||
// void Foo(proto2::RpcController* controller,
|
||||
// void Foo(google::protobuf::RpcController* controller,
|
||||
// const MyRequest* request,
|
||||
// MyResponse* response,
|
||||
// Closure* done) {
|
||||
|
@ -122,7 +122,7 @@ class LIBPROTOBUF_EXPORT SourceContext : public ::google::protobuf::Message /* @
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
|
@ -207,7 +207,7 @@ void Struct_FieldsEntry_DoNotUse::MergeFrom(
|
||||
}
|
||||
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
const char* Struct_FieldsEntry_DoNotUse::_InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx) { return end; }
|
||||
const char* Struct_FieldsEntry_DoNotUse::_InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx) { return end; }
|
||||
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
|
||||
|
||||
|
@ -103,7 +103,7 @@ class Struct_FieldsEntry_DoNotUse : public ::google::protobuf::internal::MapEntr
|
||||
0 > {
|
||||
public:
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
typedef ::google::protobuf::internal::MapEntry<Struct_FieldsEntry_DoNotUse,
|
||||
::std::string, ::google::protobuf::Value,
|
||||
@ -189,7 +189,7 @@ class LIBPROTOBUF_EXPORT Struct : public ::google::protobuf::Message /* @@protoc
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -334,7 +334,7 @@ class LIBPROTOBUF_EXPORT Value : public ::google::protobuf::Message /* @@protoc_
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -552,7 +552,7 @@ class LIBPROTOBUF_EXPORT ListValue : public ::google::protobuf::Message /* @@pro
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
|
@ -430,13 +430,13 @@ class LIBPROTOBUF_EXPORT TextFormat {
|
||||
// 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 proto2::Message::DebugString()
|
||||
// Another use is to parse the output from google::protobuf::Message::DebugString()
|
||||
// (or ShortDebugString()), because these functions output using
|
||||
// proto2::TextFormat::Print().
|
||||
// google::protobuf::TextFormat::Print().
|
||||
//
|
||||
// If you would like to read a protocol buffer serialized in the
|
||||
// (non-human-readable) binary wire format, see
|
||||
// proto2::MessageLite::ParseFromString().
|
||||
// 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);
|
||||
|
@ -129,7 +129,7 @@ class LIBPROTOBUF_EXPORT Timestamp : public ::google::protobuf::Message /* @@pro
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
|
@ -230,7 +230,7 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -442,7 +442,7 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -795,7 +795,7 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -984,7 +984,7 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@pro
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -1147,7 +1147,7 @@ class LIBPROTOBUF_EXPORT Option : public ::google::protobuf::Message /* @@protoc
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
|
@ -161,7 +161,7 @@ class LIBPROTOBUF_EXPORT DoubleValue : public ::google::protobuf::Message /* @@p
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -287,7 +287,7 @@ class LIBPROTOBUF_EXPORT FloatValue : public ::google::protobuf::Message /* @@pr
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -413,7 +413,7 @@ class LIBPROTOBUF_EXPORT Int64Value : public ::google::protobuf::Message /* @@pr
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -539,7 +539,7 @@ class LIBPROTOBUF_EXPORT UInt64Value : public ::google::protobuf::Message /* @@p
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -665,7 +665,7 @@ class LIBPROTOBUF_EXPORT Int32Value : public ::google::protobuf::Message /* @@pr
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -791,7 +791,7 @@ class LIBPROTOBUF_EXPORT UInt32Value : public ::google::protobuf::Message /* @@p
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -917,7 +917,7 @@ class LIBPROTOBUF_EXPORT BoolValue : public ::google::protobuf::Message /* @@pro
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -1043,7 +1043,7 @@ class LIBPROTOBUF_EXPORT StringValue : public ::google::protobuf::Message /* @@p
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
@ -1186,7 +1186,7 @@ class LIBPROTOBUF_EXPORT BytesValue : public ::google::protobuf::Message /* @@pr
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
|
||||
static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
|
||||
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
|
Loading…
Reference in New Issue
Block a user