aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
diff options
context:
space:
mode:
authorThomas Van Lenten <thomasvl@google.com>2016-08-16 11:26:49 -0400
committerThomas Van Lenten <thomasvl@google.com>2016-09-08 11:59:57 -0400
commit337ec3065f98d6f048f92b3a864f65383a2549d8 (patch)
tree23ab2fea2b0d97cc64b0253fd313ce9bad1bbaf9 /src/google/protobuf/compiler/objectivec/objectivec_helpers.h
parent4bc16578537495b5ee010d89f2909858312210ac (diff)
downloadprotobuf-337ec3065f98d6f048f92b3a864f65383a2549d8.tar.gz
protobuf-337ec3065f98d6f048f92b3a864f65383a2549d8.tar.bz2
protobuf-337ec3065f98d6f048f92b3a864f65383a2549d8.zip
Add ObjC helpers for Any WKT.
- Capture the ObjC prefix used when generating the the file. - Track the containing type on descriptors. - Mark descriptors where the message class name got a suffix added to it. - Expose a fullName property on Descriptors. - Add helpers for packing/unpacking Any messages. - Bump the ObjC runtime version number. Since we added methods and invoke them in the generated code, ensure the code is running against a matching version. Otherwise, someone could compile against headers, but run with a framework that is older and get unknown selector failures. This should trip clearer messaging. Fixes https://github.com/google/protobuf/issues/1674
Diffstat (limited to 'src/google/protobuf/compiler/objectivec/objectivec_helpers.h')
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_helpers.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_helpers.h b/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
index b05983df..022b7a1b 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
+++ b/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
@@ -67,6 +67,9 @@ bool IsRetainedName(const string& name);
// handling under ARC.
bool IsInitName(const string& name);
+// Gets the objc_class_prefix.
+string FileClassPrefix(const FileDescriptor* file);
+
// 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.
@@ -83,6 +86,7 @@ string FileClassName(const FileDescriptor* file);
// These return the fully-qualified class name corresponding to the given
// descriptor.
string ClassName(const Descriptor* descriptor);
+string ClassName(const Descriptor* descriptor, string* out_suffix_added);
string EnumName(const EnumDescriptor* descriptor);
// Returns the fully-qualified name of the enum value corresponding to the