File indexing completed on 2026-10-03 09:10:59
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_GENERATOR_H__
0011 #define GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_GENERATOR_H__
0012
0013 #include <cstdint>
0014 #include <string>
0015 #include <vector>
0016
0017 #include "google/protobuf/compiler/code_generator.h"
0018 #include "google/protobuf/descriptor.h"
0019 #include "google/protobuf/descriptor.pb.h"
0020
0021
0022 #include "google/protobuf/port_def.inc"
0023
0024 namespace google {
0025 namespace protobuf {
0026 namespace compiler {
0027 namespace objectivec {
0028
0029
0030
0031
0032
0033 class PROTOC_EXPORT ObjectiveCGenerator final : public CodeGenerator {
0034 public:
0035 ObjectiveCGenerator() = default;
0036 ~ObjectiveCGenerator() override = default;
0037
0038 ObjectiveCGenerator(const ObjectiveCGenerator&) = delete;
0039 ObjectiveCGenerator& operator=(const ObjectiveCGenerator&) = delete;
0040
0041
0042 bool Generate(const FileDescriptor* file, const std::string& parameter,
0043 GeneratorContext* context, std::string* error) const override;
0044 bool GenerateAll(const std::vector<const FileDescriptor*>& files,
0045 const std::string& parameter, GeneratorContext* context,
0046 std::string* error) const override;
0047
0048 uint64_t GetSupportedFeatures() const override {
0049 return (FEATURE_PROTO3_OPTIONAL | FEATURE_SUPPORTS_EDITIONS);
0050 }
0051 Edition GetMinimumEdition() const override { return Edition::EDITION_PROTO2; }
0052 Edition GetMaximumEdition() const override {
0053 return Edition::EDITION_2024;
0054 }
0055 };
0056
0057 }
0058 }
0059 }
0060 }
0061
0062 #include "google/protobuf/port_undef.inc"
0063
0064 #endif