diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2016-08-16 11:26:49 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2016-09-08 11:59:57 -0400 |
commit | 337ec3065f98d6f048f92b3a864f65383a2549d8 (patch) | |
tree | 23ab2fea2b0d97cc64b0253fd313ce9bad1bbaf9 /objectivec/GPBDescriptor.h | |
parent | 4bc16578537495b5ee010d89f2909858312210ac (diff) | |
download | protobuf-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 'objectivec/GPBDescriptor.h')
-rw-r--r-- | objectivec/GPBDescriptor.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/objectivec/GPBDescriptor.h b/objectivec/GPBDescriptor.h index 36fb4eae..651f4de0 100644 --- a/objectivec/GPBDescriptor.h +++ b/objectivec/GPBDescriptor.h @@ -81,6 +81,13 @@ typedef NS_ENUM(uint8_t, GPBFieldType) { @property(nonatomic, readonly, getter=isWireFormat) BOOL wireFormat; /** The class of this message. */ @property(nonatomic, readonly) Class messageClass; +/** Containing message descriptor if this message is nested, or nil otherwise. */ +@property(readonly, nullable) GPBDescriptor *containingType; +/** + * Fully qualified name for this message (package.message). Can be nil if the + * value is unable to be computed. + */ +@property(readonly, nullable) NSString *fullName; /** * Gets the field for the given number. @@ -118,6 +125,8 @@ typedef NS_ENUM(uint8_t, GPBFieldType) { /** The package declared in the proto file. */ @property(nonatomic, readonly, copy) NSString *package; +/** The objc prefix declared in the proto file. */ +@property(nonatomic, readonly, copy, nullable) NSString *objcPrefix; /** The syntax of the proto file. */ @property(nonatomic, readonly) GPBFileSyntax syntax; |