File indexing completed on 2025-01-31 10:11:59
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_PRIMITIVE_FIELD_H__
0009 #define GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_PRIMITIVE_FIELD_H__
0010
0011 #include "google/protobuf/compiler/objectivec/field.h"
0012 #include "google/protobuf/compiler/objectivec/options.h"
0013 #include "google/protobuf/descriptor.h"
0014
0015 namespace google {
0016 namespace protobuf {
0017 namespace compiler {
0018 namespace objectivec {
0019
0020 class PrimitiveFieldGenerator : public SingleFieldGenerator {
0021 friend FieldGenerator* FieldGenerator::Make(
0022 const FieldDescriptor* field,
0023 const GenerationOptions& generation_options);
0024
0025 protected:
0026 PrimitiveFieldGenerator(const FieldDescriptor* descriptor,
0027 const GenerationOptions& generation_options);
0028 ~PrimitiveFieldGenerator() override = default;
0029
0030 PrimitiveFieldGenerator(const PrimitiveFieldGenerator&) = delete;
0031 PrimitiveFieldGenerator& operator=(const PrimitiveFieldGenerator&) = delete;
0032
0033 void GenerateFieldStorageDeclaration(io::Printer* printer) const override;
0034
0035 int ExtraRuntimeHasBitsNeeded() const override;
0036 void SetExtraRuntimeHasBitsBase(int index_base) override;
0037 };
0038
0039 class PrimitiveObjFieldGenerator : public ObjCObjFieldGenerator {
0040 friend FieldGenerator* FieldGenerator::Make(
0041 const FieldDescriptor* field,
0042 const GenerationOptions& generation_options);
0043
0044 protected:
0045 PrimitiveObjFieldGenerator(const FieldDescriptor* descriptor,
0046 const GenerationOptions& generation_options);
0047 ~PrimitiveObjFieldGenerator() override = default;
0048
0049 PrimitiveObjFieldGenerator(const PrimitiveObjFieldGenerator&) = delete;
0050 PrimitiveObjFieldGenerator& operator=(const PrimitiveObjFieldGenerator&) =
0051 delete;
0052 };
0053
0054 class RepeatedPrimitiveFieldGenerator : public RepeatedFieldGenerator {
0055 friend FieldGenerator* FieldGenerator::Make(
0056 const FieldDescriptor* field,
0057 const GenerationOptions& generation_options);
0058
0059 protected:
0060 RepeatedPrimitiveFieldGenerator(const FieldDescriptor* descriptor,
0061 const GenerationOptions& generation_options);
0062 ~RepeatedPrimitiveFieldGenerator() override = default;
0063
0064 RepeatedPrimitiveFieldGenerator(const RepeatedPrimitiveFieldGenerator&) =
0065 delete;
0066 RepeatedPrimitiveFieldGenerator& operator=(
0067 const RepeatedPrimitiveFieldGenerator&) = delete;
0068 };
0069
0070 }
0071 }
0072 }
0073 }
0074
0075 #endif