cpp_styleguide.h 667 B

1234567891011121314151617181920
  1. #include <google/protobuf/compiler/code_generator.h>
  2. #include <google/protobuf/compiler/plugin.h>
  3. #include <google/protobuf/stubs/common.h>
  4. namespace NProtobuf::NCompiler::NPlugins {
  5. class TCppStyleGuideExtensionGenerator : public google::protobuf::compiler::CodeGenerator {
  6. public:
  7. bool Generate(const google::protobuf::FileDescriptor* file,
  8. const TProtoStringType& parameter,
  9. google::protobuf::compiler::OutputDirectory* output_directory,
  10. TProtoStringType* error
  11. ) const override;
  12. uint64_t GetSupportedFeatures() const override {
  13. return FEATURE_PROTO3_OPTIONAL;
  14. }
  15. };
  16. } // namespace NProtobuf::NCompiler::NPlugins