38 #ifndef GOOGLE_PROTOBUF_COMPILER_COMMAND_LINE_INTERFACE_H__
39 #define GOOGLE_PROTOBUF_COMPILER_COMMAND_LINE_INTERFACE_H__
44 #include <unordered_map>
50 #include <google/protobuf/port_def.inc>
56 class DescriptorDatabase;
68 class GeneratorContext;
143 void RegisterGenerator(
const std::string& flag_name,
184 void AllowPlugins(
const std::string& exe_name_prefix);
191 int Run(
int argc,
const char*
const argv[]);
209 class GeneratorContextImpl;
211 typedef std::unordered_map<std::string, GeneratorContextImpl*>
237 ParseArgumentStatus ParseArguments(
int argc,
const char*
const argv[]);
242 std::vector<std::string>* arguments);
262 void PrintHelpText();
276 std::vector<const FileDescriptor*>* parsed_files);
279 struct OutputDirective;
280 bool GenerateOutput(
const std::vector<const FileDescriptor*>& parsed_files,
281 const OutputDirective& output_directive,
283 bool GeneratePluginOutput(
284 const std::vector<const FileDescriptor*>& parsed_files,
292 bool WriteDescriptorSet(
293 const std::vector<const FileDescriptor*>& parsed_files);
296 bool GenerateDependencyManifestFile(
297 const std::vector<const FileDescriptor*>& parsed_files,
298 const GeneratorContextMap& output_directories,
310 static void GetTransitiveDependencies(
312 bool include_source_code_info,
313 std::set<const FileDescriptor*>* already_seen,
390 std::vector<std::pair<std::string, std::string> >
448 #include <google/protobuf/port_undef.inc>
450 #endif // GOOGLE_PROTOBUF_COMPILER_COMMAND_LINE_INTERFACE_H__