diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2016-04-11 23:37:42 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2016-04-11 23:37:42 -0700 |
commit | 814685ca2cd9280ca401e1842fd6311440921a0a (patch) | |
tree | 5c2cac2b5ba07fe345fdda74c270b32c8f7b9331 /src/google/protobuf/compiler/cpp/cpp_file.h | |
parent | 3ffbdd712f0413ce4964d626c5e10533f1f74893 (diff) | |
parent | 3c4ce528c63f4dc39d15de963020472980ee7229 (diff) | |
download | protobuf-814685ca2cd9280ca401e1842fd6311440921a0a.tar.gz protobuf-814685ca2cd9280ca401e1842fd6311440921a0a.tar.bz2 protobuf-814685ca2cd9280ca401e1842fd6311440921a0a.zip |
Merge pull request #1397 from google/internal-merge
Internal merge
Diffstat (limited to 'src/google/protobuf/compiler/cpp/cpp_file.h')
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_file.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_file.h b/src/google/protobuf/compiler/cpp/cpp_file.h index 29cdaea5..ebe990c2 100644 --- a/src/google/protobuf/compiler/cpp/cpp_file.h +++ b/src/google/protobuf/compiler/cpp/cpp_file.h @@ -69,8 +69,14 @@ class FileGenerator { const Options& options); ~FileGenerator(); - void GenerateProtoHeader(io::Printer* printer); - void GeneratePBHeader(io::Printer* printer); + // info_path, if non-empty, should be the path (relative to printer's output) + // to the metadata file describing this proto header. + void GenerateProtoHeader(io::Printer* printer, + const string& info_path); + // info_path, if non-empty, should be the path (relative to printer's output) + // to the metadata file describing this PB header. + void GeneratePBHeader(io::Printer* printer, + const string& info_path); void GenerateSource(io::Printer* printer); private: @@ -102,6 +108,10 @@ class FileGenerator { void GenerateLibraryIncludes(io::Printer* printer); void GenerateDependencyIncludes(io::Printer* printer); + // Generate a pragma to pull in metadata using the given info_path (if + // non-empty). info_path should be relative to printer's output. + void GenerateMetadataPragma(io::Printer* printer, const string& info_path); + // Generates a couple of different pieces before definitions: void GenerateGlobalStateFunctionDeclarations(io::Printer* printer); |