Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 10:11:57

0001 // Protocol Buffers - Google's data interchange format
0002 // Copyright 2008 Google Inc.  All rights reserved.
0003 //
0004 // Use of this source code is governed by a BSD-style
0005 // license that can be found in the LICENSE file or at
0006 // https://developers.google.com/open-source/licenses/bsd
0007 
0008 // Generates C# code for a given .proto file.
0009 
0010 #ifndef GOOGLE_PROTOBUF_COMPILER_CSHARP_GENERATOR_H__
0011 #define GOOGLE_PROTOBUF_COMPILER_CSHARP_GENERATOR_H__
0012 
0013 #include <string>
0014 
0015 #include "google/protobuf/compiler/code_generator.h"
0016 
0017 #include "google/protobuf/port_def.inc"
0018 
0019 namespace google {
0020 namespace protobuf {
0021 namespace compiler {
0022 namespace csharp {
0023 
0024 // CodeGenerator implementation which generates a C# source file and
0025 // header.  If you create your own protocol compiler binary and you want
0026 // it to support C# output, you can do so by registering an instance of this
0027 // CodeGenerator with the CommandLineInterface in your main() function.
0028 class PROTOC_EXPORT Generator : public CodeGenerator {
0029  public:
0030   Generator();
0031   ~Generator();
0032   bool Generate(
0033     const FileDescriptor* file,
0034     const std::string& parameter,
0035     GeneratorContext* generator_context,
0036     std::string* error) const override;
0037   uint64_t GetSupportedFeatures() const override;
0038   Edition GetMinimumEdition() const override { return Edition::EDITION_PROTO2; }
0039   Edition GetMaximumEdition() const override { return Edition::EDITION_2023; }
0040   using CodeGenerator::GetEdition;
0041 };
0042 
0043 }  // namespace csharp
0044 }  // namespace compiler
0045 }  // namespace protobuf
0046 }  // namespace google
0047 
0048 #include "google/protobuf/port_undef.inc"
0049 
0050 #endif  // GOOGLE_PROTOBUF_COMPILER_CSHARP_GENERATOR_H__