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 #ifndef GOOGLE_PROTOBUF_COMPILER_CSHARP_MESSAGE_FIELD_H__
0009 #define GOOGLE_PROTOBUF_COMPILER_CSHARP_MESSAGE_FIELD_H__
0010 
0011 #include "google/protobuf/compiler/code_generator.h"
0012 #include "google/protobuf/compiler/csharp/csharp_field_base.h"
0013 
0014 namespace google {
0015 namespace protobuf {
0016 namespace compiler {
0017 namespace csharp {
0018 
0019 class MessageFieldGenerator : public FieldGeneratorBase {
0020  public:
0021   MessageFieldGenerator(const FieldDescriptor* descriptor,
0022                         int presenceIndex,
0023                         const Options *options);
0024   ~MessageFieldGenerator();
0025 
0026   MessageFieldGenerator(const MessageFieldGenerator&) = delete;
0027   MessageFieldGenerator& operator=(const MessageFieldGenerator&) = delete;
0028 
0029   virtual void GenerateCodecCode(io::Printer* printer) override;
0030   virtual void GenerateCloningCode(io::Printer* printer) override;
0031   virtual void GenerateFreezingCode(io::Printer* printer) override;
0032   virtual void GenerateMembers(io::Printer* printer) override;
0033   virtual void GenerateMergingCode(io::Printer* printer) override;
0034   virtual void GenerateParsingCode(io::Printer* printer) override;
0035   virtual void GenerateSerializationCode(io::Printer* printer) override;
0036   virtual void GenerateSerializedSizeCode(io::Printer* printer) override;
0037   virtual void GenerateExtensionCode(io::Printer* printer) override;
0038 
0039   virtual void WriteHash(io::Printer* printer) override;
0040   virtual void WriteEquals(io::Printer* printer) override;
0041   virtual void WriteToString(io::Printer* printer) override;
0042 };
0043 
0044 class MessageOneofFieldGenerator : public MessageFieldGenerator {
0045  public:
0046   MessageOneofFieldGenerator(const FieldDescriptor* descriptor,
0047                              int presenceIndex,
0048                              const Options *options);
0049   ~MessageOneofFieldGenerator();
0050 
0051   MessageOneofFieldGenerator(const MessageOneofFieldGenerator&) = delete;
0052   MessageOneofFieldGenerator& operator=(const MessageOneofFieldGenerator&) =
0053       delete;
0054 
0055   virtual void GenerateCloningCode(io::Printer* printer) override;
0056   virtual void GenerateMembers(io::Printer* printer) override;
0057   virtual void GenerateMergingCode(io::Printer* printer) override;
0058   virtual void WriteToString(io::Printer* printer) override;
0059   virtual void GenerateParsingCode(io::Printer* printer) override;
0060 };
0061 
0062 }  // namespace csharp
0063 }  // namespace compiler
0064 }  // namespace protobuf
0065 }  // namespace google
0066 
0067 #endif  // GOOGLE_PROTOBUF_COMPILER_CSHARP_MESSAGE_FIELD_H__
0068