File indexing completed on 2025-01-31 10:11:56
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef GOOGLE_PROTOBUF_COMPILER_CSHARP_ENUM_FIELD_H__
0009 #define GOOGLE_PROTOBUF_COMPILER_CSHARP_ENUM_FIELD_H__
0010
0011 #include "google/protobuf/compiler/code_generator.h"
0012 #include "google/protobuf/compiler/csharp/csharp_primitive_field.h"
0013
0014 namespace google {
0015 namespace protobuf {
0016 namespace compiler {
0017 namespace csharp {
0018
0019 class EnumFieldGenerator : public PrimitiveFieldGenerator {
0020 public:
0021 EnumFieldGenerator(const FieldDescriptor* descriptor,
0022 int presenceIndex,
0023 const Options *options);
0024 ~EnumFieldGenerator();
0025
0026 EnumFieldGenerator(const EnumFieldGenerator&) = delete;
0027 EnumFieldGenerator& operator=(const EnumFieldGenerator&) = delete;
0028
0029 virtual void GenerateCodecCode(io::Printer* printer) override;
0030 virtual void GenerateParsingCode(io::Printer* printer) override;
0031 virtual void GenerateSerializationCode(io::Printer* printer) override;
0032 virtual void GenerateSerializedSizeCode(io::Printer* printer) override;
0033 virtual void GenerateExtensionCode(io::Printer* printer) override;
0034 };
0035
0036 class EnumOneofFieldGenerator : public PrimitiveOneofFieldGenerator {
0037 public:
0038 EnumOneofFieldGenerator(const FieldDescriptor* descriptor,
0039 int presenceIndex,
0040 const Options *options);
0041 ~EnumOneofFieldGenerator();
0042
0043 EnumOneofFieldGenerator(const EnumOneofFieldGenerator&) = delete;
0044 EnumOneofFieldGenerator& operator=(const EnumOneofFieldGenerator&) = delete;
0045
0046 virtual void GenerateMergingCode(io::Printer* printer) override;
0047 virtual void GenerateParsingCode(io::Printer* printer) override;
0048 virtual void GenerateSerializationCode(io::Printer* printer) override;
0049 virtual void GenerateSerializedSizeCode(io::Printer* printer) override;
0050 };
0051
0052 }
0053 }
0054 }
0055 }
0056
0057 #endif
0058