From ced8f73ffc89880af353b2e0d8b5dd0c5f75267d Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Fri, 2 Dec 2016 20:54:35 -0800 Subject: Add version number to plugin protocol. --- src/google/protobuf/compiler/code_generator.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/google/protobuf/compiler/code_generator.h') diff --git a/src/google/protobuf/compiler/code_generator.h b/src/google/protobuf/compiler/code_generator.h index b8a5584c..b917d373 100644 --- a/src/google/protobuf/compiler/code_generator.h +++ b/src/google/protobuf/compiler/code_generator.h @@ -50,6 +50,7 @@ namespace io { class ZeroCopyOutputStream; } class FileDescriptor; namespace compiler { +class Version; // Defined in this file. class CodeGenerator; @@ -143,6 +144,10 @@ class LIBPROTOC_EXPORT GeneratorContext { // differently when compiled as a set rather than individually. virtual void ListParsedFiles(std::vector* output); + // Retrieves the version number of the protocol compiler associated with + // this GeneratorContext. + virtual void GetCompilerVersion(Version* version) const; + private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(GeneratorContext); }; -- cgit v1.2.3