diff options
author | Josh Haberman <jhaberman@gmail.com> | 2014-01-21 18:38:49 -0800 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2014-01-21 18:38:49 -0800 |
commit | 0fd2f830882402979a83010e89650e7245960d39 (patch) | |
tree | 0968ca9424c5fb2433047519cbd54d3dd8d0b863 /upb/google/proto2.h | |
parent | ce9bba3cb5409844f8f3d7dcc235a9ea30cad090 (diff) |
Sync to internal Google development.
Diffstat (limited to 'upb/google/proto2.h')
-rw-r--r-- | upb/google/proto2.h | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/upb/google/proto2.h b/upb/google/proto2.h deleted file mode 100644 index 516b7fd..0000000 --- a/upb/google/proto2.h +++ /dev/null @@ -1,61 +0,0 @@ -// -// upb - a minimalist implementation of protocol buffers. -// -// Copyright (c) 2011-2012 Google Inc. See LICENSE for details. -// Author: Josh Haberman <jhaberman@gmail.com> -// -// Support for registering field handlers that can write into a proto2 -// message that uses GeneratedMessageReflection (which includes all messages -// generated by the proto2 compiler as well as DynamicMessage). -// -// This is a low-level interface; the high-level interface in google.h is -// more user-friendly. - -#ifndef UPB_GOOGLE_PROTO2_H_ -#define UPB_GOOGLE_PROTO2_H_ - -namespace proto2 { -class FieldDescriptor; -class Message; -} - -namespace google { -namespace protobuf { -class FieldDescriptor; -class Message; -} -} - -namespace upb { -class FieldDef; -class Handlers; -} - -namespace upb { -namespace google { - -// Sets field handlers in the given Handlers object for writing to a single -// field (as described by "proto2_f" and "upb_f") into a message constructed -// by the same factory as "prototype." Returns true if this was successful -// (this will fail if "prototype" is not a proto1 message, or if we can't -// handle it for some reason). -bool TrySetWriteHandlers(const proto2::FieldDescriptor* proto2_f, - const proto2::Message& prototype, - const upb::FieldDef* upb_f, upb::Handlers* h); -bool TrySetWriteHandlers(const ::google::protobuf::FieldDescriptor* proto2_f, - const ::google::protobuf::Message& prototype, - const upb::FieldDef* upb_f, upb::Handlers* h); - -// Returns a prototype for the given field in "m", if it is weak. The returned -// message could be the linked-in message type or OpaqueMessage, if the weak -// message is *not* linked in. Otherwise returns NULL. -const proto2::Message* GetFieldPrototype(const proto2::Message& m, - const proto2::FieldDescriptor* f); -const ::google::protobuf::Message* GetFieldPrototype( - const ::google::protobuf::Message& m, - const ::google::protobuf::FieldDescriptor* f); - -} // namespace google -} // namespace upb - -#endif // UPB_GOOGLE_PROTO2_H_ |