File indexing completed on 2026-09-19 09:23:19
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef GOOGLE_PROTOBUF_COMPILER_CPP_OPTIONS_H__
0011 #define GOOGLE_PROTOBUF_COMPILER_CPP_OPTIONS_H__
0012
0013 #include <string>
0014
0015 #include "absl/container/flat_hash_set.h"
0016 #include "google/protobuf/port.h"
0017
0018 namespace google {
0019 namespace protobuf {
0020 namespace compiler {
0021 class AccessInfoMap;
0022 class SplitMap;
0023
0024 namespace cpp {
0025
0026 enum class EnforceOptimizeMode {
0027 kNoEnforcement,
0028 kSpeed,
0029 kCodeSize,
0030 kLiteRuntime,
0031 };
0032
0033 enum class BoundsCheckMode {
0034 kNoEnforcement,
0035 kReturnDefaultValue,
0036 kAbort,
0037 };
0038
0039 struct FieldListenerOptions {
0040 bool inject_field_listener_events = false;
0041 absl::flat_hash_set<std::string> forbidden_field_listener_events;
0042 };
0043
0044
0045 struct Options {
0046 const AccessInfoMap* access_info_map = nullptr;
0047 const SplitMap* split_map = nullptr;
0048 std::string dllexport_decl;
0049 std::string runtime_include_base;
0050 std::string annotation_pragma_name;
0051 std::string annotation_guard_name;
0052 FieldListenerOptions field_listener_options;
0053 EnforceOptimizeMode enforce_mode = EnforceOptimizeMode::kNoEnforcement;
0054 int num_cc_files = 0;
0055 BoundsCheckMode bounds_check_mode = BoundsCheckMode::kNoEnforcement;
0056 bool proto_h = false;
0057 bool transitive_pb_h = true;
0058 bool annotate_headers = false;
0059 bool lite_implicit_weak_fields = false;
0060 bool descriptor_implicit_weak_messages = false;
0061 bool bootstrap = false;
0062 bool opensource_runtime = false;
0063 bool annotate_accessor = false;
0064 bool force_split = false;
0065 bool force_eagerly_verified_lazy =
0066 google::protobuf::internal::ForceEagerlyVerifiedLazyInProtoc();
0067 bool force_inline_string = google::protobuf::internal::ForceInlineStringInProtoc();
0068 bool strip_nonfunctional_codegen = false;
0069 bool experimental_use_micro_string =
0070 google::protobuf::internal::EnableExperimentalMicroString();
0071 };
0072
0073 }
0074 }
0075 }
0076 }
0077
0078 #endif