Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-03-01 10:26:05

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 #ifndef GOOGLE_PROTOBUF_COMPILER_CSHARP_REFLECTION_CLASS_H__
0009 #define GOOGLE_PROTOBUF_COMPILER_CSHARP_REFLECTION_CLASS_H__
0010 
0011 #include <string>
0012 
0013 #include "google/protobuf/compiler/code_generator.h"
0014 #include "google/protobuf/compiler/csharp/csharp_source_generator_base.h"
0015 #include "google/protobuf/descriptor.h"
0016 #include "google/protobuf/io/printer.h"
0017 
0018 namespace google {
0019 namespace protobuf {
0020 namespace compiler {
0021 namespace csharp {
0022 
0023 class ReflectionClassGenerator : public SourceGeneratorBase {
0024  public:
0025   ReflectionClassGenerator(const FileDescriptor* file, const Options* options);
0026   ~ReflectionClassGenerator();
0027 
0028   ReflectionClassGenerator(const ReflectionClassGenerator&) = delete;
0029   ReflectionClassGenerator& operator=(const ReflectionClassGenerator&) = delete;
0030 
0031   void Generate(io::Printer* printer);
0032 
0033  private:
0034   const FileDescriptor* file_;
0035 
0036   std::string namespace_;
0037   std::string reflectionClassname_;
0038   std::string extensionClassname_;
0039 
0040   void WriteIntroduction(io::Printer* printer);
0041   void WriteDescriptor(io::Printer* printer);
0042   void WriteGeneratedCodeInfo(const Descriptor* descriptor,
0043                               io::Printer* printer,
0044                               bool last);
0045 };
0046 
0047 }  // namespace csharp
0048 }  // namespace compiler
0049 }  // namespace protobuf
0050 }  // namespace google
0051 
0052 #endif  // GOOGLE_PROTOBUF_COMPILER_CSHARP_REFLECTION_CLASS_H__