diff options
Diffstat (limited to 'src/google/protobuf/compiler/command_line_interface.h')
-rw-r--r-- | src/google/protobuf/compiler/command_line_interface.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/command_line_interface.h b/src/google/protobuf/compiler/command_line_interface.h index 74a0adb4..7e611c44 100644 --- a/src/google/protobuf/compiler/command_line_interface.h +++ b/src/google/protobuf/compiler/command_line_interface.h @@ -39,6 +39,7 @@ #define GOOGLE_PROTOBUF_COMPILER_COMMAND_LINE_INTERFACE_H__ #include <google/protobuf/stubs/common.h> +#include <google/protobuf/stubs/hash.h> #include <string> #include <vector> #include <map> @@ -190,6 +191,7 @@ class LIBPROTOC_EXPORT CommandLineInterface { class ErrorPrinter; class GeneratorContextImpl; class MemoryOutputStream; + typedef hash_map<string, GeneratorContextImpl*> GeneratorContextMap; // Clear state from previous Run(). void Clear(); @@ -247,6 +249,12 @@ class LIBPROTOC_EXPORT CommandLineInterface { // Implements the --descriptor_set_out option. bool WriteDescriptorSet(const vector<const FileDescriptor*> parsed_files); + // Implements the --dependency_out option + bool GenerateDependencyManifestFile( + const vector<const FileDescriptor*>& parsed_files, + const GeneratorContextMap& output_directories, + DiskSourceTree* source_tree); + // Get all transitive dependencies of the given file (including the file // itself), adding them to the given list of FileDescriptorProtos. The // protos will be ordered such that every file is listed before any file that @@ -353,6 +361,10 @@ class LIBPROTOC_EXPORT CommandLineInterface { // FileDescriptorSet should be written. Otherwise, empty. string descriptor_set_name_; + // If --dependency_out was given, this is the path to the file where the + // dependency file will be written. Otherwise, empty. + string dependency_out_name_; + // True if --include_imports was given, meaning that we should // write all transitive dependencies to the DescriptorSet. Otherwise, only // the .proto files listed on the command-line are added. |