aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/compiler/objectivec/objectivec_file.h
diff options
context:
space:
mode:
authorGravatar Thomas Van Lenten <thomasvl@google.com>2016-05-09 13:53:20 -0400
committerGravatar Thomas Van Lenten <thomasvl@google.com>2016-05-24 09:25:02 -0400
commit7da023b892ccd7135b6c9762d7618ccf414a4cd7 (patch)
tree04eb21f4a5a59ce61be4dc974d2e7cd6857f296a /src/google/protobuf/compiler/objectivec/objectivec_file.h
parent2131b2d544bf6eeb789c128ef3e9e04fc299237a (diff)
Better support for using the proto library from a framework.
- Add generator constant for the default framework name. - Add generator api for making the CPP symbol from the name. - Add generator api to see if it is a bundled proto file. - Output a CPP conditional and two imports for the core library headers. - Add helper for generating the #import for file headers to deal with the framework imports. - Add a reference from the unittests to a WKT to use that to inspect how imports generate. - Update the podspec to define the CPP symbol and require pods 1.0 (or later). Fixes https://github.com/google/protobuf/issues/1457
Diffstat (limited to 'src/google/protobuf/compiler/objectivec/objectivec_file.h')
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_file.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_file.h b/src/google/protobuf/compiler/objectivec/objectivec_file.h
index 4c0fcd3f..7326c901 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_file.h
+++ b/src/google/protobuf/compiler/objectivec/objectivec_file.h
@@ -62,7 +62,8 @@ class FileGenerator {
void GenerateHeader(io::Printer* printer);
const string& RootClassName() const { return root_class_name_; }
- const string Path() const;
+ const string Path() const { return FilePath(file_); }
+ const FileDescriptor* Descriptor() const { return file_; }
bool IsPublicDependency() const { return is_public_dep_; }
@@ -87,6 +88,8 @@ class FileGenerator {
const Options options_;
const vector<FileGenerator*>& DependencyGenerators();
+ void PrintFilePreamble(
+ io::Printer* printer, const string& header_to_import) const;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator);
};