protovalidate 0.1.0.beta1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +8 -0
- data/CHANGELOG.md +5 -0
- data/LICENSE.txt +201 -0
- data/NOTICE.md +30 -0
- data/README.md +93 -0
- data/Rakefile +32 -0
- data/ext/protovalidate/Cargo.lock +342 -0
- data/ext/protovalidate/Cargo.toml +27 -0
- data/ext/protovalidate/build.rs +4 -0
- data/ext/protovalidate/extconf.rb +8 -0
- data/ext/protovalidate/src/lib.rs +161 -0
- data/ext/protovalidate/sys/Cargo.toml +11 -0
- data/ext/protovalidate/sys/build.rs +218 -0
- data/ext/protovalidate/sys/filelists/absl.txt +126 -0
- data/ext/protovalidate/sys/filelists/antlr4.txt +139 -0
- data/ext/protovalidate/sys/filelists/celcpp.txt +199 -0
- data/ext/protovalidate/sys/filelists/protobuf.txt +83 -0
- data/ext/protovalidate/sys/filelists/protovalidate.txt +14 -0
- data/ext/protovalidate/sys/filelists/re2.txt +25 -0
- data/ext/protovalidate/sys/gen/buf/validate/validate.pb.cc +23621 -0
- data/ext/protovalidate/sys/gen/buf/validate/validate.pb.h +27800 -0
- data/ext/protovalidate/sys/gen/cel/expr/checked.pb.cc +6286 -0
- data/ext/protovalidate/sys/gen/cel/expr/checked.pb.h +6412 -0
- data/ext/protovalidate/sys/gen/cel/expr/syntax.pb.cc +7423 -0
- data/ext/protovalidate/sys/gen/cel/expr/syntax.pb.h +7510 -0
- data/ext/protovalidate/sys/gen/cel/expr/value.pb.cc +2512 -0
- data/ext/protovalidate/sys/gen/cel/expr/value.pb.h +2589 -0
- data/ext/protovalidate/sys/gen/internal/empty_descriptor_set_embed.inc +1 -0
- data/ext/protovalidate/sys/gen/parser/internal/CelBaseVisitor.cpp +9 -0
- data/ext/protovalidate/sys/gen/parser/internal/CelBaseVisitor.h +167 -0
- data/ext/protovalidate/sys/gen/parser/internal/CelLexer.cpp +308 -0
- data/ext/protovalidate/sys/gen/parser/internal/CelLexer.h +57 -0
- data/ext/protovalidate/sys/gen/parser/internal/CelParser.cpp +2484 -0
- data/ext/protovalidate/sys/gen/parser/internal/CelParser.h +697 -0
- data/ext/protovalidate/sys/gen/parser/internal/CelVisitor.cpp +9 -0
- data/ext/protovalidate/sys/gen/parser/internal/CelVisitor.h +98 -0
- data/ext/protovalidate/sys/shim/pv_shim.cc +260 -0
- data/ext/protovalidate/sys/shim/pv_shim.h +84 -0
- data/ext/protovalidate/sys/src/lib.rs +176 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/LICENSE +203 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/algorithm/algorithm.h +96 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/algorithm/container.h +2011 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/attributes.h +1100 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/call_once.h +228 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/casts.cc +61 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/casts.h +313 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/config.h +898 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/const_init.h +76 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/dynamic_annotations.h +480 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/fast_type_id.h +73 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/atomic_hook.h +200 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/atomic_hook_test_helper.h +34 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/cycleclock.cc +72 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/cycleclock.h +144 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/cycleclock_config.h +55 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/direct_mmap.h +170 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/dynamic_annotations.h +398 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/endian.h +279 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/errno_saver.h +43 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/exception_safety_testing.h +1112 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/exception_testing.h +42 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/hardening.h +136 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/hide_ptr.h +51 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/iterator_traits.h +75 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/iterator_traits_test_helper.h +97 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc +667 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/low_level_alloc.h +133 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/low_level_scheduling.h +196 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/nullability_traits.h +71 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/per_thread_tls.h +52 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/poison.h +59 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/pretty_function.h +33 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +279 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/raw_logging.h +217 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/scheduling_mode.h +58 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/scoped_set_env.h +45 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/spinlock.cc +225 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/spinlock.h +310 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/spinlock_akaros.inc +35 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/spinlock_linux.inc +71 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/spinlock_posix.inc +46 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/spinlock_wait.cc +81 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/spinlock_wait.h +95 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/spinlock_win32.inc +40 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/strerror.cc +88 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/strerror.h +39 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/sysinfo.cc +493 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/sysinfo.h +74 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/thread_identity.cc +163 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/thread_identity.h +325 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/tracing.cc +39 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/tracing.h +81 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/tsan_mutex_interface.h +68 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/unaligned_access.h +89 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +134 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +118 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h +62 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/log_severity.cc +56 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/log_severity.h +185 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/macros.h +259 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/no_destructor.h +191 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/nullability.h +318 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/optimization.h +311 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/options.h +212 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/policy_checks.h +115 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/port.h +25 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/prefetch.h +209 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/thread_annotations.h +333 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/throw_delegate.cc +205 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/throw_delegate.h +65 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/cleanup/cleanup.h +143 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/cleanup/internal/cleanup.h +100 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/btree_map.h +941 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/btree_set.h +872 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/chunked_queue.h +757 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/fixed_array.h +548 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/flat_hash_map.h +714 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/flat_hash_set.h +604 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/hash_container_defaults.h +45 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/inlined_vector.h +1025 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/btree.h +3157 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/btree_container.h +875 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/chunked_queue.h +173 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/common.h +302 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/common_policy_traits.h +151 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h +275 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/container_memory.h +571 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h +281 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/hash_generator_testing.h +172 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/hash_policy_testing.h +173 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h +195 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/hashtable_control_bytes.h +527 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/hashtable_debug.h +102 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/hashtable_debug_hooks.h +85 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +316 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +294 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler_force_weak_definition.cc +31 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/heterogeneous_lookup_testing.h +80 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/inlined_vector.h +1094 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/layout.h +828 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/node_slot_policy.h +95 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/raw_hash_map.h +380 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc +2110 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +4056 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/raw_hash_set_resize_impl.h +79 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/test_allocator.h +387 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/test_instance_tracker.h +274 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/tracked.h +83 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/linked_hash_map.h +666 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/linked_hash_set.h +527 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/node_hash_map.h +710 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/node_hash_set.h +603 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/crc32c.cc +95 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/crc32c.h +192 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/cpu_detect.cc +359 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/cpu_detect.h +69 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc.cc +435 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc.h +83 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc32_x86_arm_combined_simd.h +319 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc32c.h +39 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc32c_inline.h +72 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc_cord_state.cc +131 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc_cord_state.h +159 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc_internal.h +161 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc_memcpy.h +122 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc_memcpy_fallback.cc +78 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc_memcpy_x86_arm_combined.cc +459 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc_non_temporal_memcpy.cc +93 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc_x86_arm_combined.cc +824 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/non_temporal_arm_intrinsics.h +81 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/non_temporal_memcpy.h +195 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/failure_signal_handler.h +121 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc +98 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.h +32 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/addresses.h +57 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/bounded_utf8_length_sequence.h +126 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.cc +258 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.h +55 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/demangle.cc +2958 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/demangle.h +76 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/demangle_rust.cc +925 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/demangle_rust.h +50 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc +413 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h +141 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc +334 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/examine_stack.h +70 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stack_consumption.h +50 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +299 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stacktrace_arm-inl.inc +148 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h +96 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stacktrace_emscripten-inl.inc +121 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc +121 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc +270 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stacktrace_riscv-inl.inc +208 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stacktrace_unimplemented-inl.inc +25 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc +81 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +410 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/symbolize.h +163 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/utf8_for_code_point.cc +70 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/utf8_for_code_point.h +47 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc +209 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/vdso_support.h +158 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/leak_check.cc +73 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/leak_check.h +150 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/stacktrace.cc +204 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/stacktrace.h +259 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/symbolize.cc +62 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/symbolize.h +99 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/symbolize_darwin.inc +102 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +1708 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/symbolize_emscripten.inc +63 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/symbolize_unimplemented.inc +40 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/symbolize_win32.inc +99 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/commandlineflag.h +220 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/config.h +68 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/declare.h +77 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/flag.h +307 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/internal/commandlineflag.h +68 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/internal/flag.h +969 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/internal/parse.h +70 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/internal/path_util.h +62 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/internal/private_handle_accessor.h +64 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/internal/program_name.h +50 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/internal/registry.h +98 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/internal/sequence_lock.h +187 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/internal/usage.h +106 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/marshalling.h +335 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/parse.h +130 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/reflection.h +90 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/usage.h +43 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/usage_config.h +135 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/functional/any_invocable.h +335 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/functional/bind_back.h +79 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/functional/bind_front.h +200 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/functional/function_ref.h +249 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/functional/internal/any_invocable.h +787 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/functional/internal/back_binder.h +95 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/functional/internal/front_binder.h +93 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/functional/internal/function_ref.h +151 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/functional/overload.h +72 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/hash/hash.h +466 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/hash/hash_testing.h +382 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/hash/internal/city.cc +337 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/hash/internal/city.h +78 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/hash/internal/hash.cc +430 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/hash/internal/hash.h +1619 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/hash/internal/spy_hash_state.h +289 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/hash/internal/weakly_mixed_integer.h +38 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/absl_check.h +117 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/absl_log.h +115 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/absl_vlog_is_on.h +93 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/check.h +210 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/check_test_impl.inc +1035 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/die_if_null.cc +34 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/die_if_null.h +97 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/flags.h +43 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/globals.cc +178 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/globals.h +230 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/initialize.h +45 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/append_truncated.h +75 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/check_impl.h +151 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/check_op.cc +147 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/check_op.h +565 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/conditions.cc +85 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/conditions.h +247 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/config.h +45 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/container.h +312 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/flags.h +59 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/fnmatch.cc +73 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/fnmatch.h +35 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/globals.cc +145 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/globals.h +101 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/log_format.cc +205 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/log_format.h +78 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/log_impl.h +280 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/log_message.cc +788 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/log_message.h +469 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/log_sink_set.cc +296 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/log_sink_set.h +54 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/nullguard.cc +35 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/nullguard.h +88 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/nullstream.h +128 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/proto.cc +231 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/proto.h +298 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/strip.h +99 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/structured.h +160 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/structured_proto.cc +115 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/structured_proto.h +108 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/test_actions.h +90 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/test_helpers.h +71 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/test_matchers.h +94 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/vlog_config.cc +347 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/vlog_config.h +164 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/voidify.h +50 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/log.h +378 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/log_basic_test_impl.inc +654 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/log_entry.cc +263 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/log_entry.h +223 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/log_sink.cc +23 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/log_sink.h +71 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/log_sink_registry.h +64 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/log_streamer.h +208 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/scoped_mock_log.h +203 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/structured.h +75 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/vlog_is_on.h +72 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/memory/memory.h +328 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/meta/internal/constexpr_testing.h +73 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/meta/internal/requires.h +67 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/meta/type_traits.h +646 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/numeric/bits.h +262 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/numeric/int128.cc +344 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/numeric/int128.h +1224 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/numeric/int128_have_intrinsic.inc +303 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/numeric/int128_no_intrinsic.inc +347 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/numeric/internal/bits.h +394 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/numeric/internal/representation.h +55 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/profiling/hashtable.h +40 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/profiling/internal/exponential_biased.cc +93 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/profiling/internal/exponential_biased.h +130 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/profiling/internal/periodic_sampler.h +211 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/profiling/internal/profile_builder.h +161 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/profiling/internal/sample_recorder.h +253 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/bernoulli_distribution.h +202 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/beta_distribution.h +429 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/bit_gen_ref.h +160 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/discrete_distribution.h +249 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/distributions.h +450 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/exponential_distribution.h +166 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/gaussian_distribution.h +276 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/chi_square.h +89 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/distribution_caller.h +83 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/distribution_test_util.h +113 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/entropy_pool.h +35 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/explicit_seed_seq.h +92 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/fast_uniform_bits.h +271 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/fastmath.h +57 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/generate_real.h +144 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/iostream_state_saver.h +248 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/mock_helpers.h +134 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/mock_overload_set.h +122 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/mock_validators.h +98 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/nanobenchmark.h +172 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/nonsecure_base.h +160 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/pcg_engine.h +287 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/platform.h +158 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/randen.h +96 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/randen_detect.h +33 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/randen_engine.h +265 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/randen_hwaes.h +50 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/randen_slow.h +40 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/randen_traits.h +88 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/salted_seed_seq.h +166 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/seed_material.h +105 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/sequence_urbg.h +60 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/traits.h +170 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/uniform_helper.h +244 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/wide_multiply.h +95 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/log_uniform_int_distribution.h +253 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/mock_distributions.h +269 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/mocking_access.h +74 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/mocking_bit_gen.h +227 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/poisson_distribution.h +262 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/random.h +224 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/seed_gen_exception.h +55 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/seed_sequences.h +112 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/uniform_int_distribution.h +276 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/uniform_real_distribution.h +204 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/zipf_distribution.h +273 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/internal/status_internal.cc +296 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/internal/status_internal.h +157 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/internal/status_matchers.h +260 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/internal/statusor_internal.h +657 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/status.cc +413 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/status.h +1174 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/status_builder.h +978 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/status_macros.h +484 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/status_matchers.h +167 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/status_payload_printer.cc +36 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/status_payload_printer.h +53 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/statusor.cc +106 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/statusor.h +776 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/ascii.cc +296 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/ascii.h +288 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/charconv.cc +1442 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/charconv.h +123 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/charset.h +163 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/cord.cc +1601 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/cord.h +1773 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/cord_analysis.cc +196 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/cord_analysis.h +63 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/cord_buffer.h +574 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/cord_test_helpers.h +122 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/cordz_test_helpers.h +152 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/escaping.cc +1183 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/escaping.h +195 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/has_absl_stringify.h +64 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/has_ostream_operator.h +42 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/append_and_overwrite.h +93 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc +357 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.h +433 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc +504 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/charconv_parse.h +99 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_data_edge.h +63 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_internal.cc +70 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +942 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.cc +1237 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.h +944 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_navigator.cc +187 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_navigator.h +267 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_reader.cc +69 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_reader.h +212 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_consume.cc +64 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_consume.h +47 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_crc.cc +56 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_crc.h +103 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_flat.h +195 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_test_util.h +205 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cordz_functions.cc +102 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cordz_functions.h +87 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cordz_handle.cc +165 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cordz_handle.h +98 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cordz_info.cc +424 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cordz_info.h +295 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cordz_sample_token.h +97 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cordz_statistics.h +88 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cordz_update_scope.h +71 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cordz_update_tracker.h +123 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/damerau_levenshtein_distance.cc +99 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/damerau_levenshtein_distance.h +35 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/escaping.cc +68 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/escaping.h +35 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/escaping_test_common.h +133 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/generic_printer.h +115 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/generic_printer_internal.h +444 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/memutil.cc +48 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/memutil.h +40 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/numbers_test_common.h +184 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/ostringstream.cc +43 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/ostringstream.h +114 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/pow10_helper.h +40 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/resize_uninitialized.h +114 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/stl_type_traits.h +248 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +615 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +653 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/bind.cc +275 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +237 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h +98 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/constexpr_parser.h +357 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +53 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +456 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc +2148 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.h +37 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/output.cc +74 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/output.h +97 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc +140 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +271 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_join_internal.h +340 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h +524 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/string_constant.h +67 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/stringify_sink.cc +28 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/stringify_sink.h +69 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/stringify_stream.h +119 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/utf8.cc +148 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/utf8.h +64 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/match.cc +133 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/match.h +129 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/numbers.cc +1636 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/numbers.h +363 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/resize_and_overwrite.h +198 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/str_cat.cc +247 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/str_cat.h +668 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/str_format.h +887 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/str_join.h +301 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/str_replace.cc +91 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/str_replace.h +222 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/str_split.cc +144 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/str_split.h +587 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/string_view.h +60 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/strip.h +99 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/substitute.cc +187 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/substitute.h +769 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/barrier.cc +52 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/barrier.h +79 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/blocking_counter.cc +73 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/blocking_counter.h +107 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc +173 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.h +56 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/futex.h +177 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/futex_waiter.cc +107 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/futex_waiter.h +63 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc +714 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.h +146 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.cc +220 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.h +178 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.cc +106 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.h +124 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/pthread_waiter.cc +163 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/pthread_waiter.h +60 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/sem_waiter.cc +118 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/sem_waiter.h +65 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/stdcpp_waiter.cc +87 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/stdcpp_waiter.h +56 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/thread_pool.h +96 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/waiter.h +69 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/waiter_base.cc +38 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/waiter_base.h +90 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/win32_waiter.cc +147 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/win32_waiter.h +72 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/mutex.cc +2833 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/mutex.h +1352 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/notification.cc +85 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/notification.h +133 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/civil_time.cc +200 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/civil_time.h +589 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/clock.cc +603 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/clock.h +81 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/clock_interface.h +93 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/duration.cc +918 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/format.cc +155 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time.h +332 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time_detail.h +644 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h +460 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/zone_info_source.h +102 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/civil_time_detail.cc +94 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/test_time_zone_names.h +33 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.cc +140 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.h +52 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc +1069 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.cc +47 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.h +80 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc +115 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.h +97 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.cc +1070 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.h +128 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.cc +333 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.h +60 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc +217 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_name_win.cc +185 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_name_win.h +37 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.cc +159 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.h +132 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/tzfile.h +115 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc +116 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/get_current_time_chrono.inc +31 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/get_current_time_posix.inc +24 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/test_util.h +33 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/simulated_clock.h +109 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/time.cc +507 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/time.h +1926 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/any.h +66 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/any_span.h +1067 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/compare.h +506 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/internal/any_span.h +477 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/internal/span.h +140 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/optional.h +68 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/optional_ref.h +295 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/source_location.cc +18 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/source_location.h +172 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/span.h +827 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/variant.h +139 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/utility/utility.h +151 -0
- data/ext/protovalidate/sys/third_party/antlr4/LICENSE.txt +28 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ANTLRErrorListener.cpp +10 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ANTLRErrorListener.h +167 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ANTLRErrorStrategy.cpp +10 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ANTLRErrorStrategy.h +121 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ANTLRFileStream.cpp +23 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ANTLRFileStream.h +30 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ANTLRInputStream.cpp +180 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ANTLRInputStream.h +79 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/BailErrorStrategy.cpp +61 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/BailErrorStrategy.h +59 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/BaseErrorListener.cpp +25 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/BaseErrorListener.h +36 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/BufferedTokenStream.cpp +414 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/BufferedTokenStream.h +200 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/CharStream.cpp +11 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/CharStream.h +37 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/CommonToken.cpp +193 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/CommonToken.h +158 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/CommonTokenFactory.cpp +39 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/CommonTokenFactory.h +74 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/CommonTokenStream.cpp +78 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/CommonTokenStream.h +79 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ConsoleErrorListener.cpp +15 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ConsoleErrorListener.h +35 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/DefaultErrorStrategy.cpp +336 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/DefaultErrorStrategy.h +466 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/DiagnosticErrorListener.cpp +84 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/DiagnosticErrorListener.h +80 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Exceptions.cpp +64 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Exceptions.h +99 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/FailedPredicateException.cpp +52 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/FailedPredicateException.h +32 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/FlatHashMap.h +57 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/FlatHashSet.h +57 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/InputMismatchException.cpp +18 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/InputMismatchException.h +24 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/IntStream.cpp +12 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/IntStream.h +218 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/InterpreterRuleContext.cpp +19 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/InterpreterRuleContext.h +45 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Lexer.cpp +294 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Lexer.h +196 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/LexerInterpreter.cpp +60 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/LexerInterpreter.h +46 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/LexerNoViableAltException.cpp +36 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/LexerNoViableAltException.h +31 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ListTokenSource.cpp +92 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ListTokenSource.h +88 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/NoViableAltException.cpp +46 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/NoViableAltException.h +42 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Parser.cpp +670 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Parser.h +461 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ParserInterpreter.cpp +294 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ParserInterpreter.h +173 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ParserRuleContext.cpp +138 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ParserRuleContext.h +147 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ProxyErrorListener.cpp +53 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ProxyErrorListener.h +38 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/RecognitionException.cpp +65 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/RecognitionException.h +98 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Recognizer.cpp +157 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Recognizer.h +160 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/RuleContext.cpp +144 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/RuleContext.h +141 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/RuleContextWithAltNum.cpp +27 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/RuleContextWithAltNum.h +32 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/RuntimeMetaData.cpp +54 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/RuntimeMetaData.h +155 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Token.cpp +9 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Token.h +92 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/TokenFactory.h +30 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/TokenSource.cpp +9 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/TokenSource.h +85 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/TokenStream.cpp +11 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/TokenStream.h +137 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/TokenStreamRewriter.cpp +428 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/TokenStreamRewriter.h +295 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/UnbufferedCharStream.cpp +208 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/UnbufferedCharStream.h +117 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/UnbufferedTokenStream.cpp +270 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/UnbufferedTokenStream.h +115 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Version.h +42 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Vocabulary.cpp +64 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Vocabulary.h +177 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/WritableToken.cpp +9 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/WritableToken.h +23 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/antlr4-common.h +101 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/antlr4-runtime.h +168 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATN.cpp +159 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATN.h +133 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNConfig.cpp +106 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNConfig.h +157 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNConfigSet.cpp +233 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNConfigSet.h +157 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.cpp +39 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.h +48 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNDeserializer.cpp +628 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNDeserializer.h +32 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNSimulator.cpp +33 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNSimulator.h +71 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNState.cpp +56 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNState.h +139 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNStateType.cpp +33 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNStateType.h +36 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNType.h +20 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ActionTransition.cpp +29 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ActionTransition.h +35 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/AmbiguityInfo.cpp +16 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/AmbiguityInfo.h +68 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.cpp +129 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.h +51 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/AtomTransition.cpp +27 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/AtomTransition.h +33 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/BasicBlockStartState.h +24 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/BasicState.h +23 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/BlockEndState.h +26 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/BlockStartState.h +30 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ContextSensitivityInfo.cpp +14 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ContextSensitivityInfo.h +47 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/DecisionEventInfo.cpp +14 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/DecisionEventInfo.h +70 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/DecisionInfo.cpp +25 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/DecisionInfo.h +227 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/DecisionState.cpp +12 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/DecisionState.h +34 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/EpsilonTransition.cpp +31 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/EpsilonTransition.h +42 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ErrorInfo.cpp +15 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ErrorInfo.h +43 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/HashUtils.h +18 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LL1Analyzer.cpp +189 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LL1Analyzer.h +76 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerATNConfig.cpp +67 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerATNConfig.h +44 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerATNSimulator.cpp +621 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerATNSimulator.h +199 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerAction.cpp +15 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerAction.h +100 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerActionExecutor.cpp +108 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerActionExecutor.h +128 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerActionType.h +57 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerChannelAction.cpp +43 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerChannelAction.h +59 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerCustomAction.cpp +45 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerCustomAction.h +75 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.cpp +50 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.h +76 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerModeAction.cpp +43 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerModeAction.h +57 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerMoreAction.cpp +36 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerMoreAction.h +53 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerPopModeAction.cpp +36 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerPopModeAction.h +53 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerPushModeAction.cpp +43 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerPushModeAction.h +57 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerSkipAction.cpp +36 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerSkipAction.h +51 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerTypeAction.cpp +43 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerTypeAction.h +51 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LookaheadEventInfo.cpp +16 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LookaheadEventInfo.h +42 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LoopEndState.h +26 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/NotSetTransition.cpp +22 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/NotSetTransition.h +27 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.cpp +16 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.h +25 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ParseInfo.cpp +102 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ParseInfo.h +102 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ParserATNSimulator.cpp +1413 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ParserATNSimulator.h +911 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ParserATNSimulatorOptions.h +50 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PlusBlockStartState.h +29 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PlusLoopbackState.h +25 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.cpp +23 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.h +35 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredicateEvalInfo.cpp +17 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredicateEvalInfo.h +62 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredicateTransition.cpp +24 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredicateTransition.h +50 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredictionContext.cpp +601 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredictionContext.h +225 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredictionContextCache.cpp +56 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredictionContextCache.h +63 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredictionContextMergeCache.cpp +167 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredictionContextMergeCache.h +101 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredictionContextMergeCacheOptions.h +71 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredictionContextType.h +21 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredictionMode.cpp +202 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredictionMode.h +436 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.cpp +179 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.h +60 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/RangeTransition.cpp +26 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/RangeTransition.h +31 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/RuleStartState.h +26 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/RuleStopState.h +27 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/RuleTransition.cpp +33 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/RuleTransition.h +42 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/SemanticContext.cpp +418 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/SemanticContext.h +237 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/SemanticContextType.h +23 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/SerializedATNView.h +101 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/SetTransition.cpp +28 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/SetTransition.h +38 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/SingletonPredictionContext.cpp +79 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/SingletonPredictionContext.h +43 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/StarBlockStartState.h +24 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/StarLoopEntryState.h +37 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/StarLoopbackState.cpp +19 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/StarLoopbackState.h +25 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/TokensStartState.h +24 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/Transition.cpp +36 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/Transition.h +65 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/TransitionType.cpp +27 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/TransitionType.h +33 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/WildcardTransition.cpp +21 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/WildcardTransition.h +27 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/dfa/DFA.cpp +115 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/dfa/DFA.h +96 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/dfa/DFASerializer.cpp +60 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/dfa/DFASerializer.h +32 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/dfa/DFAState.cpp +59 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/dfa/DFAState.h +154 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/dfa/LexerDFASerializer.cpp +17 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/dfa/LexerDFASerializer.h +22 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/internal/Synchronization.cpp +100 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/internal/Synchronization.h +154 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/misc/InterpreterDataReader.cpp +124 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/misc/InterpreterDataReader.h +33 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/misc/Interval.cpp +61 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/misc/Interval.h +84 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/misc/IntervalSet.cpp +508 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/misc/IntervalSet.h +190 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/misc/MurmurHash.cpp +120 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/misc/MurmurHash.h +102 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/misc/Predicate.cpp +4 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/misc/Predicate.h +21 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/Any.cpp +8 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/Any.h +16 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/Arrays.cpp +43 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/Arrays.h +149 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/BitSet.h +76 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/CPPUtils.cpp +207 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/CPPUtils.h +65 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/Casts.h +34 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/Declarations.h +161 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/StringUtils.cpp +38 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/StringUtils.h +16 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/Unicode.h +28 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/Utf8.cpp +242 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/Utf8.h +54 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/AbstractParseTreeVisitor.h +129 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ErrorNode.h +24 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ErrorNodeImpl.cpp +54 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ErrorNodeImpl.h +43 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/IterativeParseTreeWalker.cpp +66 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/IterativeParseTreeWalker.h +53 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ParseTree.cpp +12 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ParseTree.h +111 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ParseTreeListener.cpp +9 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ParseTreeListener.h +39 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ParseTreeProperty.h +50 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ParseTreeType.h +22 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ParseTreeVisitor.cpp +9 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ParseTreeVisitor.h +57 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ParseTreeWalker.cpp +48 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ParseTreeWalker.h +55 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/TerminalNode.h +40 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/TerminalNodeImpl.cpp +54 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/TerminalNodeImpl.h +32 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/Trees.cpp +241 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/Trees.h +78 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/Chunk.cpp +9 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/Chunk.h +44 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/ParseTreeMatch.cpp +69 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/ParseTreeMatch.h +132 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.cpp +64 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.h +105 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.cpp +370 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.h +185 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/RuleTagToken.cpp +77 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/RuleTagToken.h +117 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/TagChunk.cpp +39 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/TagChunk.h +86 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/TextChunk.cpp +28 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/TextChunk.h +51 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/TokenTagToken.cpp +36 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/TokenTagToken.h +80 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPath.cpp +154 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPath.h +86 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathElement.cpp +31 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathElement.h +40 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.cpp +180 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.h +53 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.cpp +13 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.h +22 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathRuleAnywhereElement.cpp +20 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathRuleAnywhereElement.h +27 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.cpp +30 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.h +26 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathTokenAnywhereElement.cpp +20 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathTokenAnywhereElement.h +25 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathTokenElement.cpp +33 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathTokenElement.h +26 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardAnywhereElement.cpp +23 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardAnywhereElement.h +23 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardElement.cpp +24 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardElement.h +23 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/LICENSE +202 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/ast.h +20 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/attribute.cc +330 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/attribute.h +278 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/attribute_set.h +108 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/builtins.h +106 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/function.h +20 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/function_adapter.h +19 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/function_descriptor.h +20 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/function_result.h +70 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/function_result_set.cc +28 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/function_result_set.h +105 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/internal/memory_manager_testing.h +54 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/internal/message_wrapper.h +30 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/internal/operators.h +91 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/internal/unknown_set.cc +31 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/internal/unknown_set.h +131 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/kind.h +25 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/operators.h +507 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/type_provider.h +26 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/checker_options.h +110 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/builtins_arena.cc +28 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/builtins_arena.h +29 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/field_path.h +77 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/namespace_generator.h +120 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/proto_type_mask.h +111 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/proto_type_mask_registry.h +83 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/test_ast_helpers.h +31 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/type_check_env.h +249 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/type_checker_builder_impl.h +170 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/type_checker_impl.h +58 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/type_inference_context.h +229 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/optional.h +30 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/standard_library.h +26 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/type_check_issue.cc +59 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/type_check_issue.h +69 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/type_checker.cc +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/type_checker.h +65 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/type_checker_builder.h +186 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/type_checker_builder_factory.h +59 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/type_checker_subset_factory.h +45 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/validation_result.cc +32 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/validation_result.h +117 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/codelab/checked_expr_conversion_example.h +59 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/codelab/exercise1.h +32 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/codelab/exercise10.h +46 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/codelab/exercise2.h +40 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/codelab/exercise4.h +34 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/codelab/network_functions.h +197 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/allocator.h +606 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/any.cc +38 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/any.h +90 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/arena.h +110 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/arena_string.h +365 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/arena_string_pool.h +86 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/arena_string_view.h +239 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/constant_proto.cc +123 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/constant_proto.h +37 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/expr_proto.cc +514 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/expr_proto.h +32 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/metadata.cc +262 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/metadata.h +920 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/navigable_ast_internal.h +311 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/navigable_ast_kinds.cc +80 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/navigable_ast_kinds.h +74 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/source_info_proto.cc +90 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/source_info_proto.h +32 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast.cc +98 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast.h +157 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast_proto.cc +547 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast_proto.h +52 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast_rewrite.cc +389 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast_rewrite.h +146 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast_traverse.cc +380 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast_traverse.h +105 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast_visitor.h +118 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast_visitor_base.h +88 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/casting.h +75 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/constant.cc +101 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/constant.h +491 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/container.cc +171 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/container.h +138 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/data.h +120 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/decl.cc +221 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/decl.h +446 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/decl_proto.h +50 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/decl_proto_v1alpha1.h +55 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/descriptor_pool_type_introspector.cc +244 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/descriptor_pool_type_introspector.h +106 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/expr.cc +320 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/expr.h +1720 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/expr_factory.h +402 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/expr_printer.h +57 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/format_type_name.h +30 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/function_descriptor.cc +98 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/function_descriptor.h +124 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/internal/byte_string.cc +1074 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/internal/byte_string.h +688 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/internal/casting.h +237 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/internal/metadata.h +41 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/internal/reference_count.cc +118 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/internal/reference_count.h +406 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/internal/value_conversion.h +115 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/json.h +35 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/kind.cc +80 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/kind.h +76 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/legacy_value.cc +1324 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/legacy_value.h +131 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/memory.cc +83 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/memory.h +1505 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/memory_testing.h +71 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/minimal_descriptor_database.h +32 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/minimal_descriptor_pool.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/native_type.h +26 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/navigable_ast.cc +202 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/navigable_ast.h +168 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/operators.cc +233 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/operators.h +87 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/optional_ref.h +163 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/reference.h +269 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/reference_count.h +26 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/signature.cc +640 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/signature.h +101 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/source.cc +679 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/source.h +261 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/standard_definitions.h +349 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/type.cc +737 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/type.h +1303 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/type_introspector.cc +277 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/type_introspector.h +157 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/type_kind.h +113 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/type_proto.h +39 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/type_reflector.h +43 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/type_spec_resolver.cc +324 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/type_spec_resolver.h +46 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/type_testing.h +24 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/typeinfo.cc +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/typeinfo.h +221 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/any_type.h +74 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/basic_struct_type.cc +53 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/basic_struct_type.h +119 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/bool_type.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/bool_wrapper_type.h +79 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/bytes_type.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/bytes_wrapper_type.h +79 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/double_type.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/double_wrapper_type.h +79 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/duration_type.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/dyn_type.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/enum_type.cc +43 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/enum_type.h +128 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/error_type.h +75 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/function_type.cc +89 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/function_type.h +91 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/function_type_pool.cc +29 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/function_type_pool.h +102 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/int_type.h +72 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/int_wrapper_type.h +78 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/legacy_type_introspector.h +34 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/list_type.cc +77 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/list_type.h +115 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/list_type_pool.cc +29 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/list_type_pool.h +80 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/map_type.cc +122 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/map_type.h +124 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/map_type_pool.cc +30 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/map_type_pool.h +93 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/message_type.cc +95 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/message_type.h +209 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/null_type.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/opaque_type.cc +109 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/opaque_type.h +118 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/opaque_type_pool.cc +33 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/opaque_type_pool.h +99 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/optional_type.cc +68 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/optional_type.h +114 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/string_type.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/string_wrapper_type.h +86 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/struct_type.cc +87 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/struct_type.h +158 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/timestamp_type.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/type_param_type.h +78 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/type_pool.cc +96 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/type_pool.h +99 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/type_type.cc +74 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/type_type.h +92 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/type_type_pool.cc +26 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/type_type_pool.h +86 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/types.h +99 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/uint_type.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/uint_wrapper_type.h +79 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/unknown_type.h +74 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/unknown.h +27 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/value.cc +2791 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/value.h +2947 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/value_kind.h +104 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/value_testing.h +307 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/bool_value.cc +97 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/bool_value.h +111 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/bytes_value.cc +194 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/bytes_value.h +338 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/bytes_value_input_stream.h +133 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/bytes_value_output_stream.h +176 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/custom_list_value.cc +614 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/custom_list_value.h +423 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/custom_map_value.cc +823 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/custom_map_value.h +469 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/custom_struct_value.cc +385 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/custom_struct_value.h +459 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/custom_value.h +84 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/double_value.cc +137 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/double_value.h +101 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/duration_value.cc +105 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/duration_value.h +147 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/enum_value.h +49 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/error_value.cc +194 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/error_value.h +276 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/int_value.cc +111 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/int_value.h +117 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/legacy_list_value.cc +76 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/legacy_list_value.h +167 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/legacy_map_value.cc +76 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/legacy_map_value.h +185 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/legacy_struct_value.cc +43 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/legacy_struct_value.h +183 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/list_value.cc +304 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/list_value.h +284 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/list_value_builder.h +110 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/list_value_variant.h +214 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/map_value.cc +378 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/map_value.h +323 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/map_value_builder.h +110 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/map_value_variant.h +212 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/message_value.cc +306 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/message_value.h +268 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/null_value.cc +78 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/null_value.h +96 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/opaque_value.cc +194 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/opaque_value.h +338 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/optional_value.cc +435 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/optional_value.h +207 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_json_list_value.cc +486 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_json_list_value.h +229 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_json_map_value.cc +439 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_json_map_value.h +250 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_json_value.cc +103 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_json_value.h +40 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_map_field_value.cc +583 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_map_field_value.h +242 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_message_value.cc +411 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_message_value.h +249 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_repeated_field_value.cc +365 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_repeated_field_value.h +220 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/string_value.cc +1518 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/string_value.h +489 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/struct_value.cc +390 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/struct_value.h +373 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/struct_value_builder.cc +1552 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/struct_value_builder.h +35 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/struct_value_variant.h +205 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/timestamp_value.cc +105 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/timestamp_value.h +146 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/type_value.cc +72 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/type_value.h +108 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/uint_value.cc +110 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/uint_value.h +119 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/unknown_value.cc +66 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/unknown_value.h +121 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/value_builder.cc +1432 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/value_builder.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/value_variant.cc +537 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/value_variant.h +831 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/values.h +351 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/compiler/compiler.h +195 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/compiler/compiler_factory.h +70 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/compiler/compiler_library_subset_factory.h +80 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/compiler/optional.h +28 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/compiler/standard_library.h +27 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/env/config.h +173 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/env/env.h +76 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/env/env_runtime.h +85 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/env/env_std_extensions.h +42 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/env/env_yaml.h +74 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/env/internal/ext_registry.h +74 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/env/internal/runtime_ext_registry.h +84 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/env/runtime_std_extensions.h +46 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/env/type_info.h +42 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/cel_expression_builder_flat_impl.cc +111 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/cel_expression_builder_flat_impl.h +108 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/check_ast_extensions.cc +58 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/check_ast_extensions.h +34 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/comprehension_vulnerability_check.cc +275 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/comprehension_vulnerability_check.h +51 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/constant_folding.cc +280 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/constant_folding.h +42 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/flat_expr_builder.cc +2667 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/flat_expr_builder.h +104 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/flat_expr_builder_extensions.cc +474 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/flat_expr_builder_extensions.h +481 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/instrumentation.h +60 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/qualified_reference_resolver.cc +359 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/qualified_reference_resolver.h +53 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/regex_precompilation_optimization.cc +274 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/regex_precompilation_optimization.h +29 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/resolver.cc +222 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/resolver.h +127 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/attribute_trail.cc +28 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/attribute_trail.h +65 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/attribute_utility.cc +260 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/attribute_utility.h +179 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/cel_expression_flat_impl.cc +147 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/cel_expression_flat_impl.h +175 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/compiler_constant_step.cc +37 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/compiler_constant_step.h +76 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/comprehension_slots.h +153 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/comprehension_step.cc +685 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/comprehension_step.h +119 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/const_value_step.h +31 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/container_access_step.cc +370 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/container_access_step.h +26 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/create_list_step.cc +283 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/create_list_step.h +40 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/create_map_step.cc +289 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/create_map_step.h +59 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/create_struct_step.cc +270 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/create_struct_step.h +44 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/direct_expression_step.cc +34 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/direct_expression_step.h +99 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/equality_steps.cc +293 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/equality_steps.h +45 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/evaluator_core.cc +178 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/evaluator_core.h +516 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/evaluator_stack.cc +92 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/evaluator_stack.h +327 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/expression_step_base.h +12 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/function_step.cc +529 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/function_step.h +48 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/ident_step.cc +174 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/ident_step.h +31 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/iterator_stack.h +77 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/jump_step.cc +172 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/jump_step.h +74 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/lazy_init_step.cc +236 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/lazy_init_step.h +87 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/logic_step.cc +487 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/logic_step.h +49 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/optional_or_step.cc +305 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/optional_or_step.h +51 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/regex_match_step.cc +135 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/regex_match_step.h +37 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/select_step.cc +581 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/select_step.h +33 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/shadowable_value_step.cc +98 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/shadowable_value_step.h +26 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/ternary_step.cc +194 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/ternary_step.h +26 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/trace_step.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/internal/adapter_activation_impl.cc +87 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/internal/adapter_activation_impl.h +68 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/internal/cel_value_equal.cc +242 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/internal/cel_value_equal.h +34 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/internal/errors.cc +64 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/internal/errors.h +54 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/internal/interop.h +20 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/activation.cc +119 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/activation.h +170 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/activation_bind_helper.h +60 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/ast_rewrite.h +175 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/ast_traverse.h +110 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/ast_visitor.h +185 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/ast_visitor_base.h +109 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/base_activation.h +75 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/builtin_func_registrar.cc +65 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/builtin_func_registrar.h +30 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_attribute.cc +90 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_attribute.h +64 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_builtins.h +19 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_expr_builder_factory.cc +146 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_expr_builder_factory.h +43 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_expression.h +144 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_function.cc +76 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_function.h +80 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_function_adapter.h +121 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_function_adapter_impl.h +407 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_function_registry.cc +122 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_function_registry.h +146 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_number.cc +31 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_number.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_options.cc +51 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_options.h +233 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_type_registry.cc +64 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_type_registry.h +145 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_value.cc +412 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_value.h +770 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_value_internal.h +103 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_value_producer.h +25 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/comparison_functions.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/container_function_registrar.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/container_backed_list_impl.h +44 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/container_backed_map_impl.cc +131 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/container_backed_map_impl.h +70 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/field_access.cc +85 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/field_access.h +70 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/field_backed_list_impl.h +33 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/field_backed_map_impl.h +35 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/internal_field_backed_list_impl.cc +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/internal_field_backed_list_impl.h +59 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/internal_field_backed_map_impl.cc +298 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/internal_field_backed_map_impl.h +77 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/equality_function_registrar.h +44 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/extension_func_registrar.h +20 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/logical_function_registrar.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/message_wrapper.h +139 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/portable_cel_function_adapter.h +72 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/set_util.h +43 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/source_position.h +65 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/string_extension_func_registrar.cc +29 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/string_extension_func_registrar.h +31 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/cel_proto_descriptor_pool_builder.h +40 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/cel_proto_wrap_util.cc +1479 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/cel_proto_wrap_util.h +45 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/cel_proto_wrapper.cc +60 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/cel_proto_wrapper.h +53 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/field_access_impl.cc +746 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/field_access_impl.h +80 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/legacy_type_adapter.h +177 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/legacy_type_info_apis.h +108 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/legacy_type_provider.cc +232 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/legacy_type_provider.h +79 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/proto_message_type_adapter.cc +708 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/proto_message_type_adapter.h +137 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/protobuf_descriptor_type_provider.cc +70 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/protobuf_descriptor_type_provider.h +67 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/protobuf_value_factory.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/trivial_legacy_type_info.h +54 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/transform_utility.h +39 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/unknown_attribute_set.h +20 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/unknown_function_result_set.cc +1 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/unknown_function_result_set.h +27 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/unknown_set.h +22 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/value_export_util.h +28 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/bindings_ext.h +46 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/comprehensions_v2.h +39 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/comprehensions_v2_functions.h +35 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/comprehensions_v2_macros.h +34 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/encoders.h +45 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/formatting.cc +570 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/formatting.h +39 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/lists_functions.h +138 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/math_ext.h +39 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/math_ext_decls.h +33 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/math_ext_macros.h +38 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/proto_ext.h +42 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/ast_converters.h +56 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/bind_proto_to_activation.h +38 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/enum_adapter.h +30 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/internal/map_reflection.cc +132 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/internal/map_reflection.h +67 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/internal/qualify.cc +457 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/internal/qualify.h +117 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/memory_manager.cc +37 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/memory_manager.h +56 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/runtime_adapter.h +51 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/value.h +98 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/value_testing.h +78 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/regex_ext.h +131 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/regex_functions.h +52 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/select_optimization.cc +958 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/select_optimization.h +90 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/sets_functions.h +45 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/strings.cc +432 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/strings.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/align.h +95 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/benchmark.h +20 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/casts.h +50 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/empty_descriptors.cc +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/empty_descriptors.h +31 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/equals_text_proto.h +65 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/exceptions.h +35 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/json.cc +2041 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/json.h +141 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/lexis.cc +79 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/lexis.h +32 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/manual.h +91 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/message_equality.cc +1490 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/message_equality.h +54 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/message_type_name.h +56 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/minimal_descriptor_database.h +32 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/minimal_descriptor_pool.h +40 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/names.h +26 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/new.cc +142 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/new.h +61 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/noop_delete.h +53 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/number.h +299 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/overflow.cc +339 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/overflow.h +178 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/parse_text_proto.h +121 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/proto_file_util.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/proto_matchers.h +140 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/proto_time_encoding.cc +103 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/proto_time_encoding.h +49 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/proto_util.h +87 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/protobuf_runtime_version.h +32 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/re2_options.h +61 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/runfiles.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/status_builder.h +114 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/status_macros.h +152 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/string_pool.cc +79 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/string_pool.h +59 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/strings.cc +693 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/strings.h +90 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/testing.h +44 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/testing_descriptor_pool.h +35 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/testing_message_factory.h +31 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/time.cc +198 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/time.h +65 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/to_address.h +68 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/unicode.h +28 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/utf8.cc +526 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/utf8.h +82 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/well_known_types.cc +2181 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/well_known_types.h +1593 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/internal/ast_factory.cc +320 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/internal/ast_factory.h +174 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/internal/ast_factory_interface.h +130 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/internal/lexer.cc +711 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/internal/lexer.h +286 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/internal/options.h +29 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/internal/pratt_parser.cc +226 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/internal/pratt_parser.h +110 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/internal/pratt_parser_worker.cc +261 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/internal/pratt_parser_worker.h +1143 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/macro.cc +561 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/macro.h +229 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/macro_expr_factory.cc +128 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/macro_expr_factory.h +333 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/macro_registry.cc +87 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/macro_registry.h +59 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/options.h +115 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/parser.cc +1995 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/parser.h +102 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/parser_interface.h +160 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/parser_subset_factory.h +41 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/source_factory.h +47 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/standard_macros.h +31 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/cel_policy.h +333 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/cel_policy_parse_context.h +65 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/cel_policy_parse_result.h +105 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/cel_policy_parser.h +40 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/cel_policy_validation_result.h +84 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/compiler.h +50 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/internal/issue_reporter.h +57 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/internal/optimizer_expr_factory.h +419 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/internal/yaml_string_element_scanner.h +40 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/test_util.h +33 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/yaml_policy_parser.h +135 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/activation.cc +141 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/activation.h +184 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/activation_interface.h +109 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/bind_proto_to_activation.h +174 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/comprehension_vulnerability_check.h +35 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/constant_folding.h +69 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/embedder_context.h +147 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/function.h +115 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/function_adapter.h +830 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/function_overload_reference.h +34 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/function_provider.h +46 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/function_registry.cc +263 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/function_registry.h +160 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/activation_attribute_matcher_access.cc +61 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/activation_attribute_matcher_access.h +60 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/attribute_matcher.h +48 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/convert_constant.cc +78 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/convert_constant.h +39 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/errors.cc +69 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/errors.h +71 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/function_adapter.h +232 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/issue_collector.h +64 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/legacy_runtime_type_provider.h +37 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/runtime_env.cc +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/runtime_env.h +134 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/runtime_env_testing.h +60 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/runtime_friend_access.h +45 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/runtime_impl.cc +159 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/runtime_impl.h +125 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/runtime_type_provider.cc +96 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/runtime_type_provider.h +66 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/optional_types.h +152 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/reference_resolver.h +46 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/regex_precompilation.h +32 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/register_function_helper.h +99 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/runtime.h +229 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/runtime_builder.h +101 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/runtime_builder_factory.h +65 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/runtime_issue.h +88 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/runtime_options.h +209 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/arithmetic_functions.cc +233 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/arithmetic_functions.h +35 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/comparison_functions.cc +272 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/comparison_functions.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/container_functions.cc +136 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/container_functions.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/container_membership_functions.cc +331 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/container_membership_functions.h +34 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/equality_functions.cc +612 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/equality_functions.h +60 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/logical_functions.cc +66 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/logical_functions.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/regex_functions.cc +56 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/regex_functions.h +38 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/string_functions.cc +140 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/string_functions.h +34 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/time_functions.cc +499 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/time_functions.h +56 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/type_conversion_functions.cc +470 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/type_conversion_functions.h +34 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard_functions.h +33 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard_runtime_builder_factory.h +43 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/type_registry.cc +84 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/type_registry.h +155 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/tools/branch_coverage.h +68 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/tools/cel_field_extractor.h +70 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/tools/cel_unparser.h +60 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/tools/descriptor_pool_builder.h +93 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/tools/flatbuffers_backed_impl.h +58 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/tools/navigable_ast.h +169 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/tools/proto_to_predicate.h +48 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/validator/ast_depth_validator.h +27 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/validator/comprehension_nesting_validator.h +31 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/validator/homogeneous_literal_validator.h +38 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/validator/regex_validator.h +53 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/validator/timestamp_literal_validator.h +29 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/validator/validator.cc +85 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/validator/validator.h +151 -0
- data/ext/protovalidate/sys/third_party/protobuf/LICENSE +32 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/any.cc +65 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/any.h +161 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/any.pb.cc +528 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/any.pb.h +516 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/any_lite.cc +95 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/api.pb.cc +1959 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/api.pb.h +1985 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arena.cc +1004 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arena.h +1238 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arena_align.cc +21 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arena_align.h +199 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arena_allocation_policy.h +102 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arena_cleanup.h +108 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arena_test_util.h +91 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arenastring.cc +290 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arenastring.h +545 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arenaz_sampler.cc +227 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arenaz_sampler.h +238 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/annotation_test_util.h +105 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/code_generator.h +256 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/code_generator_lite.h +77 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.h +517 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/command_line_interface_tester.h +162 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/importer.cc +594 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/importer.h +338 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/mock_code_generator.h +144 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/notices.h +242 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/package_info.h +40 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/parser.cc +2716 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/parser.h +642 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/plugin.h +73 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.h +2320 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/retention.h +70 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/scc.h +155 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/subprocess.h +91 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/versions.h +78 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/zip_writer.h +45 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/cpp_edition_defaults.h +12 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/cpp_features.pb.cc +539 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/cpp_features.pb.h +630 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/descriptor.cc +10801 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/descriptor.h +3417 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/descriptor.pb.cc +18982 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/descriptor.pb.h +23170 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/descriptor_database.cc +1102 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/descriptor_database.h +423 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/descriptor_legacy.h +32 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/descriptor_lite.h +110 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/descriptor_test_utils.h +129 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/descriptor_visitor.h +187 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/duration.pb.cc +481 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/duration.pb.h +367 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/dynamic_message.cc +1104 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/dynamic_message.h +217 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/empty.pb.cc +285 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/empty.pb.h +245 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/endian.h +192 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/explicitly_constructed.h +71 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/extension_set.cc +1925 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/extension_set.h +1886 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/extension_set_heavy.cc +459 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/extension_set_inl.h +274 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/feature_resolver.cc +637 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/feature_resolver.h +108 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/field_access_listener.h +166 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/field_mask.pb.cc +472 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/field_mask.pb.h +396 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/field_with_arena.h +110 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_enum_reflection.h +187 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_enum_util.cc +223 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_enum_util.h +185 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_bases.cc +88 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_bases.h +68 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_reflection.cc +4185 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_reflection.h +372 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_tctable_decl.h +615 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_tctable_full.cc +105 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_tctable_gen.cc +960 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_tctable_gen.h +193 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_tctable_impl.h +1229 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_tctable_lite.cc +3308 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_util.cc +434 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_util.h +445 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/has_bits.h +138 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/implicit_weak_message.cc +139 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/implicit_weak_message.h +266 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/inlined_string_field.cc +144 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/inlined_string_field.h +379 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/internal_feature_helper.cc +28 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/internal_feature_helper.h +130 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/internal_metadata_locator.h +291 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/internal_visibility.h +55 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/internal_visibility_for_testing.h +27 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/coded_stream.cc +1045 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/coded_stream.h +1885 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/gzip_stream.cc +333 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/gzip_stream.h +189 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/io_win32.cc +450 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/io_win32.h +118 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/package_info.h +30 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/printer.cc +842 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/printer.h +1183 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/strtod.cc +260 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/strtod.h +57 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/test_zero_copy_stream.h +185 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/tokenizer.cc +1262 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/tokenizer.h +441 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/zero_copy_sink.cc +45 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/zero_copy_sink.h +59 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/zero_copy_stream.cc +128 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/zero_copy_stream.h +269 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc +354 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h +319 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc +699 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h +533 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/descriptor_traits.h +510 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/lexer.cc +512 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/lexer.h +341 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/message_path.cc +46 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/message_path.h +61 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/parser.cc +1437 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/parser.h +37 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/parser_traits.h +400 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/unparser.cc +915 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/unparser.h +38 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/unparser_traits.h +414 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/untyped_message.cc +577 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/untyped_message.h +246 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/writer.cc +307 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/writer.h +214 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/zero_copy_buffered_stream.cc +152 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/zero_copy_buffered_stream.h +338 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/json.cc +137 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/json.h +200 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/map.cc +297 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/map.h +1787 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/map_entry.h +139 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/map_field.cc +597 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/map_field.h +925 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/map_field_lite.h +124 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/map_test.inc +4427 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/map_test_util.h +617 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/map_type_handler.h +374 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/message.cc +745 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/message.h +1936 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/message_lite.cc +807 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/message_lite.h +1861 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/message_unittest.inc +2302 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/message_unittest_legacy_apis.inc +98 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/metadata.h +13 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/metadata_lite.h +271 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/micro_string.cc +376 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/micro_string.h +649 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/os_macros_restore.inc +97 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/os_macros_undef.inc +166 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/package_info.h +43 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/parse_context.cc +850 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/parse_context.h +1883 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/port.cc +131 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/port.h +908 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/port_def.inc +820 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/port_undef.inc +97 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/proto3_lite_unittest.inc +127 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/raw_ptr.cc +29 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/raw_ptr.h +64 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/reflection.h +603 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/reflection_internal.h +313 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/reflection_mode.cc +36 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/reflection_mode.h +144 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/reflection_ops.cc +456 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/reflection_ops.h +67 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/reflection_tester.h +127 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/reflection_visit_field_info.h +1378 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/reflection_visit_fields.h +511 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/repeated_field.cc +76 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/repeated_field.h +1814 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/repeated_field_proxy.h +697 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/repeated_field_proxy_iterator.h +236 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/repeated_field_proxy_traits.h +100 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/repeated_field_reflection_unittest.inc +687 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/repeated_ptr_field.cc +251 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/repeated_ptr_field.h +2706 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/runtime_version.h +27 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/serial_arena.h +447 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/service.cc +22 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/service.h +271 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/source_context.pb.cc +463 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/source_context.pb.h +376 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/string_block.h +181 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/string_member_robber.h +17 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/struct.pb.cc +1663 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/struct.pb.h +1426 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/stubs/callback.h +584 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/stubs/common.cc +121 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/stubs/common.h +94 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/stubs/platform_macros.h +115 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/stubs/port.h +228 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/stubs/status_macros.h +72 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/symbol_checker.cc +219 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/symbol_checker.h +142 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/test_textproto.h +54 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/test_util.h +3897 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/test_util2.h +70 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/test_util_lite.h +86 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/text_format.cc +3324 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/text_format.h +925 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/thread_safe_arena.h +297 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/timestamp.pb.cc +481 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/timestamp.pb.h +367 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/type.pb.cc +3129 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/type.pb.h +3343 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/unknown_field_set.cc +351 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/unknown_field_set.h +464 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/delimited_message_util.cc +107 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/delimited_message_util.h +85 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/field_comparator.cc +237 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/field_comparator.h +256 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/field_mask_util.cc +754 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/field_mask_util.h +242 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/internal_timeval.h +28 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/json_util.h +34 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/message_differencer.cc +2372 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/message_differencer.h +1002 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/package_info.h +23 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/python/field_mask_util_clif_aux.h +32 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/time_util.cc +563 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/time_util.h +297 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/type_resolver.h +56 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/type_resolver_util.cc +436 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/type_resolver_util.h +45 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/varint_shuffle.h +165 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/wire_format.cc +1785 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/wire_format.h +374 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/wire_format_lite.cc +901 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/wire_format_lite.h +1720 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/wire_format_unittest.h +1726 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/wrappers.pb.cc +3203 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/wrappers.pb.h +2317 -0
- data/ext/protovalidate/sys/third_party/protobuf/third_party/utf8_range/utf8_range.c +207 -0
- data/ext/protovalidate/sys/third_party/protobuf/third_party/utf8_range/utf8_range.h +23 -0
- data/ext/protovalidate/sys/third_party/protobuf/third_party/utf8_range/utf8_range_neon.inc +117 -0
- data/ext/protovalidate/sys/third_party/protobuf/third_party/utf8_range/utf8_range_sse.inc +272 -0
- data/ext/protovalidate/sys/third_party/protobuf/third_party/utf8_range/utf8_validity.h +30 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/LICENSE +201 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/cel_rules.h +116 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/cel_validation_rules.cc +166 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/cel_validation_rules.h +72 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/extra_func.cc +482 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/extra_func.h +31 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/field_rules.cc +388 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/field_rules.h +92 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/lib/ipv4.cc +69 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/lib/ipv4.h +58 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/lib/ipv6.cc +143 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/lib/ipv6.h +51 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/lib/parser_common.h +256 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/lib/uri.cc +469 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/lib/uri.h +25 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/message_factory.cc +31 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/message_factory.h +43 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/message_rules.cc +114 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/message_rules.h +39 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/proto_field.h +155 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/rules.cc +437 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/rules.h +221 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/validation_rules.h +153 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/validator.cc +190 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/validator.h +156 -0
- data/ext/protovalidate/sys/third_party/re2/LICENSE +27 -0
- data/ext/protovalidate/sys/third_party/re2/re2/bitmap256.cc +43 -0
- data/ext/protovalidate/sys/third_party/re2/re2/bitmap256.h +88 -0
- data/ext/protovalidate/sys/third_party/re2/re2/bitstate.cc +389 -0
- data/ext/protovalidate/sys/third_party/re2/re2/compile.cc +1265 -0
- data/ext/protovalidate/sys/third_party/re2/re2/dfa.cc +2135 -0
- data/ext/protovalidate/sys/third_party/re2/re2/filtered_re2.cc +138 -0
- data/ext/protovalidate/sys/third_party/re2/re2/filtered_re2.h +115 -0
- data/ext/protovalidate/sys/third_party/re2/re2/mimics_pcre.cc +196 -0
- data/ext/protovalidate/sys/third_party/re2/re2/nfa.cc +714 -0
- data/ext/protovalidate/sys/third_party/re2/re2/onepass.cc +623 -0
- data/ext/protovalidate/sys/third_party/re2/re2/parse.cc +2529 -0
- data/ext/protovalidate/sys/third_party/re2/re2/perl_groups.cc +119 -0
- data/ext/protovalidate/sys/third_party/re2/re2/pod_array.h +55 -0
- data/ext/protovalidate/sys/third_party/re2/re2/prefilter.cc +711 -0
- data/ext/protovalidate/sys/third_party/re2/re2/prefilter.h +168 -0
- data/ext/protovalidate/sys/third_party/re2/re2/prefilter_tree.cc +376 -0
- data/ext/protovalidate/sys/third_party/re2/re2/prefilter_tree.h +153 -0
- data/ext/protovalidate/sys/third_party/re2/re2/prog.cc +1181 -0
- data/ext/protovalidate/sys/third_party/re2/re2/prog.h +493 -0
- data/ext/protovalidate/sys/third_party/re2/re2/re2.cc +1355 -0
- data/ext/protovalidate/sys/third_party/re2/re2/re2.h +1074 -0
- data/ext/protovalidate/sys/third_party/re2/re2/regexp.cc +1004 -0
- data/ext/protovalidate/sys/third_party/re2/re2/regexp.h +693 -0
- data/ext/protovalidate/sys/third_party/re2/re2/set.cc +185 -0
- data/ext/protovalidate/sys/third_party/re2/re2/set.h +91 -0
- data/ext/protovalidate/sys/third_party/re2/re2/simplify.cc +689 -0
- data/ext/protovalidate/sys/third_party/re2/re2/sparse_array.h +394 -0
- data/ext/protovalidate/sys/third_party/re2/re2/sparse_set.h +266 -0
- data/ext/protovalidate/sys/third_party/re2/re2/stringpiece.h +18 -0
- data/ext/protovalidate/sys/third_party/re2/re2/tostring.cc +351 -0
- data/ext/protovalidate/sys/third_party/re2/re2/unicode_casefold.cc +604 -0
- data/ext/protovalidate/sys/third_party/re2/re2/unicode_casefold.h +77 -0
- data/ext/protovalidate/sys/third_party/re2/re2/unicode_groups.cc +6517 -0
- data/ext/protovalidate/sys/third_party/re2/re2/unicode_groups.h +66 -0
- data/ext/protovalidate/sys/third_party/re2/re2/walker-inl.h +249 -0
- data/ext/protovalidate/sys/third_party/re2/util/malloc_counter.h +19 -0
- data/ext/protovalidate/sys/third_party/re2/util/pcre.h +671 -0
- data/ext/protovalidate/sys/third_party/re2/util/rune.cc +260 -0
- data/ext/protovalidate/sys/third_party/re2/util/strutil.cc +26 -0
- data/ext/protovalidate/sys/third_party/re2/util/strutil.h +16 -0
- data/ext/protovalidate/sys/third_party/re2/util/utf.h +44 -0
- data/ext/protovalidate/sys/versions.json +15 -0
- data/lib/buf/validate/validate_pb.rb +55 -0
- data/lib/protovalidate/errors.rb +32 -0
- data/lib/protovalidate/native.rb +30 -0
- data/lib/protovalidate/validator.rb +96 -0
- data/lib/protovalidate/version.rb +10 -0
- data/lib/protovalidate/violation.rb +115 -0
- data/lib/protovalidate.rb +48 -0
- data/sig/buf/validate/validate_pb.rbs +64 -0
- data/sig/protovalidate/native.rbs +14 -0
- data/sig/protovalidate.rbs +90 -0
- metadata +1900 -0
|
@@ -0,0 +1,3417 @@
|
|
|
1
|
+
// Protocol Buffers - Google's data interchange format
|
|
2
|
+
// Copyright 2008 Google Inc. All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
// Use of this source code is governed by a BSD-style
|
|
5
|
+
// license that can be found in the LICENSE file or at
|
|
6
|
+
// https://developers.google.com/open-source/licenses/bsd
|
|
7
|
+
|
|
8
|
+
// Author: kenton@google.com (Kenton Varda)
|
|
9
|
+
// Based on original Protocol Buffers design by
|
|
10
|
+
// Sanjay Ghemawat, Jeff Dean, and others.
|
|
11
|
+
//
|
|
12
|
+
// This file contains classes which describe a type of protocol message.
|
|
13
|
+
// You can use a message's descriptor to learn at runtime what fields
|
|
14
|
+
// it contains and what the types of those fields are. The Message
|
|
15
|
+
// interface also allows you to dynamically access and modify individual
|
|
16
|
+
// fields by passing the FieldDescriptor of the field you are interested
|
|
17
|
+
// in.
|
|
18
|
+
//
|
|
19
|
+
// Most users will not care about descriptors, because they will write
|
|
20
|
+
// code specific to certain protocol types and will simply use the classes
|
|
21
|
+
// generated by the protocol compiler directly. Advanced users who want
|
|
22
|
+
// to operate on arbitrary types (not known at compile time) may want to
|
|
23
|
+
// read descriptors in order to learn about the contents of a message.
|
|
24
|
+
// A very small number of users will want to construct their own
|
|
25
|
+
// Descriptors, either because they are implementing Message manually or
|
|
26
|
+
// because they are writing something like the protocol compiler.
|
|
27
|
+
//
|
|
28
|
+
// For an example of how you might use descriptors, see the code example
|
|
29
|
+
// at the top of message.h.
|
|
30
|
+
|
|
31
|
+
#ifndef GOOGLE_PROTOBUF_DESCRIPTOR_H__
|
|
32
|
+
#define GOOGLE_PROTOBUF_DESCRIPTOR_H__
|
|
33
|
+
|
|
34
|
+
#include <atomic>
|
|
35
|
+
#include <cstdint>
|
|
36
|
+
#include <iterator>
|
|
37
|
+
#include <memory>
|
|
38
|
+
#include <string>
|
|
39
|
+
#include <type_traits>
|
|
40
|
+
#include <utility>
|
|
41
|
+
#include <vector>
|
|
42
|
+
|
|
43
|
+
#include "absl/base/attributes.h"
|
|
44
|
+
#include "absl/base/call_once.h"
|
|
45
|
+
#include "absl/base/macros.h"
|
|
46
|
+
#include "absl/base/optimization.h"
|
|
47
|
+
#include "absl/container/flat_hash_map.h"
|
|
48
|
+
#include "absl/functional/any_invocable.h"
|
|
49
|
+
#include "absl/functional/function_ref.h"
|
|
50
|
+
#include "absl/log/absl_check.h"
|
|
51
|
+
#include "absl/log/absl_log.h"
|
|
52
|
+
#include "absl/strings/str_format.h"
|
|
53
|
+
#include "absl/strings/string_view.h"
|
|
54
|
+
#include "absl/synchronization/mutex.h"
|
|
55
|
+
#include "google/protobuf/descriptor_lite.h" // IWYU pragma: export
|
|
56
|
+
#include "google/protobuf/extension_set.h"
|
|
57
|
+
#include "google/protobuf/port.h"
|
|
58
|
+
|
|
59
|
+
// Must be included last.
|
|
60
|
+
#include "google/protobuf/port_def.inc"
|
|
61
|
+
|
|
62
|
+
#ifdef SWIG
|
|
63
|
+
#define PROTOBUF_EXPORT
|
|
64
|
+
#define PROTOBUF_IGNORE_DEPRECATION_START
|
|
65
|
+
#define PROTOBUF_IGNORE_DEPRECATION_STOP
|
|
66
|
+
#define PROTOBUF_FUTURE_ADD_EARLY_NODISCARD
|
|
67
|
+
#define PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED
|
|
68
|
+
#endif
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
namespace google {
|
|
72
|
+
namespace protobuf {
|
|
73
|
+
// Defined in this file.
|
|
74
|
+
class Descriptor;
|
|
75
|
+
class FieldDescriptor;
|
|
76
|
+
class OneofDescriptor;
|
|
77
|
+
class EnumDescriptor;
|
|
78
|
+
class EnumValueDescriptor;
|
|
79
|
+
class ServiceDescriptor;
|
|
80
|
+
class MethodDescriptor;
|
|
81
|
+
class FileDescriptor;
|
|
82
|
+
class DescriptorDatabase;
|
|
83
|
+
class DescriptorPool;
|
|
84
|
+
|
|
85
|
+
// Defined in descriptor.proto
|
|
86
|
+
#ifndef SWIG
|
|
87
|
+
enum Edition : int;
|
|
88
|
+
enum SymbolVisibility : int;
|
|
89
|
+
#else // !SWIG
|
|
90
|
+
typedef int Edition;
|
|
91
|
+
typedef int SymbolVisibility;
|
|
92
|
+
#endif // !SWIG
|
|
93
|
+
class DescriptorProto;
|
|
94
|
+
class DescriptorProto_ExtensionRange;
|
|
95
|
+
class FieldDescriptorProto;
|
|
96
|
+
class OneofDescriptorProto;
|
|
97
|
+
class EnumDescriptorProto;
|
|
98
|
+
class EnumValueDescriptorProto;
|
|
99
|
+
class ServiceDescriptorProto;
|
|
100
|
+
class MethodDescriptorProto;
|
|
101
|
+
class FileDescriptorProto;
|
|
102
|
+
class MessageOptions;
|
|
103
|
+
class FieldOptions;
|
|
104
|
+
class OneofOptions;
|
|
105
|
+
class EnumOptions;
|
|
106
|
+
class EnumValueOptions;
|
|
107
|
+
class ExtensionRangeOptions;
|
|
108
|
+
class ServiceOptions;
|
|
109
|
+
class MethodOptions;
|
|
110
|
+
class FileOptions;
|
|
111
|
+
class UninterpretedOption;
|
|
112
|
+
class FeatureSet;
|
|
113
|
+
class FeatureSetDefaults;
|
|
114
|
+
class SourceCodeInfo;
|
|
115
|
+
|
|
116
|
+
// Defined in message_lite.h
|
|
117
|
+
class MessageLite;
|
|
118
|
+
|
|
119
|
+
// Defined in message.h
|
|
120
|
+
class Message;
|
|
121
|
+
class Reflection;
|
|
122
|
+
|
|
123
|
+
// Defined in descriptor.cc
|
|
124
|
+
class DescriptorBuilder;
|
|
125
|
+
class FileDescriptorTables;
|
|
126
|
+
class Symbol;
|
|
127
|
+
|
|
128
|
+
// Defined in unknown_field_set.h.
|
|
129
|
+
class UnknownField;
|
|
130
|
+
|
|
131
|
+
// Defined in symbol_checker.h
|
|
132
|
+
class SymbolChecker;
|
|
133
|
+
|
|
134
|
+
// Defined in command_line_interface.cc
|
|
135
|
+
namespace compiler {
|
|
136
|
+
class CodeGenerator;
|
|
137
|
+
class CommandLineInterface;
|
|
138
|
+
namespace cpp {
|
|
139
|
+
class CppGenerator;
|
|
140
|
+
// Defined in helpers.h
|
|
141
|
+
class Formatter;
|
|
142
|
+
#ifndef SWIG
|
|
143
|
+
internal::FieldDescriptorLite::CppRepeatedType
|
|
144
|
+
CalculateFieldDescriptorRepeatedType(const FieldDescriptor* field);
|
|
145
|
+
#endif // !SWIG
|
|
146
|
+
} // namespace cpp
|
|
147
|
+
namespace java {
|
|
148
|
+
class MemoizeProjection;
|
|
149
|
+
} // namespace java
|
|
150
|
+
} // namespace compiler
|
|
151
|
+
|
|
152
|
+
namespace descriptor_unittest {
|
|
153
|
+
class DescriptorPoolMemoizationTest;
|
|
154
|
+
class DescriptorTest;
|
|
155
|
+
class FeaturesTest;
|
|
156
|
+
class ValidationErrorTest;
|
|
157
|
+
} // namespace descriptor_unittest
|
|
158
|
+
|
|
159
|
+
// Defined in printer.h
|
|
160
|
+
namespace io {
|
|
161
|
+
class Printer;
|
|
162
|
+
} // namespace io
|
|
163
|
+
|
|
164
|
+
namespace internal {
|
|
165
|
+
class InternalFeatureHelper;
|
|
166
|
+
} // namespace internal
|
|
167
|
+
|
|
168
|
+
// NB, all indices are zero-based.
|
|
169
|
+
struct PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED SourceLocation {
|
|
170
|
+
int start_line;
|
|
171
|
+
int end_line;
|
|
172
|
+
int start_column;
|
|
173
|
+
int end_column;
|
|
174
|
+
|
|
175
|
+
// Doc comments found at the source location.
|
|
176
|
+
// See the comments in SourceCodeInfo.Location (descriptor.proto) for details.
|
|
177
|
+
std::string leading_comments;
|
|
178
|
+
std::string trailing_comments;
|
|
179
|
+
std::vector<std::string> leading_detached_comments;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
// Options when generating machine-parsable output from a descriptor with
|
|
183
|
+
// DebugString().
|
|
184
|
+
struct PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED DebugStringOptions {
|
|
185
|
+
// include original user comments as recorded in SourceLocation entries. N.B.
|
|
186
|
+
// that this must be |false| by default: several other pieces of code (for
|
|
187
|
+
// example, the C++ code generation for fields in the proto compiler) rely on
|
|
188
|
+
// DebugString() output being unobstructed by user comments.
|
|
189
|
+
bool include_comments;
|
|
190
|
+
// If true, elide the braced body in the debug string.
|
|
191
|
+
bool elide_group_body;
|
|
192
|
+
bool elide_oneof_body;
|
|
193
|
+
|
|
194
|
+
DebugStringOptions()
|
|
195
|
+
: include_comments(false),
|
|
196
|
+
elide_group_body(false),
|
|
197
|
+
elide_oneof_body(false) {
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
// A class to handle the simplest cases of a lazily linked descriptor
|
|
202
|
+
// for a message type that isn't built at the time of cross linking,
|
|
203
|
+
// which is needed when a pool has lazily_build_dependencies_ set.
|
|
204
|
+
// Must be instantiated as mutable in a descriptor.
|
|
205
|
+
namespace internal {
|
|
206
|
+
|
|
207
|
+
// The classes in this file represent a significant memory footprint for the
|
|
208
|
+
// library. We make sure we are not accidentally making them larger by
|
|
209
|
+
// hardcoding the struct size for a specific platform. Use as:
|
|
210
|
+
//
|
|
211
|
+
// PROTOBUF_INTERNAL_CHECK_CLASS_SIZE(type, expected_size_in_x84-64);
|
|
212
|
+
//
|
|
213
|
+
|
|
214
|
+
#if !defined(PROTOBUF_INTERNAL_CHECK_CLASS_SIZE)
|
|
215
|
+
#define PROTOBUF_INTERNAL_CHECK_CLASS_SIZE(t, expected)
|
|
216
|
+
#endif
|
|
217
|
+
|
|
218
|
+
// This class is used to index into the memory it is pointing at.
|
|
219
|
+
// The layout is as follows:
|
|
220
|
+
// [ chars .... ] [ data0 (uint16_t) ] [ ... ] [ dataN (uint16_t) ]
|
|
221
|
+
// ^
|
|
222
|
+
// payload_ points here
|
|
223
|
+
//
|
|
224
|
+
// The offsets are relative to payload_.
|
|
225
|
+
//
|
|
226
|
+
// The offsets are as follows:
|
|
227
|
+
// (0) `name` size. `name` ends at `payload_`
|
|
228
|
+
// (1) `full_name` size. `full_name` ends at `payload_` and shares bytes with
|
|
229
|
+
// `name`.
|
|
230
|
+
// .. the following offsets only available for `FieldDescriptor` ..
|
|
231
|
+
// (2)/(3) `lowercase` offset/size. The data bytes could be shared.
|
|
232
|
+
// (4)/(5) `camelcase` offset/size. The data bytes could be shared.
|
|
233
|
+
// (6)/(7) `json_name` offset/size. The data bytes could be shared.
|
|
234
|
+
//
|
|
235
|
+
// NOTE ABOUT NULL TERMINATION:
|
|
236
|
+
// The name accessors were migrated from `std::string` to `absl::string_view`,
|
|
237
|
+
// which caused valid code to break. In particular, there are previously
|
|
238
|
+
// correct callers calling `foo.name().data()` and using it as a NULL
|
|
239
|
+
// terminated C-string.
|
|
240
|
+
// To prevent further breakage we are adding null termination on all these
|
|
241
|
+
// names even though it is outside the contract for `absl::string_view`.
|
|
242
|
+
// This might change in the future.
|
|
243
|
+
class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED DescriptorNames {
|
|
244
|
+
public:
|
|
245
|
+
// Uninitialized, to support `= default` of descriptor types.
|
|
246
|
+
DescriptorNames() = default;
|
|
247
|
+
explicit DescriptorNames(const char* payload) : payload_(payload) {}
|
|
248
|
+
|
|
249
|
+
// The full name is just before `payload_`, and the name is the suffix of it.
|
|
250
|
+
// We don't need a special offset for them.
|
|
251
|
+
// NOTE: the sizes don't include the null terminator, so add +1 to the offset.
|
|
252
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view name() const {
|
|
253
|
+
return get(get_size(0) + 1, get_size(0));
|
|
254
|
+
}
|
|
255
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view full_name() const {
|
|
256
|
+
return get(get_size(1) + 1, get_size(1));
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// Only available for `FieldDescriptor`. This is not checked at runtime.
|
|
260
|
+
// NOTE: The offsets here already take into account the null terminator.
|
|
261
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view lowercase_name() const {
|
|
262
|
+
return get(get_size(2), get_size(3));
|
|
263
|
+
}
|
|
264
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view camelcase_name() const {
|
|
265
|
+
return get(get_size(4), get_size(5));
|
|
266
|
+
}
|
|
267
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view json_name() const {
|
|
268
|
+
return get(get_size(6), get_size(7));
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD static constexpr size_t
|
|
272
|
+
AllocationSizeForSimpleNames(size_t full_name_size) {
|
|
273
|
+
return full_name_size + /* \0 */ 1 + 2 * sizeof(uint16_t);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
private:
|
|
277
|
+
size_t get_size(int index) const {
|
|
278
|
+
// We don't use `uint16_t` in the payload type to avoid having to align it.
|
|
279
|
+
// Instead, we read via memcpy.
|
|
280
|
+
uint16_t size;
|
|
281
|
+
memcpy(&size, payload_ + index * sizeof(size), sizeof(size));
|
|
282
|
+
return size;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
absl::string_view get(size_t offset, size_t size) const {
|
|
286
|
+
return absl::string_view(payload_ - offset, size);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
const char* payload_;
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
class FlatAllocator;
|
|
293
|
+
|
|
294
|
+
class PROTOBUF_EXPORT LazyDescriptor {
|
|
295
|
+
public:
|
|
296
|
+
// Init function to be called at init time of a descriptor containing
|
|
297
|
+
// a LazyDescriptor.
|
|
298
|
+
void Init() {
|
|
299
|
+
descriptor_ = nullptr;
|
|
300
|
+
once_ = nullptr;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
// Sets the value of the descriptor if it is known during the descriptor
|
|
304
|
+
// building process. Not thread safe, should only be called during the
|
|
305
|
+
// descriptor build process. Should not be called after SetLazy has been
|
|
306
|
+
// called.
|
|
307
|
+
void Set(const Descriptor* descriptor);
|
|
308
|
+
|
|
309
|
+
// Sets the information needed to lazily cross link the descriptor at a later
|
|
310
|
+
// time, SetLazy is not thread safe, should be called only once at descriptor
|
|
311
|
+
// build time if the symbol wasn't found and building of the file containing
|
|
312
|
+
// that type is delayed because lazily_build_dependencies_ is set on the pool.
|
|
313
|
+
// Should not be called after Set() has been called.
|
|
314
|
+
void SetLazy(absl::string_view name, const FileDescriptor* file);
|
|
315
|
+
|
|
316
|
+
// Returns the current value of the descriptor, thread-safe. If SetLazy(...)
|
|
317
|
+
// has been called, will do a one-time cross link of the type specified,
|
|
318
|
+
// building the descriptor file that contains the type if necessary.
|
|
319
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD inline const Descriptor* Get(
|
|
320
|
+
const ServiceDescriptor* service) {
|
|
321
|
+
Once(service);
|
|
322
|
+
return descriptor_;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
private:
|
|
326
|
+
void Once(const ServiceDescriptor* service);
|
|
327
|
+
|
|
328
|
+
const Descriptor* descriptor_;
|
|
329
|
+
// The once_ flag is followed by a NUL terminated string for the type name.
|
|
330
|
+
absl::once_flag* once_;
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
class PROTOBUF_EXPORT SymbolBase {
|
|
334
|
+
private:
|
|
335
|
+
friend class google::protobuf::Symbol;
|
|
336
|
+
uint8_t symbol_type_;
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
// Some types have more than one SymbolBase because they have multiple
|
|
340
|
+
// identities in the table. We can't have duplicate direct bases, so we use this
|
|
341
|
+
// intermediate base to do so.
|
|
342
|
+
// See BuildEnumValue for details.
|
|
343
|
+
template <int N>
|
|
344
|
+
class PROTOBUF_EXPORT SymbolBaseN : public SymbolBase {};
|
|
345
|
+
|
|
346
|
+
PROTOBUF_EXPORT absl::string_view ShortEditionName(Edition edition);
|
|
347
|
+
|
|
348
|
+
bool IsEnumFullySequential(const EnumDescriptor* enum_desc);
|
|
349
|
+
|
|
350
|
+
const std::string& DefaultValueStringAsString(const FieldDescriptor* field);
|
|
351
|
+
const std::string& NameOfEnumAsString(const EnumValueDescriptor* descriptor);
|
|
352
|
+
|
|
353
|
+
struct NameLimits {
|
|
354
|
+
static constexpr int kPackageName = 511;
|
|
355
|
+
static constexpr int kReservedName = std::numeric_limits<uint16_t>::max();
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
} // namespace internal
|
|
359
|
+
|
|
360
|
+
// Provide an Abseil formatter for edition names.
|
|
361
|
+
template <typename Sink>
|
|
362
|
+
void AbslStringify(Sink& sink, Edition edition) {
|
|
363
|
+
absl::Format(&sink, "%v", internal::ShortEditionName(edition));
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// Describes a type of protocol message, or a particular group within a
|
|
367
|
+
// message. To obtain the Descriptor for a given message object, call
|
|
368
|
+
// Message::GetDescriptor(). Generated message classes also have a
|
|
369
|
+
// static method called descriptor() which returns the type's descriptor.
|
|
370
|
+
// Use DescriptorPool to construct your own descriptors.
|
|
371
|
+
class PROTOBUF_EXPORT Descriptor : private internal::SymbolBase {
|
|
372
|
+
public:
|
|
373
|
+
typedef DescriptorProto Proto;
|
|
374
|
+
#ifndef SWIG
|
|
375
|
+
Descriptor(const Descriptor&) = delete;
|
|
376
|
+
Descriptor& operator=(const Descriptor&) = delete;
|
|
377
|
+
#endif
|
|
378
|
+
|
|
379
|
+
// The name of the message type, not including its scope.
|
|
380
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view name() const;
|
|
381
|
+
|
|
382
|
+
// The fully-qualified name of the message type, scope delimited by
|
|
383
|
+
// periods. For example, message type "Foo" which is declared in package
|
|
384
|
+
// "bar" has full name "bar.Foo". If a type "Baz" is nested within
|
|
385
|
+
// Foo, Baz's full_name is "bar.Foo.Baz". To get only the part that
|
|
386
|
+
// comes after the last '.', use name().
|
|
387
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view full_name() const;
|
|
388
|
+
|
|
389
|
+
// Index of this descriptor within the file or containing type's message
|
|
390
|
+
// type array.
|
|
391
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int index() const;
|
|
392
|
+
|
|
393
|
+
// The .proto file in which this message type was defined. Never nullptr.
|
|
394
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FileDescriptor* file() const;
|
|
395
|
+
|
|
396
|
+
// If this Descriptor describes a nested type, this returns the type
|
|
397
|
+
// in which it is nested. Otherwise, returns nullptr.
|
|
398
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const Descriptor* containing_type() const;
|
|
399
|
+
|
|
400
|
+
// Get options for this message type. These are specified in the .proto file
|
|
401
|
+
// by placing lines like "option foo = 1234;" in the message definition.
|
|
402
|
+
// Allowed options are defined by MessageOptions in descriptor.proto, and any
|
|
403
|
+
// available extensions of that message.
|
|
404
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const MessageOptions& options() const;
|
|
405
|
+
|
|
406
|
+
// Write the contents of this Descriptor into the given DescriptorProto.
|
|
407
|
+
// The target DescriptorProto must be clear before calling this; if it
|
|
408
|
+
// isn't, the result may be garbage.
|
|
409
|
+
void CopyTo(DescriptorProto* proto) const;
|
|
410
|
+
|
|
411
|
+
// Fills in the message-level settings of this message (e.g. name, reserved
|
|
412
|
+
// fields, message options) to `proto`. This is essentially all of the
|
|
413
|
+
// metadata owned exclusively by this descriptor, and not any nested
|
|
414
|
+
// descriptors.
|
|
415
|
+
void CopyHeadingTo(DescriptorProto* proto) const;
|
|
416
|
+
|
|
417
|
+
// Write the contents of this descriptor in a human-readable form. Output
|
|
418
|
+
// will be suitable for re-parsing.
|
|
419
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD std::string DebugString() const;
|
|
420
|
+
|
|
421
|
+
// Similar to DebugString(), but additionally takes options (e.g.,
|
|
422
|
+
// include original user comments in output).
|
|
423
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD std::string DebugStringWithOptions(
|
|
424
|
+
const DebugStringOptions& options) const;
|
|
425
|
+
|
|
426
|
+
// Allows formatting with absl and gtest.
|
|
427
|
+
template <typename Sink>
|
|
428
|
+
friend void AbslStringify(Sink& sink, const Descriptor& d) {
|
|
429
|
+
absl::Format(&sink, "%s", d.DebugString());
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
// Returns true if this is a placeholder for an unknown type. This will
|
|
433
|
+
// only be the case if this descriptor comes from a DescriptorPool
|
|
434
|
+
// with AllowUnknownDependencies() set.
|
|
435
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool is_placeholder() const;
|
|
436
|
+
|
|
437
|
+
enum WellKnownType {
|
|
438
|
+
WELLKNOWNTYPE_UNSPECIFIED, // Not a well-known type.
|
|
439
|
+
|
|
440
|
+
// Wrapper types.
|
|
441
|
+
WELLKNOWNTYPE_DOUBLEVALUE, // google.protobuf.DoubleValue
|
|
442
|
+
WELLKNOWNTYPE_FLOATVALUE, // google.protobuf.FloatValue
|
|
443
|
+
WELLKNOWNTYPE_INT64VALUE, // google.protobuf.Int64Value
|
|
444
|
+
WELLKNOWNTYPE_UINT64VALUE, // google.protobuf.UInt64Value
|
|
445
|
+
WELLKNOWNTYPE_INT32VALUE, // google.protobuf.Int32Value
|
|
446
|
+
WELLKNOWNTYPE_UINT32VALUE, // google.protobuf.UInt32Value
|
|
447
|
+
WELLKNOWNTYPE_STRINGVALUE, // google.protobuf.StringValue
|
|
448
|
+
WELLKNOWNTYPE_BYTESVALUE, // google.protobuf.BytesValue
|
|
449
|
+
WELLKNOWNTYPE_BOOLVALUE, // google.protobuf.BoolValue
|
|
450
|
+
|
|
451
|
+
// Other well known types.
|
|
452
|
+
WELLKNOWNTYPE_ANY, // google.protobuf.Any
|
|
453
|
+
WELLKNOWNTYPE_FIELDMASK, // google.protobuf.FieldMask
|
|
454
|
+
WELLKNOWNTYPE_DURATION, // google.protobuf.Duration
|
|
455
|
+
WELLKNOWNTYPE_TIMESTAMP, // google.protobuf.Timestamp
|
|
456
|
+
WELLKNOWNTYPE_VALUE, // google.protobuf.Value
|
|
457
|
+
WELLKNOWNTYPE_LISTVALUE, // google.protobuf.ListValue
|
|
458
|
+
WELLKNOWNTYPE_STRUCT, // google.protobuf.Struct
|
|
459
|
+
|
|
460
|
+
// New well-known types may be added in the future.
|
|
461
|
+
// Please make sure any switch() statements have a 'default' case.
|
|
462
|
+
__WELLKNOWNTYPE__DO_NOT_USE__ADD_DEFAULT_INSTEAD__,
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD WellKnownType well_known_type() const;
|
|
466
|
+
|
|
467
|
+
// Field stuff -----------------------------------------------------
|
|
468
|
+
|
|
469
|
+
// The number of fields in this message type.
|
|
470
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int field_count() const;
|
|
471
|
+
// Gets a field by index, where 0 <= index < field_count().
|
|
472
|
+
// These are returned in the order they were defined in the .proto file, not
|
|
473
|
+
// the field number order. (Use `FindFieldByNumber()` for
|
|
474
|
+
// tag number -> value lookup).
|
|
475
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldDescriptor* field(
|
|
476
|
+
int index) const;
|
|
477
|
+
|
|
478
|
+
// Looks up a field by declared tag number. Returns nullptr if no such field
|
|
479
|
+
// exists.
|
|
480
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldDescriptor* FindFieldByNumber(
|
|
481
|
+
int number) const;
|
|
482
|
+
// Looks up a field by name. Returns nullptr if no such field exists.
|
|
483
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldDescriptor* FindFieldByName(
|
|
484
|
+
absl::string_view name) const;
|
|
485
|
+
|
|
486
|
+
// Looks up a field by lowercased name (as returned by lowercase_name()).
|
|
487
|
+
// This lookup may be ambiguous if multiple field names differ only by case,
|
|
488
|
+
// in which case the field returned is chosen arbitrarily from the matches.
|
|
489
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldDescriptor*
|
|
490
|
+
FindFieldByLowercaseName(absl::string_view lowercase_name) const;
|
|
491
|
+
|
|
492
|
+
// Looks up a field by camel-case name (as returned by camelcase_name()).
|
|
493
|
+
// This lookup may be ambiguous if multiple field names differ in a way that
|
|
494
|
+
// leads them to have identical camel-case names, in which case the field
|
|
495
|
+
// returned is chosen arbitrarily from the matches.
|
|
496
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldDescriptor*
|
|
497
|
+
FindFieldByCamelcaseName(absl::string_view camelcase_name) const;
|
|
498
|
+
|
|
499
|
+
// The number of oneofs in this message type.
|
|
500
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int oneof_decl_count() const;
|
|
501
|
+
// The number of oneofs in this message type, excluding synthetic oneofs.
|
|
502
|
+
// Real oneofs always come first, so iterating up to real_oneof_decl_cout()
|
|
503
|
+
// will yield all real oneofs.
|
|
504
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int real_oneof_decl_count() const;
|
|
505
|
+
// Get a oneof by index, where 0 <= index < oneof_decl_count().
|
|
506
|
+
// These are returned in the order they were defined in the .proto file.
|
|
507
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const OneofDescriptor* oneof_decl(
|
|
508
|
+
int index) const;
|
|
509
|
+
// Get a oneof by index, excluding synthetic oneofs, where 0 <= index <
|
|
510
|
+
// real_oneof_decl_count(). These are returned in the order they were defined
|
|
511
|
+
// in the .proto file.
|
|
512
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const OneofDescriptor* real_oneof_decl(
|
|
513
|
+
int index) const;
|
|
514
|
+
|
|
515
|
+
// Looks up a oneof by name. Returns nullptr if no such oneof exists.
|
|
516
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const OneofDescriptor* FindOneofByName(
|
|
517
|
+
absl::string_view name) const;
|
|
518
|
+
|
|
519
|
+
// Nested type stuff -----------------------------------------------
|
|
520
|
+
|
|
521
|
+
// The number of nested types in this message type.
|
|
522
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int nested_type_count() const;
|
|
523
|
+
// Gets a nested type by index, where 0 <= index < nested_type_count().
|
|
524
|
+
// These are returned in the order they were defined in the .proto file.
|
|
525
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const Descriptor* nested_type(
|
|
526
|
+
int index) const;
|
|
527
|
+
|
|
528
|
+
// Looks up a nested type by name. Returns nullptr if no such nested type
|
|
529
|
+
// exists.
|
|
530
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const Descriptor* FindNestedTypeByName(
|
|
531
|
+
absl::string_view name) const;
|
|
532
|
+
|
|
533
|
+
// Enum stuff ------------------------------------------------------
|
|
534
|
+
|
|
535
|
+
// The number of enum types in this message type.
|
|
536
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int enum_type_count() const;
|
|
537
|
+
// Gets an enum type by index, where 0 <= index < enum_type_count().
|
|
538
|
+
// These are returned in the order they were defined in the .proto file.
|
|
539
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const EnumDescriptor* enum_type(
|
|
540
|
+
int index) const;
|
|
541
|
+
|
|
542
|
+
// Looks up an enum type by name. Returns nullptr if no such enum type
|
|
543
|
+
// exists.
|
|
544
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const EnumDescriptor* FindEnumTypeByName(
|
|
545
|
+
absl::string_view name) const;
|
|
546
|
+
|
|
547
|
+
// Looks up an enum value by name, among all enum types in this message.
|
|
548
|
+
// Returns nullptr if no such value exists.
|
|
549
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const EnumValueDescriptor*
|
|
550
|
+
FindEnumValueByName(absl::string_view name) const;
|
|
551
|
+
|
|
552
|
+
// Extensions ------------------------------------------------------
|
|
553
|
+
|
|
554
|
+
// A range of field numbers which are designated for third-party
|
|
555
|
+
// extensions.
|
|
556
|
+
class PROTOBUF_EXPORT ExtensionRange {
|
|
557
|
+
public:
|
|
558
|
+
typedef DescriptorProto_ExtensionRange Proto;
|
|
559
|
+
|
|
560
|
+
typedef ExtensionRangeOptions OptionsType;
|
|
561
|
+
|
|
562
|
+
// See Descriptor::CopyTo().
|
|
563
|
+
void CopyTo(DescriptorProto_ExtensionRange* proto) const;
|
|
564
|
+
|
|
565
|
+
// Returns the start field number of this range (inclusive).
|
|
566
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int start_number() const {
|
|
567
|
+
return start_;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
// Returns the end field number of this range (exclusive).
|
|
571
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int end_number() const { return end_; }
|
|
572
|
+
|
|
573
|
+
// Returns the index of this extension range within the message's extension
|
|
574
|
+
// range array.
|
|
575
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int index() const;
|
|
576
|
+
|
|
577
|
+
// Returns the ExtensionRangeOptions for this range.
|
|
578
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const ExtensionRangeOptions& options()
|
|
579
|
+
const {
|
|
580
|
+
return *options_;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
// Returns the name of the containing type.
|
|
584
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view name() const {
|
|
585
|
+
return containing_type_->name();
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
// Returns the full name of the containing type.
|
|
589
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view full_name() const {
|
|
590
|
+
return containing_type_->full_name();
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
// Returns the .proto file in which this range was defined.
|
|
594
|
+
// Never nullptr.
|
|
595
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FileDescriptor* file() const {
|
|
596
|
+
return containing_type_->file();
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
// Returns the Descriptor for the message containing this range.
|
|
600
|
+
// Never nullptr.
|
|
601
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const Descriptor* containing_type()
|
|
602
|
+
const {
|
|
603
|
+
return containing_type_;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
private:
|
|
607
|
+
int start_;
|
|
608
|
+
int end_;
|
|
609
|
+
const ExtensionRangeOptions* options_;
|
|
610
|
+
|
|
611
|
+
private:
|
|
612
|
+
const Descriptor* containing_type_;
|
|
613
|
+
const FeatureSet* proto_features_;
|
|
614
|
+
const FeatureSet* merged_features_;
|
|
615
|
+
|
|
616
|
+
// Get the merged features that apply to this extension range. These are
|
|
617
|
+
// specified in the .proto file through the feature options in the message
|
|
618
|
+
// definition. Allowed features are defined by Features in descriptor.proto,
|
|
619
|
+
// along with any backend-specific extensions to it.
|
|
620
|
+
const FeatureSet& features() const { return *merged_features_; }
|
|
621
|
+
friend class internal::InternalFeatureHelper;
|
|
622
|
+
|
|
623
|
+
// Walks up the descriptor tree to generate the source location path
|
|
624
|
+
// to this descriptor from the file root.
|
|
625
|
+
void GetLocationPath(std::vector<int>* output) const;
|
|
626
|
+
|
|
627
|
+
friend class Descriptor;
|
|
628
|
+
friend class DescriptorPool;
|
|
629
|
+
friend class DescriptorBuilder;
|
|
630
|
+
friend class SymbolChecker;
|
|
631
|
+
};
|
|
632
|
+
|
|
633
|
+
// The number of extension ranges in this message type.
|
|
634
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int extension_range_count() const;
|
|
635
|
+
// Gets an extension range by index, where 0 <= index <
|
|
636
|
+
// extension_range_count(). These are returned in the order they were defined
|
|
637
|
+
// in the .proto file.
|
|
638
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const ExtensionRange* extension_range(
|
|
639
|
+
int index) const;
|
|
640
|
+
|
|
641
|
+
// Returns true if the number is in one of the extension ranges.
|
|
642
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool IsExtensionNumber(int number) const;
|
|
643
|
+
|
|
644
|
+
// Returns nullptr if no extension range contains the given number.
|
|
645
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const ExtensionRange*
|
|
646
|
+
FindExtensionRangeContainingNumber(int number) const;
|
|
647
|
+
|
|
648
|
+
// The number of extensions defined nested within this message type's scope.
|
|
649
|
+
// See doc:
|
|
650
|
+
// https://developers.google.com/protocol-buffers/docs/proto#nested-extensions
|
|
651
|
+
//
|
|
652
|
+
// Note that the extensions may be extending *other* messages.
|
|
653
|
+
//
|
|
654
|
+
// For example:
|
|
655
|
+
// message M1 {
|
|
656
|
+
// extensions 1 to max;
|
|
657
|
+
// }
|
|
658
|
+
//
|
|
659
|
+
// message M2 {
|
|
660
|
+
// extend M1 {
|
|
661
|
+
// optional int32 foo = 1;
|
|
662
|
+
// }
|
|
663
|
+
// }
|
|
664
|
+
//
|
|
665
|
+
// In this case,
|
|
666
|
+
// DescriptorPool::generated_pool()
|
|
667
|
+
// ->FindMessageTypeByName("M2")
|
|
668
|
+
// ->extension(0)
|
|
669
|
+
// will return "foo", even though "foo" is an extension of M1.
|
|
670
|
+
// To find all known extensions of a given message, instead use
|
|
671
|
+
// DescriptorPool::FindAllExtensions.
|
|
672
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int extension_count() const;
|
|
673
|
+
// Get an extension by index, where 0 <= index < extension_count().
|
|
674
|
+
// These are returned in the order they were defined in the .proto file.
|
|
675
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldDescriptor* extension(
|
|
676
|
+
int index) const;
|
|
677
|
+
|
|
678
|
+
// Looks up a named extension (which extends some *other* message type)
|
|
679
|
+
// defined within this message type's scope.
|
|
680
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldDescriptor*
|
|
681
|
+
FindExtensionByName(absl::string_view name) const;
|
|
682
|
+
|
|
683
|
+
// Similar to FindFieldByLowercaseName(), but finds extensions defined within
|
|
684
|
+
// this message type's scope.
|
|
685
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldDescriptor*
|
|
686
|
+
FindExtensionByLowercaseName(absl::string_view name) const;
|
|
687
|
+
|
|
688
|
+
// Similar to FindFieldByCamelcaseName(), but finds extensions defined within
|
|
689
|
+
// this message type's scope.
|
|
690
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldDescriptor*
|
|
691
|
+
FindExtensionByCamelcaseName(absl::string_view name) const;
|
|
692
|
+
|
|
693
|
+
// Reserved fields -------------------------------------------------
|
|
694
|
+
|
|
695
|
+
// A range of reserved field numbers.
|
|
696
|
+
struct PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED ReservedRange {
|
|
697
|
+
int start; // inclusive
|
|
698
|
+
int end; // exclusive
|
|
699
|
+
};
|
|
700
|
+
|
|
701
|
+
// The number of reserved ranges in this message type.
|
|
702
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int reserved_range_count() const;
|
|
703
|
+
// Gets an reserved range by index, where 0 <= index <
|
|
704
|
+
// reserved_range_count(). These are returned in the order they were defined
|
|
705
|
+
// in the .proto file.
|
|
706
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const ReservedRange* reserved_range(
|
|
707
|
+
int index) const;
|
|
708
|
+
|
|
709
|
+
// Returns true if the number is in one of the reserved ranges.
|
|
710
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool IsReservedNumber(int number) const;
|
|
711
|
+
|
|
712
|
+
// Returns nullptr if no reserved range contains the given number.
|
|
713
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const ReservedRange*
|
|
714
|
+
FindReservedRangeContainingNumber(int number) const;
|
|
715
|
+
|
|
716
|
+
// The number of reserved field names in this message type.
|
|
717
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int reserved_name_count() const;
|
|
718
|
+
|
|
719
|
+
// Gets a reserved name by index, where 0 <= index < reserved_name_count().
|
|
720
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view reserved_name(
|
|
721
|
+
int index) const;
|
|
722
|
+
|
|
723
|
+
// Returns true if the field name is reserved.
|
|
724
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool IsReservedName(
|
|
725
|
+
absl::string_view name) const;
|
|
726
|
+
|
|
727
|
+
// Source Location ---------------------------------------------------
|
|
728
|
+
|
|
729
|
+
// Updates |*out_location| to the source location of the complete
|
|
730
|
+
// extent of this message declaration. Returns false and leaves
|
|
731
|
+
// |*out_location| unchanged iff location information was not available.
|
|
732
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool GetSourceLocation(
|
|
733
|
+
SourceLocation* out_location) const;
|
|
734
|
+
|
|
735
|
+
// Maps --------------------------------------------------------------
|
|
736
|
+
|
|
737
|
+
// Returns the FieldDescriptor for the "key" field. If this isn't a map entry
|
|
738
|
+
// field, returns nullptr.
|
|
739
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldDescriptor* map_key() const;
|
|
740
|
+
|
|
741
|
+
// Returns the FieldDescriptor for the "value" field. If this isn't a map
|
|
742
|
+
// entry field, returns nullptr.
|
|
743
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldDescriptor* map_value() const;
|
|
744
|
+
|
|
745
|
+
private:
|
|
746
|
+
friend class Symbol;
|
|
747
|
+
typedef MessageOptions OptionsType;
|
|
748
|
+
|
|
749
|
+
// Allows tests to test CopyTo(proto, true).
|
|
750
|
+
friend class descriptor_unittest::DescriptorTest;
|
|
751
|
+
|
|
752
|
+
// Allows access to GetLocationPath for annotations.
|
|
753
|
+
friend class io::Printer;
|
|
754
|
+
friend class compiler::cpp::Formatter;
|
|
755
|
+
|
|
756
|
+
// Allows access to `fields_`.
|
|
757
|
+
friend class Reflection;
|
|
758
|
+
|
|
759
|
+
// Get the merged features that apply to this message type. These are
|
|
760
|
+
// specified in the .proto file through the feature options in the message
|
|
761
|
+
// definition. Allowed features are defined by Features in descriptor.proto,
|
|
762
|
+
// along with any backend-specific extensions to it.
|
|
763
|
+
const FeatureSet& features() const { return *merged_features_; }
|
|
764
|
+
friend class internal::InternalFeatureHelper;
|
|
765
|
+
|
|
766
|
+
// Fill the json_name field of FieldDescriptorProto.
|
|
767
|
+
void CopyJsonNameTo(DescriptorProto* proto) const;
|
|
768
|
+
|
|
769
|
+
// Internal version of DebugString; controls the level of indenting for
|
|
770
|
+
// correct depth. Takes |options| to control debug-string options, and
|
|
771
|
+
// |include_opening_clause| to indicate whether the "message ... " part of the
|
|
772
|
+
// clause has already been generated (this varies depending on context).
|
|
773
|
+
void DebugString(int depth, std::string* contents,
|
|
774
|
+
const DebugStringOptions& options,
|
|
775
|
+
bool include_opening_clause) const;
|
|
776
|
+
|
|
777
|
+
// Walks up the descriptor tree to generate the source location path
|
|
778
|
+
// to this descriptor from the file root.
|
|
779
|
+
void GetLocationPath(std::vector<int>* output) const;
|
|
780
|
+
|
|
781
|
+
// visibility declared on the message
|
|
782
|
+
SymbolVisibility visibility_keyword() const;
|
|
783
|
+
|
|
784
|
+
// True if this is a placeholder for an unknown type.
|
|
785
|
+
bool is_placeholder_ : 1;
|
|
786
|
+
// True if this is a placeholder and the type name wasn't fully-qualified.
|
|
787
|
+
bool is_unqualified_placeholder_ : 1;
|
|
788
|
+
// Well known type. Stored like this to conserve space.
|
|
789
|
+
uint8_t well_known_type_ : 5;
|
|
790
|
+
// bitfield representation of SymbolVisibility, which only requires 2 bits
|
|
791
|
+
uint8_t visibility_ : 2;
|
|
792
|
+
|
|
793
|
+
// This points to the last field _number_ that is part of the sequence
|
|
794
|
+
// starting at 1, where
|
|
795
|
+
// `desc->field(i)->number() == i + 1`
|
|
796
|
+
// A value of `0` means no field matches. That is, there are no fields or the
|
|
797
|
+
// first field is not field `1`.
|
|
798
|
+
// Uses 16-bit to avoid extra padding. Unlikely to have more than 2^16
|
|
799
|
+
// sequentially numbered fields in a message.
|
|
800
|
+
uint16_t sequential_field_limit_;
|
|
801
|
+
|
|
802
|
+
int field_count_;
|
|
803
|
+
|
|
804
|
+
internal::DescriptorNames all_names_;
|
|
805
|
+
const FileDescriptor* file_;
|
|
806
|
+
const Descriptor* containing_type_;
|
|
807
|
+
const MessageOptions* options_;
|
|
808
|
+
const FeatureSet* proto_features_;
|
|
809
|
+
const FeatureSet* merged_features_;
|
|
810
|
+
|
|
811
|
+
// These arrays are separated from their sizes to minimize padding on 64-bit.
|
|
812
|
+
FieldDescriptor* fields_;
|
|
813
|
+
OneofDescriptor* oneof_decls_;
|
|
814
|
+
Descriptor* nested_types_;
|
|
815
|
+
EnumDescriptor* enum_types_;
|
|
816
|
+
ExtensionRange* extension_ranges_;
|
|
817
|
+
FieldDescriptor* extensions_;
|
|
818
|
+
ReservedRange* reserved_ranges_;
|
|
819
|
+
const std::string** reserved_names_;
|
|
820
|
+
|
|
821
|
+
int oneof_decl_count_;
|
|
822
|
+
int real_oneof_decl_count_;
|
|
823
|
+
int nested_type_count_;
|
|
824
|
+
int enum_type_count_;
|
|
825
|
+
int extension_range_count_;
|
|
826
|
+
int extension_count_;
|
|
827
|
+
int reserved_range_count_;
|
|
828
|
+
int reserved_name_count_;
|
|
829
|
+
|
|
830
|
+
// IMPORTANT: If you add a new field, make sure to search for all instances
|
|
831
|
+
// of Allocate<Descriptor>() and AllocateArray<Descriptor>() in descriptor.cc
|
|
832
|
+
// and update them to initialize the field.
|
|
833
|
+
|
|
834
|
+
// Must be constructed using DescriptorPool.
|
|
835
|
+
Descriptor();
|
|
836
|
+
friend class DescriptorBuilder;
|
|
837
|
+
friend class DescriptorPool;
|
|
838
|
+
friend class EnumDescriptor;
|
|
839
|
+
friend class FieldDescriptor;
|
|
840
|
+
friend class FileDescriptorTables;
|
|
841
|
+
friend class OneofDescriptor;
|
|
842
|
+
friend class MethodDescriptor;
|
|
843
|
+
friend class FileDescriptor;
|
|
844
|
+
friend class SymbolChecker;
|
|
845
|
+
};
|
|
846
|
+
|
|
847
|
+
PROTOBUF_INTERNAL_CHECK_CLASS_SIZE(Descriptor, 160);
|
|
848
|
+
|
|
849
|
+
// Describes a single field of a message. To get the descriptor for a given
|
|
850
|
+
// field, first get the Descriptor for the message in which it is defined,
|
|
851
|
+
// then call Descriptor::FindFieldByName(). To get a FieldDescriptor for
|
|
852
|
+
// an extension, do one of the following:
|
|
853
|
+
// - Get the Descriptor or FileDescriptor for its containing scope, then
|
|
854
|
+
// call Descriptor::FindExtensionByName() or
|
|
855
|
+
// FileDescriptor::FindExtensionByName().
|
|
856
|
+
// - Given a DescriptorPool, call DescriptorPool::FindExtensionByNumber() or
|
|
857
|
+
// DescriptorPool::FindExtensionByPrintableName().
|
|
858
|
+
// Use DescriptorPool to construct your own descriptors.
|
|
859
|
+
class PROTOBUF_EXPORT FieldDescriptor : private internal::SymbolBase,
|
|
860
|
+
public internal::FieldDescriptorLite {
|
|
861
|
+
public:
|
|
862
|
+
typedef FieldDescriptorProto Proto;
|
|
863
|
+
|
|
864
|
+
#ifndef SWIG
|
|
865
|
+
FieldDescriptor(const FieldDescriptor&) = delete;
|
|
866
|
+
FieldDescriptor& operator=(const FieldDescriptor&) = delete;
|
|
867
|
+
#endif
|
|
868
|
+
|
|
869
|
+
// Identifies a field type. 0 is reserved for errors. The order is weird
|
|
870
|
+
// for historical reasons. Types 12 and up are new in proto2.
|
|
871
|
+
// Inherited from FieldDescriptorLite:
|
|
872
|
+
// enum Type {
|
|
873
|
+
// TYPE_DOUBLE = 1, // double, exactly eight bytes on the wire.
|
|
874
|
+
// TYPE_FLOAT = 2, // float, exactly four bytes on the wire.
|
|
875
|
+
// TYPE_INT64 = 3, // int64, varint on the wire. Negative numbers
|
|
876
|
+
// // take 10 bytes. Use TYPE_SINT64 if negative
|
|
877
|
+
// // values are likely.
|
|
878
|
+
// TYPE_UINT64 = 4, // uint64, varint on the wire.
|
|
879
|
+
// TYPE_INT32 = 5, // int32, varint on the wire. Negative numbers
|
|
880
|
+
// // take 10 bytes. Use TYPE_SINT32 if negative
|
|
881
|
+
// // values are likely.
|
|
882
|
+
// TYPE_FIXED64 = 6, // uint64, exactly eight bytes on the wire.
|
|
883
|
+
// TYPE_FIXED32 = 7, // uint32, exactly four bytes on the wire.
|
|
884
|
+
// TYPE_BOOL = 8, // bool, varint on the wire.
|
|
885
|
+
// TYPE_STRING = 9, // UTF-8 text.
|
|
886
|
+
// TYPE_GROUP = 10, // Tag-delimited message. Deprecated.
|
|
887
|
+
// TYPE_MESSAGE = 11, // Length-delimited message.
|
|
888
|
+
|
|
889
|
+
// TYPE_BYTES = 12, // Arbitrary byte array.
|
|
890
|
+
// TYPE_UINT32 = 13, // uint32, varint on the wire
|
|
891
|
+
// TYPE_ENUM = 14, // Enum, varint on the wire
|
|
892
|
+
// TYPE_SFIXED32 = 15, // int32, exactly four bytes on the wire
|
|
893
|
+
// TYPE_SFIXED64 = 16, // int64, exactly eight bytes on the wire
|
|
894
|
+
// TYPE_SINT32 = 17, // int32, ZigZag-encoded varint on the wire
|
|
895
|
+
// TYPE_SINT64 = 18, // int64, ZigZag-encoded varint on the wire
|
|
896
|
+
|
|
897
|
+
// MAX_TYPE = 18, // Constant useful for defining lookup tables
|
|
898
|
+
// // indexed by Type.
|
|
899
|
+
// };
|
|
900
|
+
|
|
901
|
+
// Specifies the C++ data type used to represent the field. There is a
|
|
902
|
+
// fixed mapping from Type to CppType where each Type maps to exactly one
|
|
903
|
+
// CppType. 0 is reserved for errors.
|
|
904
|
+
// Inherited from FieldDescriptorLite:
|
|
905
|
+
// enum CppType {
|
|
906
|
+
// CPPTYPE_INT32 = 1, // TYPE_INT32, TYPE_SINT32, TYPE_SFIXED32
|
|
907
|
+
// CPPTYPE_INT64 = 2, // TYPE_INT64, TYPE_SINT64, TYPE_SFIXED64
|
|
908
|
+
// CPPTYPE_UINT32 = 3, // TYPE_UINT32, TYPE_FIXED32
|
|
909
|
+
// CPPTYPE_UINT64 = 4, // TYPE_UINT64, TYPE_FIXED64
|
|
910
|
+
// CPPTYPE_DOUBLE = 5, // TYPE_DOUBLE
|
|
911
|
+
// CPPTYPE_FLOAT = 6, // TYPE_FLOAT
|
|
912
|
+
// CPPTYPE_BOOL = 7, // TYPE_BOOL
|
|
913
|
+
// CPPTYPE_ENUM = 8, // TYPE_ENUM
|
|
914
|
+
// CPPTYPE_STRING = 9, // TYPE_STRING, TYPE_BYTES
|
|
915
|
+
// CPPTYPE_MESSAGE = 10, // TYPE_MESSAGE, TYPE_GROUP
|
|
916
|
+
|
|
917
|
+
// MAX_CPPTYPE = 10, // Constant useful for defining lookup tables
|
|
918
|
+
// // indexed by CppType.
|
|
919
|
+
// };
|
|
920
|
+
|
|
921
|
+
// Identifies whether the field is optional, required, or repeated. 0 is
|
|
922
|
+
// reserved for errors.
|
|
923
|
+
// Inherited from FieldDescriptorLite:
|
|
924
|
+
// enum Label {
|
|
925
|
+
// LABEL_OPTIONAL = 1, // optional
|
|
926
|
+
// LABEL_REQUIRED = 2, // required
|
|
927
|
+
// LABEL_REPEATED = 3, // repeated
|
|
928
|
+
|
|
929
|
+
// MAX_LABEL = 3, // Constant useful for defining lookup tables
|
|
930
|
+
// // indexed by Label.
|
|
931
|
+
// };
|
|
932
|
+
|
|
933
|
+
// Valid field numbers are positive integers up to kMaxNumber.
|
|
934
|
+
static const int kMaxNumber = (1 << 29) - 1;
|
|
935
|
+
|
|
936
|
+
// First field number reserved for the protocol buffer library implementation.
|
|
937
|
+
// Users may not declare fields that use reserved numbers.
|
|
938
|
+
static const int kFirstReservedNumber = 19000;
|
|
939
|
+
// Last field number reserved for the protocol buffer library implementation.
|
|
940
|
+
// Users may not declare fields that use reserved numbers.
|
|
941
|
+
static const int kLastReservedNumber = 19999;
|
|
942
|
+
|
|
943
|
+
// Name of this field within the message.
|
|
944
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view name() const;
|
|
945
|
+
// Fully-qualified name of the field.
|
|
946
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view full_name() const;
|
|
947
|
+
// JSON name of this field.
|
|
948
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view json_name() const;
|
|
949
|
+
|
|
950
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FileDescriptor* file()
|
|
951
|
+
const; // File in which this field was defined.
|
|
952
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool is_extension()
|
|
953
|
+
const; // Is this an extension field?
|
|
954
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int number()
|
|
955
|
+
const; // Declared tag number.
|
|
956
|
+
|
|
957
|
+
// Same as name() except converted to lower-case. This (and especially the
|
|
958
|
+
// FindFieldByLowercaseName() method) can be useful when parsing formats
|
|
959
|
+
// which prefer to use lowercase naming style. (Although, technically
|
|
960
|
+
// field names should be lowercased anyway according to the protobuf style
|
|
961
|
+
// guide, so this only makes a difference when dealing with old .proto files
|
|
962
|
+
// which do not follow the guide.)
|
|
963
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view lowercase_name() const;
|
|
964
|
+
|
|
965
|
+
// Same as name() except converted to camel-case. In this conversion, any
|
|
966
|
+
// time an underscore appears in the name, it is removed and the next
|
|
967
|
+
// letter is capitalized. Furthermore, the first letter of the name is
|
|
968
|
+
// lower-cased. Examples:
|
|
969
|
+
// FooBar -> fooBar
|
|
970
|
+
// foo_bar -> fooBar
|
|
971
|
+
// fooBar -> fooBar
|
|
972
|
+
// This (and especially the FindFieldByCamelcaseName() method) can be useful
|
|
973
|
+
// when parsing formats which prefer to use camel-case naming style.
|
|
974
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view camelcase_name() const;
|
|
975
|
+
|
|
976
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD Type
|
|
977
|
+
type() const; // Declared type of this field.
|
|
978
|
+
// Name of the declared type.
|
|
979
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view type_name() const;
|
|
980
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD CppType
|
|
981
|
+
cpp_type() const; // C++ type of this field.
|
|
982
|
+
// Name of the C++ type.
|
|
983
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view cpp_type_name() const;
|
|
984
|
+
|
|
985
|
+
#ifndef SWIG
|
|
986
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD CppStringType
|
|
987
|
+
cpp_string_type() const; // The C++ string type of this field.
|
|
988
|
+
#endif
|
|
989
|
+
|
|
990
|
+
// Whether or not the field is required. For proto2 required fields and
|
|
991
|
+
// Editions LEGACY_REQUIRED fields.
|
|
992
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool is_required() const;
|
|
993
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool is_repeated()
|
|
994
|
+
const; // Whether or not the field is repeated/map field.
|
|
995
|
+
|
|
996
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool is_packable()
|
|
997
|
+
const; // shorthand for is_repeated() &&
|
|
998
|
+
// IsTypePackable(type())
|
|
999
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool is_map()
|
|
1000
|
+
const; // shorthand for type() == TYPE_MESSAGE &&
|
|
1001
|
+
// message_type()->options().map_entry()
|
|
1002
|
+
|
|
1003
|
+
// Whether or not this field is packable and packed. In proto2, packable
|
|
1004
|
+
// fields must have `packed = true` specified. In proto3, all packable fields
|
|
1005
|
+
// are packed by default unless `packed = false` is specified.
|
|
1006
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool is_packed() const;
|
|
1007
|
+
|
|
1008
|
+
// Returns true if this field tracks presence, ie. does the field
|
|
1009
|
+
// distinguish between "unset" and "present with default value."
|
|
1010
|
+
// This includes required, optional, and oneof fields. It excludes maps,
|
|
1011
|
+
// repeated fields, and singular proto3 fields without "optional".
|
|
1012
|
+
//
|
|
1013
|
+
// For fields where has_presence() == true, the return value of
|
|
1014
|
+
// Reflection::HasField() is semantically meaningful.
|
|
1015
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool has_presence() const;
|
|
1016
|
+
|
|
1017
|
+
// Returns true if this TYPE_STRING-typed field requires UTF-8 validation on
|
|
1018
|
+
// parse.
|
|
1019
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool requires_utf8_validation() const;
|
|
1020
|
+
|
|
1021
|
+
// Determines if the given enum field is treated as closed based on legacy
|
|
1022
|
+
// non-conformant behavior.
|
|
1023
|
+
//
|
|
1024
|
+
// Conformant behavior determines closedness based on the enum and
|
|
1025
|
+
// can be queried using EnumDescriptor::is_closed().
|
|
1026
|
+
//
|
|
1027
|
+
// Some runtimes currently have a quirk where non-closed enums are
|
|
1028
|
+
// treated as closed when used as the type of fields defined in a
|
|
1029
|
+
// `syntax = proto2;` file. This quirk is not present in all runtimes; as of
|
|
1030
|
+
// writing, we know that:
|
|
1031
|
+
//
|
|
1032
|
+
// - C++, Java, and C++-based Python share this quirk.
|
|
1033
|
+
// - UPB and UPB-based Python do not.
|
|
1034
|
+
// - PHP and Ruby treat all enums as open regardless of declaration.
|
|
1035
|
+
//
|
|
1036
|
+
// Care should be taken when using this function to respect the target
|
|
1037
|
+
// runtime's enum handling quirks.
|
|
1038
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool legacy_enum_field_treated_as_closed()
|
|
1039
|
+
const;
|
|
1040
|
+
|
|
1041
|
+
// Index of this field within the message's field array, or the file or
|
|
1042
|
+
// extension scope's extensions array.
|
|
1043
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int index() const;
|
|
1044
|
+
|
|
1045
|
+
// Does this field have an explicitly-declared default value?
|
|
1046
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool has_default_value() const;
|
|
1047
|
+
|
|
1048
|
+
// Whether the user has specified the json_name field option in the .proto
|
|
1049
|
+
// file.
|
|
1050
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool has_json_name() const;
|
|
1051
|
+
|
|
1052
|
+
// Get the field default value if cpp_type() == CPPTYPE_INT32. If no
|
|
1053
|
+
// explicit default was defined, the default is 0.
|
|
1054
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int32_t default_value_int32_t() const;
|
|
1055
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int32_t default_value_int32() const {
|
|
1056
|
+
return default_value_int32_t();
|
|
1057
|
+
}
|
|
1058
|
+
// Get the field default value if cpp_type() == CPPTYPE_INT64. If no
|
|
1059
|
+
// explicit default was defined, the default is 0.
|
|
1060
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int64_t default_value_int64_t() const;
|
|
1061
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int64_t default_value_int64() const {
|
|
1062
|
+
return default_value_int64_t();
|
|
1063
|
+
}
|
|
1064
|
+
// Get the field default value if cpp_type() == CPPTYPE_UINT32. If no
|
|
1065
|
+
// explicit default was defined, the default is 0.
|
|
1066
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD uint32_t default_value_uint32_t() const;
|
|
1067
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD uint32_t default_value_uint32() const {
|
|
1068
|
+
return default_value_uint32_t();
|
|
1069
|
+
}
|
|
1070
|
+
// Get the field default value if cpp_type() == CPPTYPE_UINT64. If no
|
|
1071
|
+
// explicit default was defined, the default is 0.
|
|
1072
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD uint64_t default_value_uint64_t() const;
|
|
1073
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD uint64_t default_value_uint64() const {
|
|
1074
|
+
return default_value_uint64_t();
|
|
1075
|
+
}
|
|
1076
|
+
// Get the field default value if cpp_type() == CPPTYPE_FLOAT. If no
|
|
1077
|
+
// explicit default was defined, the default is 0.0.
|
|
1078
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD float default_value_float() const;
|
|
1079
|
+
// Get the field default value if cpp_type() == CPPTYPE_DOUBLE. If no
|
|
1080
|
+
// explicit default was defined, the default is 0.0.
|
|
1081
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD double default_value_double() const;
|
|
1082
|
+
// Get the field default value if cpp_type() == CPPTYPE_BOOL. If no
|
|
1083
|
+
// explicit default was defined, the default is false.
|
|
1084
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool default_value_bool() const;
|
|
1085
|
+
// Get the field default value if cpp_type() == CPPTYPE_ENUM. If no
|
|
1086
|
+
// explicit default was defined, the default is the first value defined
|
|
1087
|
+
// in the enum type (all enum types are required to have at least one value).
|
|
1088
|
+
// This never returns nullptr.
|
|
1089
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const EnumValueDescriptor*
|
|
1090
|
+
default_value_enum() const;
|
|
1091
|
+
// Get the field default value if cpp_type() == CPPTYPE_STRING. If no
|
|
1092
|
+
// explicit default was defined, the default is the empty string.
|
|
1093
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view default_value_string()
|
|
1094
|
+
const;
|
|
1095
|
+
|
|
1096
|
+
// The Descriptor for the message of which this is a field. For extensions,
|
|
1097
|
+
// this is the extended type. Never nullptr.
|
|
1098
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const Descriptor* containing_type() const;
|
|
1099
|
+
|
|
1100
|
+
// If the field is a member of a oneof, this is the one, otherwise this is
|
|
1101
|
+
// nullptr.
|
|
1102
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const OneofDescriptor* containing_oneof()
|
|
1103
|
+
const;
|
|
1104
|
+
|
|
1105
|
+
// If the field is a member of a non-synthetic oneof, returns the descriptor
|
|
1106
|
+
// for the oneof, otherwise returns nullptr.
|
|
1107
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const OneofDescriptor*
|
|
1108
|
+
real_containing_oneof() const;
|
|
1109
|
+
|
|
1110
|
+
// If the field is a member of a oneof, returns the index in that oneof.
|
|
1111
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int index_in_oneof() const;
|
|
1112
|
+
|
|
1113
|
+
// An extension may be declared within the scope of another message. If this
|
|
1114
|
+
// field is an extension (is_extension() is true), then extension_scope()
|
|
1115
|
+
// returns that message, or nullptr if the extension was declared at global
|
|
1116
|
+
// scope. If this is not an extension, extension_scope() is undefined (may
|
|
1117
|
+
// assert-fail).
|
|
1118
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const Descriptor* extension_scope() const;
|
|
1119
|
+
|
|
1120
|
+
// If type is TYPE_MESSAGE or TYPE_GROUP, returns a descriptor for the
|
|
1121
|
+
// message or the group type. Otherwise, returns null.
|
|
1122
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const Descriptor* message_type() const;
|
|
1123
|
+
// If type is TYPE_ENUM, returns a descriptor for the enum. Otherwise,
|
|
1124
|
+
// returns null.
|
|
1125
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const EnumDescriptor* enum_type() const;
|
|
1126
|
+
|
|
1127
|
+
// Get the FieldOptions for this field. This includes things listed in
|
|
1128
|
+
// square brackets after the field definition. E.g., the field:
|
|
1129
|
+
// optional string text = 1 [ctype=CORD];
|
|
1130
|
+
// has the "ctype" option set. Allowed options are defined by FieldOptions in
|
|
1131
|
+
// descriptor.proto, and any available extensions of that message.
|
|
1132
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldOptions& options() const;
|
|
1133
|
+
|
|
1134
|
+
// See Descriptor::CopyTo().
|
|
1135
|
+
void CopyTo(FieldDescriptorProto* proto) const;
|
|
1136
|
+
|
|
1137
|
+
// See Descriptor::DebugString().
|
|
1138
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD std::string DebugString() const;
|
|
1139
|
+
|
|
1140
|
+
// See Descriptor::DebugStringWithOptions().
|
|
1141
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD std::string DebugStringWithOptions(
|
|
1142
|
+
const DebugStringOptions& options) const;
|
|
1143
|
+
|
|
1144
|
+
// Allows formatting with absl and gtest.
|
|
1145
|
+
template <typename Sink>
|
|
1146
|
+
friend void AbslStringify(Sink& sink, const FieldDescriptor& d) {
|
|
1147
|
+
absl::Format(&sink, "%s", d.DebugString());
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
// Helper method to get the CppType for a particular Type.
|
|
1151
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD static CppType TypeToCppType(Type type);
|
|
1152
|
+
|
|
1153
|
+
// Helper method to get the name of a Type.
|
|
1154
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD static absl::string_view TypeName(
|
|
1155
|
+
Type type);
|
|
1156
|
+
|
|
1157
|
+
// Helper method to get the name of a CppType.
|
|
1158
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD static absl::string_view CppTypeName(
|
|
1159
|
+
CppType cpp_type);
|
|
1160
|
+
|
|
1161
|
+
// Return true iff [packed = true] is valid for fields of this type.
|
|
1162
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD static inline bool IsTypePackable(
|
|
1163
|
+
Type field_type);
|
|
1164
|
+
|
|
1165
|
+
// Returns full_name() except if the field is a MessageSet extension,
|
|
1166
|
+
// in which case it returns the full_name() of the containing message type
|
|
1167
|
+
// for backwards compatibility with proto1.
|
|
1168
|
+
//
|
|
1169
|
+
// A MessageSet extension is defined as an optional message extension
|
|
1170
|
+
// whose containing type has the message_set_wire_format option set.
|
|
1171
|
+
// This should be true of extensions of google.protobuf.bridge.MessageSet;
|
|
1172
|
+
// by convention, such extensions are named "message_set_extension".
|
|
1173
|
+
//
|
|
1174
|
+
// The opposite operation (looking up an extension's FieldDescriptor given
|
|
1175
|
+
// its printable name) can be accomplished with
|
|
1176
|
+
// message->file()->pool()->FindExtensionByPrintableName(message, name)
|
|
1177
|
+
// where the extension extends "message".
|
|
1178
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view
|
|
1179
|
+
PrintableNameForExtension() const;
|
|
1180
|
+
|
|
1181
|
+
// Source Location ---------------------------------------------------
|
|
1182
|
+
|
|
1183
|
+
// Updates |*out_location| to the source location of the complete
|
|
1184
|
+
// extent of this field declaration. Returns false and leaves
|
|
1185
|
+
// |*out_location| unchanged iff location information was not available.
|
|
1186
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool GetSourceLocation(
|
|
1187
|
+
SourceLocation* out_location) const;
|
|
1188
|
+
|
|
1189
|
+
private:
|
|
1190
|
+
friend class Symbol;
|
|
1191
|
+
typedef FieldOptions OptionsType;
|
|
1192
|
+
|
|
1193
|
+
// For access to CalculateCppRepeatedType.
|
|
1194
|
+
//
|
|
1195
|
+
// TODO - Remove this friend declaration if we make
|
|
1196
|
+
// `CppRepeatedType` public.
|
|
1197
|
+
friend class descriptor_unittest::FeaturesTest;
|
|
1198
|
+
|
|
1199
|
+
// Allows access to GetLocationPath for annotations.
|
|
1200
|
+
friend class io::Printer;
|
|
1201
|
+
friend class compiler::cpp::Formatter;
|
|
1202
|
+
#ifndef SWIG
|
|
1203
|
+
friend FieldDescriptor::CppRepeatedType
|
|
1204
|
+
compiler::cpp::CalculateFieldDescriptorRepeatedType(
|
|
1205
|
+
const FieldDescriptor* field);
|
|
1206
|
+
#endif // !SWIG
|
|
1207
|
+
friend class Reflection;
|
|
1208
|
+
friend class FieldDescriptorLegacy;
|
|
1209
|
+
friend const std::string& internal::DefaultValueStringAsString(
|
|
1210
|
+
const FieldDescriptor* field);
|
|
1211
|
+
|
|
1212
|
+
// Returns the original ctype specified in the .proto file. This should not
|
|
1213
|
+
// be relied on, as it no longer uniquely determines behavior. The
|
|
1214
|
+
// cpp_string_type() method should be used instead, which takes feature
|
|
1215
|
+
// settings into account. Needed by CppGenerator for validation only.
|
|
1216
|
+
friend class compiler::cpp::CppGenerator;
|
|
1217
|
+
int legacy_proto_ctype() const { return legacy_proto_ctype_; }
|
|
1218
|
+
bool has_legacy_proto_ctype() const;
|
|
1219
|
+
|
|
1220
|
+
// Get the merged features that apply to this field. These are specified in
|
|
1221
|
+
// the .proto file through the feature options in the message definition.
|
|
1222
|
+
// Allowed features are defined by Features in descriptor.proto, along with
|
|
1223
|
+
// any backend-specific extensions to it.
|
|
1224
|
+
const FeatureSet& features() const { return *merged_features_; }
|
|
1225
|
+
friend class internal::InternalFeatureHelper;
|
|
1226
|
+
|
|
1227
|
+
// Fill the json_name field of FieldDescriptorProto.
|
|
1228
|
+
void CopyJsonNameTo(FieldDescriptorProto* proto) const;
|
|
1229
|
+
|
|
1230
|
+
// See Descriptor::DebugString().
|
|
1231
|
+
void DebugString(int depth, std::string* contents,
|
|
1232
|
+
const DebugStringOptions& options) const;
|
|
1233
|
+
|
|
1234
|
+
// formats the default value appropriately and returns it as a string.
|
|
1235
|
+
// Must have a default value to call this. If quote_string_type is true, then
|
|
1236
|
+
// types of CPPTYPE_STRING will be surrounded by quotes and CEscaped.
|
|
1237
|
+
std::string DefaultValueAsString(bool quote_string_type) const;
|
|
1238
|
+
|
|
1239
|
+
// Helper function that returns the field type name for DebugString.
|
|
1240
|
+
std::string FieldTypeNameDebugString() const;
|
|
1241
|
+
|
|
1242
|
+
// Walks up the descriptor tree to generate the source location path
|
|
1243
|
+
// to this descriptor from the file root.
|
|
1244
|
+
void GetLocationPath(std::vector<int>* output) const;
|
|
1245
|
+
|
|
1246
|
+
// Returns true if this is a map message type.
|
|
1247
|
+
bool is_map_message_type() const;
|
|
1248
|
+
|
|
1249
|
+
CppStringType CalculateCppStringType() const;
|
|
1250
|
+
|
|
1251
|
+
CppRepeatedType CalculateCppRepeatedType() const;
|
|
1252
|
+
|
|
1253
|
+
bool has_default_value_ : 1;
|
|
1254
|
+
bool proto3_optional_ : 1;
|
|
1255
|
+
// Whether the user has specified the json_name field option in the .proto
|
|
1256
|
+
// file.
|
|
1257
|
+
bool has_json_name_ : 1;
|
|
1258
|
+
bool is_extension_ : 1;
|
|
1259
|
+
bool is_oneof_ : 1;
|
|
1260
|
+
bool is_repeated_ : 1; // Redundant with label_, but it is queried a lot.
|
|
1261
|
+
|
|
1262
|
+
// Actually a `Label` but stored as uint8_t to save space.
|
|
1263
|
+
uint8_t label_ : 2;
|
|
1264
|
+
|
|
1265
|
+
// Actually a `Type`, but stored as uint8_t to save space.
|
|
1266
|
+
uint8_t type_;
|
|
1267
|
+
|
|
1268
|
+
// Actually a `CppStringType`, but stored as uint8_t to save space.
|
|
1269
|
+
// We cache it because it's expensive to calculate.
|
|
1270
|
+
uint8_t cpp_string_type_ : 3;
|
|
1271
|
+
|
|
1272
|
+
// Can be calculated from containing_oneof(), but we cache it for performance.
|
|
1273
|
+
// Located here for bitpacking.
|
|
1274
|
+
bool in_real_oneof_ : 1;
|
|
1275
|
+
|
|
1276
|
+
// We could calculate as `message_type()->options().map_entry()`, but that is
|
|
1277
|
+
// way more expensive and can potentially force load extra lazy files.
|
|
1278
|
+
bool is_map_ : 1;
|
|
1279
|
+
|
|
1280
|
+
// Actually an optional `CType`, but stored as uint8_t to save space. This
|
|
1281
|
+
// contains the original ctype option specified in the .proto file.
|
|
1282
|
+
uint8_t legacy_proto_ctype_ : 2;
|
|
1283
|
+
|
|
1284
|
+
// Sadly, `number_` located here to reduce padding. Unrelated to all_names_
|
|
1285
|
+
// and its indices above.
|
|
1286
|
+
int number_;
|
|
1287
|
+
internal::DescriptorNames all_names_;
|
|
1288
|
+
const FileDescriptor* file_;
|
|
1289
|
+
|
|
1290
|
+
// The once_flag is followed by a NUL terminated string for the type name and
|
|
1291
|
+
// enum default value (or empty string if no default enum).
|
|
1292
|
+
absl::once_flag* type_once_;
|
|
1293
|
+
static void TypeOnceInit(const FieldDescriptor* to_init);
|
|
1294
|
+
void InternalTypeOnceInit() const;
|
|
1295
|
+
const Descriptor* containing_type_;
|
|
1296
|
+
union {
|
|
1297
|
+
const OneofDescriptor* containing_oneof;
|
|
1298
|
+
const Descriptor* extension_scope;
|
|
1299
|
+
} scope_;
|
|
1300
|
+
union {
|
|
1301
|
+
mutable const Descriptor* message_type;
|
|
1302
|
+
mutable const EnumDescriptor* enum_type;
|
|
1303
|
+
} type_descriptor_;
|
|
1304
|
+
const FieldOptions* options_;
|
|
1305
|
+
const FeatureSet* proto_features_;
|
|
1306
|
+
const FeatureSet* merged_features_;
|
|
1307
|
+
// IMPORTANT: If you add a new field, make sure to search for all instances
|
|
1308
|
+
// of Allocate<FieldDescriptor>() and AllocateArray<FieldDescriptor>() in
|
|
1309
|
+
// descriptor.cc and update them to initialize the field.
|
|
1310
|
+
|
|
1311
|
+
union {
|
|
1312
|
+
int32_t default_value_int32_t_;
|
|
1313
|
+
int64_t default_value_int64_t_;
|
|
1314
|
+
uint32_t default_value_uint32_t_;
|
|
1315
|
+
uint64_t default_value_uint64_t_;
|
|
1316
|
+
float default_value_float_;
|
|
1317
|
+
double default_value_double_;
|
|
1318
|
+
bool default_value_bool_;
|
|
1319
|
+
|
|
1320
|
+
mutable const EnumValueDescriptor* default_value_enum_;
|
|
1321
|
+
const std::string* default_value_string_;
|
|
1322
|
+
mutable std::atomic<const Message*> default_generated_instance_;
|
|
1323
|
+
};
|
|
1324
|
+
|
|
1325
|
+
static const CppType kTypeToCppTypeMap[MAX_TYPE + 1];
|
|
1326
|
+
|
|
1327
|
+
static const char* const kTypeToName[MAX_TYPE + 1];
|
|
1328
|
+
|
|
1329
|
+
static const char* const kCppTypeToName[MAX_CPPTYPE + 1];
|
|
1330
|
+
|
|
1331
|
+
static const char* const kLabelToName[MAX_LABEL + 1];
|
|
1332
|
+
|
|
1333
|
+
// Must be constructed using DescriptorPool.
|
|
1334
|
+
FieldDescriptor();
|
|
1335
|
+
friend class DescriptorBuilder;
|
|
1336
|
+
friend class FileDescriptor;
|
|
1337
|
+
friend class Descriptor;
|
|
1338
|
+
friend class OneofDescriptor;
|
|
1339
|
+
};
|
|
1340
|
+
|
|
1341
|
+
PROTOBUF_INTERNAL_CHECK_CLASS_SIZE(FieldDescriptor, 88);
|
|
1342
|
+
|
|
1343
|
+
// Describes a oneof defined in a message type.
|
|
1344
|
+
class PROTOBUF_EXPORT OneofDescriptor : private internal::SymbolBase {
|
|
1345
|
+
public:
|
|
1346
|
+
typedef OneofDescriptorProto Proto;
|
|
1347
|
+
|
|
1348
|
+
#ifndef SWIG
|
|
1349
|
+
OneofDescriptor(const OneofDescriptor&) = delete;
|
|
1350
|
+
OneofDescriptor& operator=(const OneofDescriptor&) = delete;
|
|
1351
|
+
#endif
|
|
1352
|
+
|
|
1353
|
+
// Name of this oneof.
|
|
1354
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view name() const;
|
|
1355
|
+
// Fully-qualified name of the oneof.
|
|
1356
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view full_name() const;
|
|
1357
|
+
|
|
1358
|
+
// Index of this oneof within the message's oneof array.
|
|
1359
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int index() const;
|
|
1360
|
+
|
|
1361
|
+
// The .proto file in which this oneof was defined. Never nullptr.
|
|
1362
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FileDescriptor* file() const;
|
|
1363
|
+
// The Descriptor for the message containing this oneof.
|
|
1364
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const Descriptor* containing_type() const;
|
|
1365
|
+
|
|
1366
|
+
// The number of (non-extension) fields which are members of this oneof.
|
|
1367
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int field_count() const;
|
|
1368
|
+
// Get a member of this oneof, in the order in which they were declared in the
|
|
1369
|
+
// .proto file. Does not include extensions.
|
|
1370
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldDescriptor* field(
|
|
1371
|
+
int index) const;
|
|
1372
|
+
|
|
1373
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const OneofOptions& options() const;
|
|
1374
|
+
|
|
1375
|
+
// See Descriptor::CopyTo().
|
|
1376
|
+
void CopyTo(OneofDescriptorProto* proto) const;
|
|
1377
|
+
|
|
1378
|
+
// See Descriptor::DebugString().
|
|
1379
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD std::string DebugString() const;
|
|
1380
|
+
|
|
1381
|
+
// See Descriptor::DebugStringWithOptions().
|
|
1382
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD std::string DebugStringWithOptions(
|
|
1383
|
+
const DebugStringOptions& options) const;
|
|
1384
|
+
|
|
1385
|
+
// Allows formatting with absl and gtest.
|
|
1386
|
+
template <typename Sink>
|
|
1387
|
+
friend void AbslStringify(Sink& sink, const OneofDescriptor& d) {
|
|
1388
|
+
absl::Format(&sink, "%s", d.DebugString());
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
// Source Location ---------------------------------------------------
|
|
1392
|
+
|
|
1393
|
+
// Updates |*out_location| to the source location of the complete
|
|
1394
|
+
// extent of this oneof declaration. Returns false and leaves
|
|
1395
|
+
// |*out_location| unchanged iff location information was not available.
|
|
1396
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool GetSourceLocation(
|
|
1397
|
+
SourceLocation* out_location) const;
|
|
1398
|
+
|
|
1399
|
+
private:
|
|
1400
|
+
friend class Symbol;
|
|
1401
|
+
typedef OneofOptions OptionsType;
|
|
1402
|
+
|
|
1403
|
+
// Allows access to GetLocationPath for annotations.
|
|
1404
|
+
friend class io::Printer;
|
|
1405
|
+
friend class compiler::cpp::Formatter;
|
|
1406
|
+
friend class OneofDescriptorLegacy;
|
|
1407
|
+
|
|
1408
|
+
// Returns whether this oneof was inserted by the compiler to wrap a proto3
|
|
1409
|
+
// optional field. If this returns true, code generators should *not* emit it.
|
|
1410
|
+
bool is_synthetic() const;
|
|
1411
|
+
|
|
1412
|
+
// Get the merged features that apply to this oneof. These are specified in
|
|
1413
|
+
// the .proto file through the feature options in the oneof definition.
|
|
1414
|
+
// Allowed features are defined by Features in descriptor.proto, along with
|
|
1415
|
+
// any backend-specific extensions to it.
|
|
1416
|
+
const FeatureSet& features() const { return *merged_features_; }
|
|
1417
|
+
friend class internal::InternalFeatureHelper;
|
|
1418
|
+
|
|
1419
|
+
// See Descriptor::DebugString().
|
|
1420
|
+
void DebugString(int depth, std::string* contents,
|
|
1421
|
+
const DebugStringOptions& options) const;
|
|
1422
|
+
|
|
1423
|
+
// Walks up the descriptor tree to generate the source location path
|
|
1424
|
+
// to this descriptor from the file root.
|
|
1425
|
+
void GetLocationPath(std::vector<int>* output) const;
|
|
1426
|
+
|
|
1427
|
+
int field_count_;
|
|
1428
|
+
|
|
1429
|
+
internal::DescriptorNames all_names_;
|
|
1430
|
+
const Descriptor* containing_type_;
|
|
1431
|
+
const OneofOptions* options_;
|
|
1432
|
+
const FeatureSet* proto_features_;
|
|
1433
|
+
const FeatureSet* merged_features_;
|
|
1434
|
+
const FieldDescriptor* fields_;
|
|
1435
|
+
|
|
1436
|
+
// IMPORTANT: If you add a new field, make sure to search for all instances
|
|
1437
|
+
// of Allocate<OneofDescriptor>() and AllocateArray<OneofDescriptor>()
|
|
1438
|
+
// in descriptor.cc and update them to initialize the field.
|
|
1439
|
+
|
|
1440
|
+
// Must be constructed using DescriptorPool.
|
|
1441
|
+
OneofDescriptor();
|
|
1442
|
+
friend class DescriptorBuilder;
|
|
1443
|
+
friend class Descriptor;
|
|
1444
|
+
friend class FieldDescriptor;
|
|
1445
|
+
friend class Reflection;
|
|
1446
|
+
};
|
|
1447
|
+
|
|
1448
|
+
PROTOBUF_INTERNAL_CHECK_CLASS_SIZE(OneofDescriptor, 56);
|
|
1449
|
+
|
|
1450
|
+
// Describes an enum type defined in a .proto file. To get the EnumDescriptor
|
|
1451
|
+
// for a generated enum type, call TypeName_descriptor(). Use DescriptorPool
|
|
1452
|
+
// to construct your own descriptors.
|
|
1453
|
+
class PROTOBUF_EXPORT EnumDescriptor : private internal::SymbolBase {
|
|
1454
|
+
public:
|
|
1455
|
+
typedef EnumDescriptorProto Proto;
|
|
1456
|
+
|
|
1457
|
+
#ifndef SWIG
|
|
1458
|
+
EnumDescriptor(const EnumDescriptor&) = delete;
|
|
1459
|
+
EnumDescriptor& operator=(const EnumDescriptor&) = delete;
|
|
1460
|
+
#endif
|
|
1461
|
+
|
|
1462
|
+
// The name of this enum type in the containing scope.
|
|
1463
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view name() const;
|
|
1464
|
+
|
|
1465
|
+
// The fully-qualified name of the enum type, scope delimited by periods.
|
|
1466
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view full_name() const;
|
|
1467
|
+
|
|
1468
|
+
// Index of this enum within the file or containing message's enum array.
|
|
1469
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int index() const;
|
|
1470
|
+
|
|
1471
|
+
// The .proto file in which this enum type was defined. Never nullptr.
|
|
1472
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FileDescriptor* file() const;
|
|
1473
|
+
|
|
1474
|
+
// The number of values for this EnumDescriptor. Guaranteed to be greater
|
|
1475
|
+
// than zero.
|
|
1476
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int value_count() const;
|
|
1477
|
+
// Gets a value by index, where 0 <= index < value_count().
|
|
1478
|
+
// These are returned in the order they were defined in the .proto file, not
|
|
1479
|
+
// the enum value order. (Use `FindValueByNumber()` for enum -> value lookup).
|
|
1480
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const EnumValueDescriptor* value(
|
|
1481
|
+
int index) const;
|
|
1482
|
+
|
|
1483
|
+
// Looks up a value by name. Returns nullptr if no such value exists.
|
|
1484
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const EnumValueDescriptor*
|
|
1485
|
+
FindValueByName(absl::string_view name) const;
|
|
1486
|
+
// Looks up a value by number. Returns nullptr if no such value exists. If
|
|
1487
|
+
// multiple values have this number, the first one defined is returned.
|
|
1488
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const EnumValueDescriptor*
|
|
1489
|
+
FindValueByNumber(int number) const;
|
|
1490
|
+
|
|
1491
|
+
// If this enum type is nested in a message type, this is that message type.
|
|
1492
|
+
// Otherwise, nullptr.
|
|
1493
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const Descriptor* containing_type() const;
|
|
1494
|
+
|
|
1495
|
+
// Get options for this enum type. These are specified in the .proto file by
|
|
1496
|
+
// placing lines like "option foo = 1234;" in the enum definition. Allowed
|
|
1497
|
+
// options are defined by EnumOptions in descriptor.proto, and any available
|
|
1498
|
+
// extensions of that message.
|
|
1499
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const EnumOptions& options() const;
|
|
1500
|
+
|
|
1501
|
+
// See Descriptor::CopyTo().
|
|
1502
|
+
void CopyTo(EnumDescriptorProto* proto) const;
|
|
1503
|
+
|
|
1504
|
+
// See Descriptor::DebugString().
|
|
1505
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD std::string DebugString() const;
|
|
1506
|
+
|
|
1507
|
+
// See Descriptor::DebugStringWithOptions().
|
|
1508
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD std::string DebugStringWithOptions(
|
|
1509
|
+
const DebugStringOptions& options) const;
|
|
1510
|
+
|
|
1511
|
+
// Allows formatting with absl and gtest.
|
|
1512
|
+
template <typename Sink>
|
|
1513
|
+
friend void AbslStringify(Sink& sink, const EnumDescriptor& d) {
|
|
1514
|
+
absl::Format(&sink, "%s", d.DebugString());
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
// Returns true if this is a placeholder for an unknown enum. This will
|
|
1518
|
+
// only be the case if this descriptor comes from a DescriptorPool
|
|
1519
|
+
// with AllowUnknownDependencies() set.
|
|
1520
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool is_placeholder() const;
|
|
1521
|
+
|
|
1522
|
+
// Returns true whether this is a "closed" enum, meaning that it:
|
|
1523
|
+
// - Has a fixed set of values, rather than being equivalent to an int32.
|
|
1524
|
+
// - Encountering values not in this set causes them to be treated as unknown
|
|
1525
|
+
// fields.
|
|
1526
|
+
// - The first value (i.e., the default) may be nonzero.
|
|
1527
|
+
//
|
|
1528
|
+
// WARNING: Some runtimes currently have a quirk where non-closed enums are
|
|
1529
|
+
// treated as closed when used as the type of fields defined in a
|
|
1530
|
+
// `syntax = proto2;` file. This quirk is not present in all runtimes; as of
|
|
1531
|
+
// writing, we know that:
|
|
1532
|
+
//
|
|
1533
|
+
// - C++, Java, and C++-based Python share this quirk.
|
|
1534
|
+
// - UPB and UPB-based Python do not.
|
|
1535
|
+
// - PHP and Ruby treat all enums as open regardless of declaration.
|
|
1536
|
+
//
|
|
1537
|
+
// Care should be taken when using this function to respect the target
|
|
1538
|
+
// runtime's enum handling quirks.
|
|
1539
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool is_closed() const;
|
|
1540
|
+
|
|
1541
|
+
// Reserved fields -------------------------------------------------
|
|
1542
|
+
|
|
1543
|
+
// A range of reserved field numbers.
|
|
1544
|
+
struct PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED ReservedRange {
|
|
1545
|
+
int start; // inclusive
|
|
1546
|
+
int end; // inclusive
|
|
1547
|
+
};
|
|
1548
|
+
|
|
1549
|
+
// The number of reserved ranges in this message type.
|
|
1550
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int reserved_range_count() const;
|
|
1551
|
+
// Gets an reserved range by index, where 0 <= index <
|
|
1552
|
+
// reserved_range_count(). These are returned in the order they were defined
|
|
1553
|
+
// in the .proto file.
|
|
1554
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const EnumDescriptor::ReservedRange*
|
|
1555
|
+
reserved_range(int index) const;
|
|
1556
|
+
|
|
1557
|
+
// Returns true if the number is in one of the reserved ranges.
|
|
1558
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool IsReservedNumber(int number) const;
|
|
1559
|
+
|
|
1560
|
+
// Returns nullptr if no reserved range contains the given number.
|
|
1561
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const EnumDescriptor::ReservedRange*
|
|
1562
|
+
FindReservedRangeContainingNumber(int number) const;
|
|
1563
|
+
|
|
1564
|
+
// The number of reserved field names in this message type.
|
|
1565
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int reserved_name_count() const;
|
|
1566
|
+
|
|
1567
|
+
// Gets a reserved name by index, where 0 <= index < reserved_name_count().
|
|
1568
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view reserved_name(
|
|
1569
|
+
int index) const;
|
|
1570
|
+
|
|
1571
|
+
// Returns true if the field name is reserved.
|
|
1572
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool IsReservedName(
|
|
1573
|
+
absl::string_view name) const;
|
|
1574
|
+
|
|
1575
|
+
// Source Location ---------------------------------------------------
|
|
1576
|
+
|
|
1577
|
+
// Updates |*out_location| to the source location of the complete
|
|
1578
|
+
// extent of this enum declaration. Returns false and leaves
|
|
1579
|
+
// |*out_location| unchanged iff location information was not available.
|
|
1580
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool GetSourceLocation(
|
|
1581
|
+
SourceLocation* out_location) const;
|
|
1582
|
+
|
|
1583
|
+
private:
|
|
1584
|
+
friend class Symbol;
|
|
1585
|
+
friend bool internal::IsEnumFullySequential(const EnumDescriptor* enum_desc);
|
|
1586
|
+
friend class SymbolChecker;
|
|
1587
|
+
typedef EnumOptions OptionsType;
|
|
1588
|
+
|
|
1589
|
+
// Allows access to GetLocationPath for annotations.
|
|
1590
|
+
friend class io::Printer;
|
|
1591
|
+
friend class compiler::cpp::Formatter;
|
|
1592
|
+
|
|
1593
|
+
// Allow access to FindValueByNumberCreatingIfUnknown.
|
|
1594
|
+
friend class descriptor_unittest::DescriptorTest;
|
|
1595
|
+
|
|
1596
|
+
// Get the merged features that apply to this enum type. These are specified
|
|
1597
|
+
// in the .proto file through the feature options in the message definition.
|
|
1598
|
+
// Allowed features are defined by Features in descriptor.proto, along with
|
|
1599
|
+
// any backend-specific extensions to it.
|
|
1600
|
+
const FeatureSet& features() const { return *merged_features_; }
|
|
1601
|
+
friend class internal::InternalFeatureHelper;
|
|
1602
|
+
|
|
1603
|
+
// Looks up a value by number. If the value does not exist, dynamically
|
|
1604
|
+
// creates a new EnumValueDescriptor for that value, assuming that it was
|
|
1605
|
+
// unknown. If a new descriptor is created, this is done in a thread-safe way,
|
|
1606
|
+
// and future calls will return the same value descriptor pointer.
|
|
1607
|
+
//
|
|
1608
|
+
// This is private but is used by Reflection (which is friended below) to
|
|
1609
|
+
// return a valid EnumValueDescriptor from GetEnum() when this feature is
|
|
1610
|
+
// enabled.
|
|
1611
|
+
const EnumValueDescriptor* FindValueByNumberCreatingIfUnknown(
|
|
1612
|
+
int number) const;
|
|
1613
|
+
|
|
1614
|
+
// See Descriptor::DebugString().
|
|
1615
|
+
void DebugString(int depth, std::string* contents,
|
|
1616
|
+
const DebugStringOptions& options) const;
|
|
1617
|
+
|
|
1618
|
+
// Walks up the descriptor tree to generate the source location path
|
|
1619
|
+
// to this descriptor from the file root.
|
|
1620
|
+
void GetLocationPath(std::vector<int>* output) const;
|
|
1621
|
+
|
|
1622
|
+
// visibility declared on the enum
|
|
1623
|
+
SymbolVisibility visibility_keyword() const;
|
|
1624
|
+
|
|
1625
|
+
// True if this is a placeholder for an unknown type.
|
|
1626
|
+
bool is_placeholder_ : 1;
|
|
1627
|
+
// True if this is a placeholder and the type name wasn't fully-qualified.
|
|
1628
|
+
bool is_unqualified_placeholder_ : 1;
|
|
1629
|
+
|
|
1630
|
+
// bitfield representation of SymbolVisibility, which only requires 2 bits
|
|
1631
|
+
uint8_t visibility_ : 2;
|
|
1632
|
+
|
|
1633
|
+
// This points to the last value _index_ that is part of the sequence starting
|
|
1634
|
+
// with the first label, where
|
|
1635
|
+
// `enum->value(i)->number() == enum->value(0)->number() + i`
|
|
1636
|
+
// We measure relative to the first label to adapt to enum labels starting at
|
|
1637
|
+
// 0 or 1.
|
|
1638
|
+
// Uses 16-bit to avoid extra padding. Unlikely to have more than 2^15
|
|
1639
|
+
// sequentially numbered labels in an enum.
|
|
1640
|
+
int16_t sequential_value_limit_;
|
|
1641
|
+
|
|
1642
|
+
int value_count_;
|
|
1643
|
+
|
|
1644
|
+
internal::DescriptorNames all_names_;
|
|
1645
|
+
const FileDescriptor* file_;
|
|
1646
|
+
const Descriptor* containing_type_;
|
|
1647
|
+
const EnumOptions* options_;
|
|
1648
|
+
const FeatureSet* proto_features_;
|
|
1649
|
+
const FeatureSet* merged_features_;
|
|
1650
|
+
EnumValueDescriptor* values_;
|
|
1651
|
+
|
|
1652
|
+
int reserved_range_count_;
|
|
1653
|
+
int reserved_name_count_;
|
|
1654
|
+
EnumDescriptor::ReservedRange* reserved_ranges_;
|
|
1655
|
+
const std::string** reserved_names_;
|
|
1656
|
+
|
|
1657
|
+
// IMPORTANT: If you add a new field, make sure to search for all instances
|
|
1658
|
+
// of Allocate<EnumDescriptor>() and AllocateArray<EnumDescriptor>() in
|
|
1659
|
+
// descriptor.cc and update them to initialize the field.
|
|
1660
|
+
|
|
1661
|
+
// Must be constructed using DescriptorPool.
|
|
1662
|
+
EnumDescriptor();
|
|
1663
|
+
friend class DescriptorBuilder;
|
|
1664
|
+
friend class Descriptor;
|
|
1665
|
+
friend class FieldDescriptor;
|
|
1666
|
+
friend class FileDescriptorTables;
|
|
1667
|
+
friend class EnumValueDescriptor;
|
|
1668
|
+
friend class FileDescriptor;
|
|
1669
|
+
friend class DescriptorPool;
|
|
1670
|
+
friend class Reflection;
|
|
1671
|
+
};
|
|
1672
|
+
|
|
1673
|
+
PROTOBUF_INTERNAL_CHECK_CLASS_SIZE(EnumDescriptor, 88);
|
|
1674
|
+
|
|
1675
|
+
// Describes an individual enum constant of a particular type. To get the
|
|
1676
|
+
// EnumValueDescriptor for a given enum value, first get the EnumDescriptor
|
|
1677
|
+
// for its type, then use EnumDescriptor::FindValueByName() or
|
|
1678
|
+
// EnumDescriptor::FindValueByNumber(). Use DescriptorPool to construct
|
|
1679
|
+
// your own descriptors.
|
|
1680
|
+
class PROTOBUF_EXPORT EnumValueDescriptor : private internal::SymbolBaseN<0>,
|
|
1681
|
+
private internal::SymbolBaseN<1> {
|
|
1682
|
+
public:
|
|
1683
|
+
typedef EnumValueDescriptorProto Proto;
|
|
1684
|
+
|
|
1685
|
+
#ifndef SWIG
|
|
1686
|
+
EnumValueDescriptor(const EnumValueDescriptor&) = delete;
|
|
1687
|
+
EnumValueDescriptor& operator=(const EnumValueDescriptor&) = delete;
|
|
1688
|
+
#endif
|
|
1689
|
+
|
|
1690
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view name()
|
|
1691
|
+
const; // Name of this enum constant.
|
|
1692
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int index()
|
|
1693
|
+
const; // Index within the enums's Descriptor.
|
|
1694
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int number()
|
|
1695
|
+
const; // Numeric value of this enum constant.
|
|
1696
|
+
|
|
1697
|
+
// The full_name of an enum value is a sibling symbol of the enum type.
|
|
1698
|
+
// e.g. the full name of FieldDescriptorProto::TYPE_INT32 is actually
|
|
1699
|
+
// "google.protobuf.FieldDescriptorProto.TYPE_INT32", NOT
|
|
1700
|
+
// "google.protobuf.FieldDescriptorProto.Type.TYPE_INT32". This is to conform
|
|
1701
|
+
// with C++ scoping rules for enums.
|
|
1702
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view full_name() const;
|
|
1703
|
+
|
|
1704
|
+
// The .proto file in which this value was defined. Never nullptr.
|
|
1705
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FileDescriptor* file() const;
|
|
1706
|
+
// The type of this value. Never nullptr.
|
|
1707
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const EnumDescriptor* type() const;
|
|
1708
|
+
|
|
1709
|
+
// Get options for this enum value. These are specified in the .proto file by
|
|
1710
|
+
// adding text like "[foo = 1234]" after an enum value definition. Allowed
|
|
1711
|
+
// options are defined by EnumValueOptions in descriptor.proto, and any
|
|
1712
|
+
// available extensions of that message.
|
|
1713
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const EnumValueOptions& options() const;
|
|
1714
|
+
|
|
1715
|
+
// See Descriptor::CopyTo().
|
|
1716
|
+
void CopyTo(EnumValueDescriptorProto* proto) const;
|
|
1717
|
+
|
|
1718
|
+
// See Descriptor::DebugString().
|
|
1719
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD std::string DebugString() const;
|
|
1720
|
+
|
|
1721
|
+
// See Descriptor::DebugStringWithOptions().
|
|
1722
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD std::string DebugStringWithOptions(
|
|
1723
|
+
const DebugStringOptions& options) const;
|
|
1724
|
+
|
|
1725
|
+
// Allows formatting with absl and gtest.
|
|
1726
|
+
template <typename Sink>
|
|
1727
|
+
friend void AbslStringify(Sink& sink, const EnumValueDescriptor& d) {
|
|
1728
|
+
absl::Format(&sink, "%s", d.DebugString());
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
// Source Location ---------------------------------------------------
|
|
1732
|
+
|
|
1733
|
+
// Updates |*out_location| to the source location of the complete
|
|
1734
|
+
// extent of this enum value declaration. Returns false and leaves
|
|
1735
|
+
// |*out_location| unchanged iff location information was not available.
|
|
1736
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool GetSourceLocation(
|
|
1737
|
+
SourceLocation* out_location) const;
|
|
1738
|
+
|
|
1739
|
+
private:
|
|
1740
|
+
friend class Symbol;
|
|
1741
|
+
typedef EnumValueOptions OptionsType;
|
|
1742
|
+
|
|
1743
|
+
// Allows access to GetLocationPath for annotations.
|
|
1744
|
+
friend class io::Printer;
|
|
1745
|
+
friend class compiler::cpp::Formatter;
|
|
1746
|
+
friend const std::string& internal::NameOfEnumAsString(
|
|
1747
|
+
const EnumValueDescriptor* descriptor);
|
|
1748
|
+
|
|
1749
|
+
// Get the merged features that apply to this enum value. These are specified
|
|
1750
|
+
// in the .proto file through the feature options in the message definition.
|
|
1751
|
+
// Allowed features are defined by Features in descriptor.proto, along with
|
|
1752
|
+
// any backend-specific extensions to it.
|
|
1753
|
+
const FeatureSet& features() const { return *merged_features_; }
|
|
1754
|
+
friend class internal::InternalFeatureHelper;
|
|
1755
|
+
|
|
1756
|
+
// See Descriptor::DebugString().
|
|
1757
|
+
void DebugString(int depth, std::string* contents,
|
|
1758
|
+
const DebugStringOptions& options) const;
|
|
1759
|
+
|
|
1760
|
+
// Walks up the descriptor tree to generate the source location path
|
|
1761
|
+
// to this descriptor from the file root.
|
|
1762
|
+
void GetLocationPath(std::vector<int>* output) const;
|
|
1763
|
+
|
|
1764
|
+
int number_;
|
|
1765
|
+
// We keep the old-style std::string payload to support `NameOfEnumAsString`
|
|
1766
|
+
// Once we start migrating Enum_Name functions to string_view we can switch
|
|
1767
|
+
// this too.
|
|
1768
|
+
const std::string* all_names_;
|
|
1769
|
+
const EnumDescriptor* type_;
|
|
1770
|
+
const EnumValueOptions* options_;
|
|
1771
|
+
const FeatureSet* proto_features_;
|
|
1772
|
+
const FeatureSet* merged_features_;
|
|
1773
|
+
// IMPORTANT: If you add a new field, make sure to search for all instances
|
|
1774
|
+
// of Allocate<EnumValueDescriptor>() and AllocateArray<EnumValueDescriptor>()
|
|
1775
|
+
// in descriptor.cc and update them to initialize the field.
|
|
1776
|
+
|
|
1777
|
+
// Must be constructed using DescriptorPool.
|
|
1778
|
+
EnumValueDescriptor();
|
|
1779
|
+
friend class DescriptorBuilder;
|
|
1780
|
+
friend class EnumDescriptor;
|
|
1781
|
+
friend class DescriptorPool;
|
|
1782
|
+
friend class FileDescriptorTables;
|
|
1783
|
+
friend class Reflection;
|
|
1784
|
+
};
|
|
1785
|
+
|
|
1786
|
+
PROTOBUF_INTERNAL_CHECK_CLASS_SIZE(EnumValueDescriptor, 48);
|
|
1787
|
+
|
|
1788
|
+
// Describes an RPC service. Use DescriptorPool to construct your own
|
|
1789
|
+
// descriptors.
|
|
1790
|
+
class PROTOBUF_EXPORT ServiceDescriptor : private internal::SymbolBase {
|
|
1791
|
+
public:
|
|
1792
|
+
typedef ServiceDescriptorProto Proto;
|
|
1793
|
+
|
|
1794
|
+
#ifndef SWIG
|
|
1795
|
+
ServiceDescriptor(const ServiceDescriptor&) = delete;
|
|
1796
|
+
ServiceDescriptor& operator=(const ServiceDescriptor&) = delete;
|
|
1797
|
+
#endif
|
|
1798
|
+
|
|
1799
|
+
// The name of the service, not including its containing scope.
|
|
1800
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view name() const;
|
|
1801
|
+
// The fully-qualified name of the service, scope delimited by periods.
|
|
1802
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view full_name() const;
|
|
1803
|
+
// Index of this service within the file's services array.
|
|
1804
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int index() const;
|
|
1805
|
+
|
|
1806
|
+
// The .proto file in which this service was defined. Never nullptr.
|
|
1807
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FileDescriptor* file() const;
|
|
1808
|
+
|
|
1809
|
+
// Get options for this service type. These are specified in the .proto file
|
|
1810
|
+
// by placing lines like "option foo = 1234;" in the service definition.
|
|
1811
|
+
// Allowed options are defined by ServiceOptions in descriptor.proto, and any
|
|
1812
|
+
// available extensions of that message.
|
|
1813
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const ServiceOptions& options() const;
|
|
1814
|
+
|
|
1815
|
+
// The number of methods this service defines.
|
|
1816
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int method_count() const;
|
|
1817
|
+
// Gets a MethodDescriptor by index, where 0 <= index < method_count().
|
|
1818
|
+
// These are returned in the order they were defined in the .proto file.
|
|
1819
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const MethodDescriptor* method(
|
|
1820
|
+
int index) const;
|
|
1821
|
+
|
|
1822
|
+
// Look up a MethodDescriptor by name.
|
|
1823
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const MethodDescriptor* FindMethodByName(
|
|
1824
|
+
absl::string_view name) const;
|
|
1825
|
+
|
|
1826
|
+
// See Descriptor::CopyTo().
|
|
1827
|
+
void CopyTo(ServiceDescriptorProto* proto) const;
|
|
1828
|
+
|
|
1829
|
+
// See Descriptor::DebugString().
|
|
1830
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD std::string DebugString() const;
|
|
1831
|
+
|
|
1832
|
+
// See Descriptor::DebugStringWithOptions().
|
|
1833
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD std::string DebugStringWithOptions(
|
|
1834
|
+
const DebugStringOptions& options) const;
|
|
1835
|
+
|
|
1836
|
+
// Allows formatting with absl and gtest.
|
|
1837
|
+
template <typename Sink>
|
|
1838
|
+
friend void AbslStringify(Sink& sink, const ServiceDescriptor& d) {
|
|
1839
|
+
absl::Format(&sink, "%s", d.DebugString());
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
// Source Location ---------------------------------------------------
|
|
1843
|
+
|
|
1844
|
+
// Updates |*out_location| to the source location of the complete
|
|
1845
|
+
// extent of this service declaration. Returns false and leaves
|
|
1846
|
+
// |*out_location| unchanged iff location information was not available.
|
|
1847
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool GetSourceLocation(
|
|
1848
|
+
SourceLocation* out_location) const;
|
|
1849
|
+
|
|
1850
|
+
private:
|
|
1851
|
+
friend class Symbol;
|
|
1852
|
+
typedef ServiceOptions OptionsType;
|
|
1853
|
+
|
|
1854
|
+
// Allows access to GetLocationPath for annotations.
|
|
1855
|
+
friend class io::Printer;
|
|
1856
|
+
friend class compiler::cpp::Formatter;
|
|
1857
|
+
|
|
1858
|
+
// Get the merged features that apply to this service type. These are
|
|
1859
|
+
// specified in the .proto file through the feature options in the service
|
|
1860
|
+
// definition. Allowed features are defined by Features in descriptor.proto,
|
|
1861
|
+
// along with any backend-specific extensions to it.
|
|
1862
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FeatureSet& features() const {
|
|
1863
|
+
return *merged_features_;
|
|
1864
|
+
}
|
|
1865
|
+
friend class internal::InternalFeatureHelper;
|
|
1866
|
+
|
|
1867
|
+
// See Descriptor::DebugString().
|
|
1868
|
+
void DebugString(std::string* contents,
|
|
1869
|
+
const DebugStringOptions& options) const;
|
|
1870
|
+
|
|
1871
|
+
// Walks up the descriptor tree to generate the source location path
|
|
1872
|
+
// to this descriptor from the file root.
|
|
1873
|
+
void GetLocationPath(std::vector<int>* output) const;
|
|
1874
|
+
|
|
1875
|
+
internal::DescriptorNames all_names_;
|
|
1876
|
+
const FileDescriptor* file_;
|
|
1877
|
+
const ServiceOptions* options_;
|
|
1878
|
+
const FeatureSet* proto_features_;
|
|
1879
|
+
const FeatureSet* merged_features_;
|
|
1880
|
+
MethodDescriptor* methods_;
|
|
1881
|
+
int method_count_;
|
|
1882
|
+
// IMPORTANT: If you add a new field, make sure to search for all instances
|
|
1883
|
+
// of Allocate<ServiceDescriptor>() and AllocateArray<ServiceDescriptor>() in
|
|
1884
|
+
// descriptor.cc and update them to initialize the field.
|
|
1885
|
+
|
|
1886
|
+
// Must be constructed using DescriptorPool.
|
|
1887
|
+
ServiceDescriptor();
|
|
1888
|
+
friend class DescriptorBuilder;
|
|
1889
|
+
friend class FileDescriptor;
|
|
1890
|
+
friend class MethodDescriptor;
|
|
1891
|
+
};
|
|
1892
|
+
|
|
1893
|
+
PROTOBUF_INTERNAL_CHECK_CLASS_SIZE(ServiceDescriptor, 64);
|
|
1894
|
+
|
|
1895
|
+
// Describes an individual service method. To obtain a MethodDescriptor given
|
|
1896
|
+
// a service, first get its ServiceDescriptor, then call
|
|
1897
|
+
// ServiceDescriptor::FindMethodByName(). Use DescriptorPool to construct your
|
|
1898
|
+
// own descriptors.
|
|
1899
|
+
class PROTOBUF_EXPORT MethodDescriptor : private internal::SymbolBase {
|
|
1900
|
+
public:
|
|
1901
|
+
typedef MethodDescriptorProto Proto;
|
|
1902
|
+
|
|
1903
|
+
#ifndef SWIG
|
|
1904
|
+
MethodDescriptor(const MethodDescriptor&) = delete;
|
|
1905
|
+
MethodDescriptor& operator=(const MethodDescriptor&) = delete;
|
|
1906
|
+
#endif
|
|
1907
|
+
|
|
1908
|
+
// Name of this method, not including containing scope.
|
|
1909
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view name() const;
|
|
1910
|
+
// The fully-qualified name of the method, scope delimited by periods.
|
|
1911
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view full_name() const;
|
|
1912
|
+
// Index within the service's Descriptor.
|
|
1913
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int index() const;
|
|
1914
|
+
|
|
1915
|
+
// The .proto file in which this method was defined. Never nullptr.
|
|
1916
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FileDescriptor* file() const;
|
|
1917
|
+
// Gets the service to which this method belongs. Never nullptr.
|
|
1918
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const ServiceDescriptor* service() const;
|
|
1919
|
+
|
|
1920
|
+
// Gets the type of protocol message which this method accepts as input.
|
|
1921
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const Descriptor* input_type() const;
|
|
1922
|
+
// Gets the type of protocol message which this message produces as output.
|
|
1923
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const Descriptor* output_type() const;
|
|
1924
|
+
|
|
1925
|
+
// Gets whether the client streams multiple requests.
|
|
1926
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool client_streaming() const;
|
|
1927
|
+
// Gets whether the server streams multiple responses.
|
|
1928
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool server_streaming() const;
|
|
1929
|
+
|
|
1930
|
+
// Get options for this method. These are specified in the .proto file by
|
|
1931
|
+
// placing lines like "option foo = 1234;" in curly-braces after a method
|
|
1932
|
+
// declaration. Allowed options are defined by MethodOptions in
|
|
1933
|
+
// descriptor.proto, and any available extensions of that message.
|
|
1934
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const MethodOptions& options() const;
|
|
1935
|
+
|
|
1936
|
+
// See Descriptor::CopyTo().
|
|
1937
|
+
void CopyTo(MethodDescriptorProto* proto) const;
|
|
1938
|
+
|
|
1939
|
+
// See Descriptor::DebugString().
|
|
1940
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD std::string DebugString() const;
|
|
1941
|
+
|
|
1942
|
+
// See Descriptor::DebugStringWithOptions().
|
|
1943
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD std::string DebugStringWithOptions(
|
|
1944
|
+
const DebugStringOptions& options) const;
|
|
1945
|
+
|
|
1946
|
+
// Allows formatting with absl and gtest.
|
|
1947
|
+
template <typename Sink>
|
|
1948
|
+
friend void AbslStringify(Sink& sink, const MethodDescriptor& d) {
|
|
1949
|
+
absl::Format(&sink, "%s", d.DebugString());
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1952
|
+
// Source Location ---------------------------------------------------
|
|
1953
|
+
|
|
1954
|
+
// Updates |*out_location| to the source location of the complete
|
|
1955
|
+
// extent of this method declaration. Returns false and leaves
|
|
1956
|
+
// |*out_location| unchanged iff location information was not available.
|
|
1957
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool GetSourceLocation(
|
|
1958
|
+
SourceLocation* out_location) const;
|
|
1959
|
+
|
|
1960
|
+
private:
|
|
1961
|
+
friend class Symbol;
|
|
1962
|
+
typedef MethodOptions OptionsType;
|
|
1963
|
+
|
|
1964
|
+
// Allows access to GetLocationPath for annotations.
|
|
1965
|
+
friend class io::Printer;
|
|
1966
|
+
friend class compiler::cpp::Formatter;
|
|
1967
|
+
|
|
1968
|
+
// Get the merged features that apply to this method. These are specified in
|
|
1969
|
+
// the .proto file through the feature options in the method definition.
|
|
1970
|
+
// Allowed features are defined by Features in descriptor.proto, along with
|
|
1971
|
+
// any backend-specific extensions to it.
|
|
1972
|
+
const FeatureSet& features() const { return *merged_features_; }
|
|
1973
|
+
friend class internal::InternalFeatureHelper;
|
|
1974
|
+
|
|
1975
|
+
// See Descriptor::DebugString().
|
|
1976
|
+
void DebugString(int depth, std::string* contents,
|
|
1977
|
+
const DebugStringOptions& options) const;
|
|
1978
|
+
|
|
1979
|
+
// Walks up the descriptor tree to generate the source location path
|
|
1980
|
+
// to this descriptor from the file root.
|
|
1981
|
+
void GetLocationPath(std::vector<int>* output) const;
|
|
1982
|
+
|
|
1983
|
+
bool client_streaming_;
|
|
1984
|
+
bool server_streaming_;
|
|
1985
|
+
internal::DescriptorNames all_names_;
|
|
1986
|
+
const ServiceDescriptor* service_;
|
|
1987
|
+
mutable internal::LazyDescriptor input_type_;
|
|
1988
|
+
mutable internal::LazyDescriptor output_type_;
|
|
1989
|
+
const MethodOptions* options_;
|
|
1990
|
+
const FeatureSet* proto_features_;
|
|
1991
|
+
const FeatureSet* merged_features_;
|
|
1992
|
+
// IMPORTANT: If you add a new field, make sure to search for all instances
|
|
1993
|
+
// of Allocate<MethodDescriptor>() and AllocateArray<MethodDescriptor>() in
|
|
1994
|
+
// descriptor.cc and update them to initialize the field.
|
|
1995
|
+
|
|
1996
|
+
// Must be constructed using DescriptorPool.
|
|
1997
|
+
MethodDescriptor();
|
|
1998
|
+
friend class DescriptorBuilder;
|
|
1999
|
+
friend class ServiceDescriptor;
|
|
2000
|
+
};
|
|
2001
|
+
|
|
2002
|
+
PROTOBUF_INTERNAL_CHECK_CLASS_SIZE(MethodDescriptor, 80);
|
|
2003
|
+
|
|
2004
|
+
// Describes a whole .proto file. To get the FileDescriptor for a compiled-in
|
|
2005
|
+
// file, get the descriptor for something defined in that file and call
|
|
2006
|
+
// descriptor->file(). Use DescriptorPool to construct your own descriptors.
|
|
2007
|
+
class PROTOBUF_EXPORT FileDescriptor : private internal::SymbolBase {
|
|
2008
|
+
public:
|
|
2009
|
+
typedef FileDescriptorProto Proto;
|
|
2010
|
+
|
|
2011
|
+
#ifndef SWIG
|
|
2012
|
+
FileDescriptor(const FileDescriptor&) = delete;
|
|
2013
|
+
FileDescriptor& operator=(const FileDescriptor&) = delete;
|
|
2014
|
+
#endif
|
|
2015
|
+
|
|
2016
|
+
// The filename, relative to the source tree.
|
|
2017
|
+
// e.g. "foo/bar/baz.proto"
|
|
2018
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view name() const;
|
|
2019
|
+
|
|
2020
|
+
// The package, e.g. "google.protobuf.compiler".
|
|
2021
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view package() const;
|
|
2022
|
+
|
|
2023
|
+
// The DescriptorPool in which this FileDescriptor and all its contents were
|
|
2024
|
+
// allocated. Never nullptr.
|
|
2025
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const DescriptorPool* pool() const;
|
|
2026
|
+
|
|
2027
|
+
// The number of files imported by this one.
|
|
2028
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int dependency_count() const;
|
|
2029
|
+
// Gets an imported file by index, where 0 <= index < dependency_count().
|
|
2030
|
+
// These are returned in the order they were defined in the .proto file.
|
|
2031
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FileDescriptor* dependency(
|
|
2032
|
+
int index) const;
|
|
2033
|
+
|
|
2034
|
+
// The number of files public imported by this one.
|
|
2035
|
+
// The public dependency list is a subset of the dependency list.
|
|
2036
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int public_dependency_count() const;
|
|
2037
|
+
// Gets a public imported file by index, where 0 <= index <
|
|
2038
|
+
// public_dependency_count().
|
|
2039
|
+
// These are returned in the order they were defined in the .proto file.
|
|
2040
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FileDescriptor* public_dependency(
|
|
2041
|
+
int index) const;
|
|
2042
|
+
|
|
2043
|
+
// The number of files that are imported for weak fields.
|
|
2044
|
+
// The weak dependency list is a subset of the dependency list.
|
|
2045
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int weak_dependency_count() const;
|
|
2046
|
+
// Gets a weak imported file by index, where 0 <= index <
|
|
2047
|
+
// weak_dependency_count().
|
|
2048
|
+
// These are returned in the order they were defined in the .proto file.
|
|
2049
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FileDescriptor* weak_dependency(
|
|
2050
|
+
int index) const;
|
|
2051
|
+
|
|
2052
|
+
// The number of files that are imported for options.
|
|
2053
|
+
// The option dependency list is separate from the dependency list.
|
|
2054
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int option_dependency_count() const;
|
|
2055
|
+
// Gets name of an option imported file by index, where
|
|
2056
|
+
// 0 <= index < option_dependency_count()
|
|
2057
|
+
// These are returned in the relative order they were defined in the .proto
|
|
2058
|
+
// file.
|
|
2059
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::string_view option_dependency_name(
|
|
2060
|
+
int index) const;
|
|
2061
|
+
|
|
2062
|
+
// Number of top-level message types defined in this file. (This does not
|
|
2063
|
+
// include nested types.)
|
|
2064
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int message_type_count() const;
|
|
2065
|
+
// Gets a top-level message type, where 0 <= index < message_type_count().
|
|
2066
|
+
// These are returned in the order they were defined in the .proto file.
|
|
2067
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const Descriptor* message_type(
|
|
2068
|
+
int index) const;
|
|
2069
|
+
|
|
2070
|
+
// Number of top-level enum types defined in this file. (This does not
|
|
2071
|
+
// include nested types.)
|
|
2072
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int enum_type_count() const;
|
|
2073
|
+
// Gets a top-level enum type, where 0 <= index < enum_type_count().
|
|
2074
|
+
// These are returned in the order they were defined in the .proto file.
|
|
2075
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const EnumDescriptor* enum_type(
|
|
2076
|
+
int index) const;
|
|
2077
|
+
|
|
2078
|
+
// Number of services defined in this file.
|
|
2079
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int service_count() const;
|
|
2080
|
+
// Gets a service, where 0 <= index < service_count().
|
|
2081
|
+
// These are returned in the order they were defined in the .proto file.
|
|
2082
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const ServiceDescriptor* service(
|
|
2083
|
+
int index) const;
|
|
2084
|
+
|
|
2085
|
+
// Number of extensions defined at file scope. (This does not include
|
|
2086
|
+
// extensions nested within message types.)
|
|
2087
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD int extension_count() const;
|
|
2088
|
+
// Gets an extension's descriptor, where 0 <= index < extension_count().
|
|
2089
|
+
// These are returned in the order they were defined in the .proto file.
|
|
2090
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldDescriptor* extension(
|
|
2091
|
+
int index) const;
|
|
2092
|
+
|
|
2093
|
+
// Get options for this file. These are specified in the .proto file by
|
|
2094
|
+
// placing lines like "option foo = 1234;" at the top level, outside of any
|
|
2095
|
+
// other definitions. Allowed options are defined by FileOptions in
|
|
2096
|
+
// descriptor.proto, and any available extensions of that message.
|
|
2097
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FileOptions& options() const;
|
|
2098
|
+
|
|
2099
|
+
// Find a top-level message type by name (not full_name). Returns nullptr if
|
|
2100
|
+
// not found.
|
|
2101
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const Descriptor* FindMessageTypeByName(
|
|
2102
|
+
absl::string_view name) const;
|
|
2103
|
+
// Find a top-level enum type by name. Returns nullptr if not found.
|
|
2104
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const EnumDescriptor* FindEnumTypeByName(
|
|
2105
|
+
absl::string_view name) const;
|
|
2106
|
+
// Find an enum value defined in any top-level enum by name. Returns nullptr
|
|
2107
|
+
// if not found.
|
|
2108
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const EnumValueDescriptor*
|
|
2109
|
+
FindEnumValueByName(absl::string_view name) const;
|
|
2110
|
+
// Find a service definition by name. Returns nullptr if not found.
|
|
2111
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const ServiceDescriptor*
|
|
2112
|
+
FindServiceByName(absl::string_view name) const;
|
|
2113
|
+
// Find a top-level extension definition by name. Returns nullptr if not
|
|
2114
|
+
// found.
|
|
2115
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldDescriptor*
|
|
2116
|
+
FindExtensionByName(absl::string_view name) const;
|
|
2117
|
+
// Similar to FindExtensionByName(), but searches by lowercased-name. See
|
|
2118
|
+
// Descriptor::FindFieldByLowercaseName().
|
|
2119
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldDescriptor*
|
|
2120
|
+
FindExtensionByLowercaseName(absl::string_view name) const;
|
|
2121
|
+
// Similar to FindExtensionByName(), but searches by camelcased-name. See
|
|
2122
|
+
// Descriptor::FindFieldByCamelcaseName().
|
|
2123
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldDescriptor*
|
|
2124
|
+
FindExtensionByCamelcaseName(absl::string_view name) const;
|
|
2125
|
+
|
|
2126
|
+
// See Descriptor::CopyTo().
|
|
2127
|
+
// Notes:
|
|
2128
|
+
// - This method does NOT copy source code information since it is relatively
|
|
2129
|
+
// large and rarely needed. See CopySourceCodeInfoTo() below.
|
|
2130
|
+
void CopyTo(FileDescriptorProto* proto) const;
|
|
2131
|
+
// Write the source code information of this FileDescriptor into the given
|
|
2132
|
+
// FileDescriptorProto. See CopyTo() above.
|
|
2133
|
+
void CopySourceCodeInfoTo(FileDescriptorProto* proto) const;
|
|
2134
|
+
// Fill the json_name field of FieldDescriptorProto for all fields. Can only
|
|
2135
|
+
// be called after CopyTo().
|
|
2136
|
+
void CopyJsonNameTo(FileDescriptorProto* proto) const;
|
|
2137
|
+
// Fills in the file-level settings of this file (e.g. edition, package,
|
|
2138
|
+
// file options) to `proto`.
|
|
2139
|
+
void CopyHeadingTo(FileDescriptorProto* proto) const;
|
|
2140
|
+
|
|
2141
|
+
// See Descriptor::DebugString().
|
|
2142
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD std::string DebugString() const;
|
|
2143
|
+
|
|
2144
|
+
// See Descriptor::DebugStringWithOptions().
|
|
2145
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD std::string DebugStringWithOptions(
|
|
2146
|
+
const DebugStringOptions& options) const;
|
|
2147
|
+
|
|
2148
|
+
// Allows formatting with absl and gtest.
|
|
2149
|
+
template <typename Sink>
|
|
2150
|
+
friend void AbslStringify(Sink& sink, const FileDescriptor& d) {
|
|
2151
|
+
absl::Format(&sink, "%s", d.DebugString());
|
|
2152
|
+
}
|
|
2153
|
+
|
|
2154
|
+
// Returns true if this is a placeholder for an unknown file. This will
|
|
2155
|
+
// only be the case if this descriptor comes from a DescriptorPool
|
|
2156
|
+
// with AllowUnknownDependencies() set.
|
|
2157
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool is_placeholder() const;
|
|
2158
|
+
|
|
2159
|
+
// Updates |*out_location| to the source location of the complete extent of
|
|
2160
|
+
// this file declaration (namely, the empty path).
|
|
2161
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool GetSourceLocation(
|
|
2162
|
+
SourceLocation* out_location) const;
|
|
2163
|
+
|
|
2164
|
+
// Updates |*out_location| to the source location of the complete
|
|
2165
|
+
// extent of the declaration or declaration-part denoted by |path|.
|
|
2166
|
+
// Returns false and leaves |*out_location| unchanged iff location
|
|
2167
|
+
// information was not available. (See SourceCodeInfo for
|
|
2168
|
+
// description of path encoding.)
|
|
2169
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool GetSourceLocation(
|
|
2170
|
+
const std::vector<int>& path, SourceLocation* out_location) const;
|
|
2171
|
+
|
|
2172
|
+
private:
|
|
2173
|
+
friend class Symbol;
|
|
2174
|
+
friend class SymbolChecker;
|
|
2175
|
+
friend class FileDescriptorLegacy;
|
|
2176
|
+
typedef FileOptions OptionsType;
|
|
2177
|
+
|
|
2178
|
+
bool is_placeholder_;
|
|
2179
|
+
// Indicates the FileDescriptor is completed building. Used to verify
|
|
2180
|
+
// that type accessor functions that can possibly build a dependent file
|
|
2181
|
+
// aren't called during the process of building the file.
|
|
2182
|
+
bool finished_building_;
|
|
2183
|
+
// This one is here to fill the padding.
|
|
2184
|
+
int extension_count_;
|
|
2185
|
+
|
|
2186
|
+
const std::string* name_;
|
|
2187
|
+
const std::string* package_;
|
|
2188
|
+
const DescriptorPool* pool_;
|
|
2189
|
+
Edition edition_;
|
|
2190
|
+
|
|
2191
|
+
// Returns edition of this file. For legacy proto2/proto3 files, special
|
|
2192
|
+
// EDITION_PROTO2 and EDITION_PROTO3 values are used.
|
|
2193
|
+
Edition edition() const;
|
|
2194
|
+
|
|
2195
|
+
// Get the merged features that apply to this file. These are specified in
|
|
2196
|
+
// the .proto file through the feature options in the message definition.
|
|
2197
|
+
// Allowed features are defined by FeatureSet in descriptor.proto, along with
|
|
2198
|
+
// any backend-specific extensions to it.
|
|
2199
|
+
const FeatureSet& features() const { return *merged_features_; }
|
|
2200
|
+
friend class internal::InternalFeatureHelper;
|
|
2201
|
+
|
|
2202
|
+
// dependencies_once_ contain a once_flag followed by N NUL terminated
|
|
2203
|
+
// strings. Dependencies that do not need to be loaded will be empty. ie just
|
|
2204
|
+
// {'\0'}
|
|
2205
|
+
absl::once_flag* dependencies_once_;
|
|
2206
|
+
static void DependenciesOnceInit(const FileDescriptor* to_init);
|
|
2207
|
+
void InternalDependenciesOnceInit() const;
|
|
2208
|
+
|
|
2209
|
+
// These are arranged to minimize padding on 64-bit.
|
|
2210
|
+
int dependency_count_;
|
|
2211
|
+
int public_dependency_count_;
|
|
2212
|
+
int weak_dependency_count_;
|
|
2213
|
+
int option_dependency_count_;
|
|
2214
|
+
int message_type_count_;
|
|
2215
|
+
int enum_type_count_;
|
|
2216
|
+
int service_count_;
|
|
2217
|
+
|
|
2218
|
+
mutable const FileDescriptor** dependencies_;
|
|
2219
|
+
int* public_dependencies_;
|
|
2220
|
+
int* weak_dependencies_;
|
|
2221
|
+
absl::string_view* option_dependencies_;
|
|
2222
|
+
|
|
2223
|
+
Descriptor* message_types_;
|
|
2224
|
+
EnumDescriptor* enum_types_;
|
|
2225
|
+
ServiceDescriptor* services_;
|
|
2226
|
+
FieldDescriptor* extensions_;
|
|
2227
|
+
const FileOptions* options_;
|
|
2228
|
+
const FeatureSet* proto_features_;
|
|
2229
|
+
const FeatureSet* merged_features_;
|
|
2230
|
+
|
|
2231
|
+
const FileDescriptorTables* tables_;
|
|
2232
|
+
const SourceCodeInfo* source_code_info_;
|
|
2233
|
+
|
|
2234
|
+
// IMPORTANT: If you add a new field, make sure to search for all instances
|
|
2235
|
+
// of Allocate<FileDescriptor>() and AllocateArray<FileDescriptor>() in
|
|
2236
|
+
// descriptor.cc and update them to initialize the field.
|
|
2237
|
+
|
|
2238
|
+
FileDescriptor();
|
|
2239
|
+
friend class DescriptorBuilder;
|
|
2240
|
+
friend class DescriptorPool;
|
|
2241
|
+
friend class Descriptor;
|
|
2242
|
+
friend class FieldDescriptor;
|
|
2243
|
+
friend class internal::LazyDescriptor;
|
|
2244
|
+
friend class OneofDescriptor;
|
|
2245
|
+
friend class EnumDescriptor;
|
|
2246
|
+
friend class EnumValueDescriptor;
|
|
2247
|
+
friend class MethodDescriptor;
|
|
2248
|
+
friend class ServiceDescriptor;
|
|
2249
|
+
};
|
|
2250
|
+
|
|
2251
|
+
PROTOBUF_INTERNAL_CHECK_CLASS_SIZE(FileDescriptor, 184);
|
|
2252
|
+
|
|
2253
|
+
#ifndef SWIG
|
|
2254
|
+
enum class ExtDeclEnforcementLevel : uint8_t {
|
|
2255
|
+
// No enforcement.
|
|
2256
|
+
kNoEnforcement = 0,
|
|
2257
|
+
// All extensions excluding descriptor.proto extensions
|
|
2258
|
+
// (go/extension-declarations#descriptor-proto)
|
|
2259
|
+
kCustomExtensions = 1,
|
|
2260
|
+
// All extensions including descriptor.proto extensions.
|
|
2261
|
+
kAllExtensions = 2,
|
|
2262
|
+
};
|
|
2263
|
+
#endif // !SWIG
|
|
2264
|
+
|
|
2265
|
+
// ===================================================================
|
|
2266
|
+
|
|
2267
|
+
// Used to construct descriptors.
|
|
2268
|
+
//
|
|
2269
|
+
// Normally you won't want to build your own descriptors. Message classes
|
|
2270
|
+
// constructed by the protocol compiler will provide them for you. However,
|
|
2271
|
+
// if you are implementing Message on your own, or if you are writing a
|
|
2272
|
+
// program which can operate on totally arbitrary types and needs to load
|
|
2273
|
+
// them from some sort of database, you might need to.
|
|
2274
|
+
//
|
|
2275
|
+
// Since Descriptors are composed of a whole lot of cross-linked bits of
|
|
2276
|
+
// data that would be a pain to put together manually, the
|
|
2277
|
+
// DescriptorPool class is provided to make the process easier. It can
|
|
2278
|
+
// take a FileDescriptorProto (defined in descriptor.proto), validate it,
|
|
2279
|
+
// and convert it to a set of nicely cross-linked Descriptors.
|
|
2280
|
+
//
|
|
2281
|
+
// DescriptorPool also helps with memory management. Descriptors are
|
|
2282
|
+
// composed of many objects containing static data and pointers to each
|
|
2283
|
+
// other. In all likelihood, when it comes time to delete this data,
|
|
2284
|
+
// you'll want to delete it all at once. In fact, it is not uncommon to
|
|
2285
|
+
// have a whole pool of descriptors all cross-linked with each other which
|
|
2286
|
+
// you wish to delete all at once. This class represents such a pool, and
|
|
2287
|
+
// handles the memory management for you.
|
|
2288
|
+
//
|
|
2289
|
+
// You can also search for descriptors within a DescriptorPool by name, and
|
|
2290
|
+
// extensions by number.
|
|
2291
|
+
class PROTOBUF_EXPORT DescriptorPool {
|
|
2292
|
+
public:
|
|
2293
|
+
// Create a normal, empty DescriptorPool.
|
|
2294
|
+
DescriptorPool();
|
|
2295
|
+
|
|
2296
|
+
// Constructs a DescriptorPool that, when it can't find something among the
|
|
2297
|
+
// descriptors already in the pool, looks for it in the given
|
|
2298
|
+
// DescriptorDatabase.
|
|
2299
|
+
// Notes:
|
|
2300
|
+
// - If a DescriptorPool is constructed this way, its BuildFile*() methods
|
|
2301
|
+
// must not be called (they will assert-fail). The only way to populate
|
|
2302
|
+
// the pool with descriptors is to call the Find*By*() methods.
|
|
2303
|
+
// - The Find*By*() methods may block the calling thread if the
|
|
2304
|
+
// DescriptorDatabase blocks. This in turn means that parsing messages
|
|
2305
|
+
// may block if they need to look up extensions.
|
|
2306
|
+
// - The Find*By*() methods will use mutexes for thread-safety, thus making
|
|
2307
|
+
// them slower even when they don't have to fall back to the database.
|
|
2308
|
+
// In fact, even the Find*By*() methods of descriptor objects owned by
|
|
2309
|
+
// this pool will be slower, since they will have to obtain locks too.
|
|
2310
|
+
// - An ErrorCollector may optionally be given to collect validation errors
|
|
2311
|
+
// in files loaded from the database. If not given, errors will be printed
|
|
2312
|
+
// to ABSL_LOG(ERROR). Remember that files are built on-demand, so this
|
|
2313
|
+
// ErrorCollector may be called from any thread that calls one of the
|
|
2314
|
+
// Find*By*() methods.
|
|
2315
|
+
// - The DescriptorDatabase must not be mutated during the lifetime of
|
|
2316
|
+
// the DescriptorPool. Even if the client takes care to avoid data races,
|
|
2317
|
+
// changes to the content of the DescriptorDatabase may not be reflected
|
|
2318
|
+
// in subsequent lookups in the DescriptorPool.
|
|
2319
|
+
class ErrorCollector;
|
|
2320
|
+
explicit DescriptorPool(DescriptorDatabase* fallback_database,
|
|
2321
|
+
ErrorCollector* error_collector = nullptr);
|
|
2322
|
+
|
|
2323
|
+
#ifndef SWIG
|
|
2324
|
+
DescriptorPool(const DescriptorPool&) = delete;
|
|
2325
|
+
DescriptorPool& operator=(const DescriptorPool&) = delete;
|
|
2326
|
+
#endif
|
|
2327
|
+
~DescriptorPool();
|
|
2328
|
+
|
|
2329
|
+
// Get a pointer to the generated pool. Generated protocol message classes
|
|
2330
|
+
// which are compiled into the binary will allocate their descriptors in
|
|
2331
|
+
// this pool. Do not add your own descriptors to this pool.
|
|
2332
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD static const DescriptorPool*
|
|
2333
|
+
generated_pool();
|
|
2334
|
+
|
|
2335
|
+
|
|
2336
|
+
// Find a FileDescriptor in the pool by file name. Returns nullptr if not
|
|
2337
|
+
// found.
|
|
2338
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FileDescriptor* FindFileByName(
|
|
2339
|
+
absl::string_view name) const;
|
|
2340
|
+
|
|
2341
|
+
// Find the FileDescriptor in the pool which defines the given symbol.
|
|
2342
|
+
// If any of the Find*ByName() methods below would succeed, then this is
|
|
2343
|
+
// equivalent to calling that method and calling the result's file() method.
|
|
2344
|
+
// Otherwise this returns nullptr.
|
|
2345
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FileDescriptor*
|
|
2346
|
+
FindFileContainingSymbol(absl::string_view symbol_name) const;
|
|
2347
|
+
|
|
2348
|
+
// Looking up descriptors ------------------------------------------
|
|
2349
|
+
// These find descriptors by fully-qualified name. These will find both
|
|
2350
|
+
// top-level descriptors and nested descriptors. They return nullptr if not
|
|
2351
|
+
// found.
|
|
2352
|
+
|
|
2353
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const Descriptor* FindMessageTypeByName(
|
|
2354
|
+
absl::string_view name) const;
|
|
2355
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldDescriptor* FindFieldByName(
|
|
2356
|
+
absl::string_view name) const;
|
|
2357
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldDescriptor*
|
|
2358
|
+
FindExtensionByName(absl::string_view name) const;
|
|
2359
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const OneofDescriptor* FindOneofByName(
|
|
2360
|
+
absl::string_view name) const;
|
|
2361
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const EnumDescriptor* FindEnumTypeByName(
|
|
2362
|
+
absl::string_view name) const;
|
|
2363
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const EnumValueDescriptor*
|
|
2364
|
+
FindEnumValueByName(absl::string_view name) const;
|
|
2365
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const ServiceDescriptor*
|
|
2366
|
+
FindServiceByName(absl::string_view name) const;
|
|
2367
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const MethodDescriptor* FindMethodByName(
|
|
2368
|
+
absl::string_view name) const;
|
|
2369
|
+
|
|
2370
|
+
// Finds an extension of the given type by number. The extendee must be
|
|
2371
|
+
// a member of this DescriptorPool or one of its underlays.
|
|
2372
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldDescriptor*
|
|
2373
|
+
FindExtensionByNumber(const Descriptor* extendee, int number) const;
|
|
2374
|
+
|
|
2375
|
+
// Finds an extension of the given type by its printable name.
|
|
2376
|
+
// See comments above PrintableNameForExtension() for the definition of
|
|
2377
|
+
// "printable name". The extendee must be a member of this DescriptorPool
|
|
2378
|
+
// or one of its underlays. Returns nullptr if there is no known message
|
|
2379
|
+
// extension with the given printable name.
|
|
2380
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD const FieldDescriptor*
|
|
2381
|
+
FindExtensionByPrintableName(const Descriptor* extendee,
|
|
2382
|
+
absl::string_view printable_name) const;
|
|
2383
|
+
|
|
2384
|
+
// Finds extensions of extendee. The extensions will be appended to
|
|
2385
|
+
// out in an undefined order. Only extensions defined directly in
|
|
2386
|
+
// this DescriptorPool or one of its underlays are guaranteed to be
|
|
2387
|
+
// found: extensions defined in the fallback database might not be found
|
|
2388
|
+
// depending on the database implementation.
|
|
2389
|
+
void FindAllExtensions(const Descriptor* extendee,
|
|
2390
|
+
std::vector<const FieldDescriptor*>* out) const;
|
|
2391
|
+
|
|
2392
|
+
// Building descriptors --------------------------------------------
|
|
2393
|
+
|
|
2394
|
+
// When converting a FileDescriptorProto to a FileDescriptor, various
|
|
2395
|
+
// errors might be detected in the input. The caller may handle these
|
|
2396
|
+
// programmatically by implementing an ErrorCollector.
|
|
2397
|
+
class PROTOBUF_EXPORT ErrorCollector {
|
|
2398
|
+
public:
|
|
2399
|
+
inline ErrorCollector() {}
|
|
2400
|
+
#ifndef SWIG
|
|
2401
|
+
ErrorCollector(const ErrorCollector&) = delete;
|
|
2402
|
+
ErrorCollector& operator=(const ErrorCollector&) = delete;
|
|
2403
|
+
#endif
|
|
2404
|
+
virtual ~ErrorCollector();
|
|
2405
|
+
|
|
2406
|
+
// These constants specify what exact part of the construct is broken.
|
|
2407
|
+
// This is useful e.g. for mapping the error back to an exact location
|
|
2408
|
+
// in a .proto file.
|
|
2409
|
+
enum ErrorLocation {
|
|
2410
|
+
NAME, // the symbol name, or the package name for files
|
|
2411
|
+
NUMBER, // field, extension range or extension decl number
|
|
2412
|
+
TYPE, // field type
|
|
2413
|
+
EXTENDEE, // field extendee
|
|
2414
|
+
DEFAULT_VALUE, // field default value
|
|
2415
|
+
INPUT_TYPE, // method input type
|
|
2416
|
+
OUTPUT_TYPE, // method output type
|
|
2417
|
+
OPTION_NAME, // name in assignment
|
|
2418
|
+
OPTION_VALUE, // value in option assignment
|
|
2419
|
+
IMPORT, // import error
|
|
2420
|
+
EDITIONS, // editions-related error
|
|
2421
|
+
SYMBOL, // Symbol visibility and co-location related error
|
|
2422
|
+
OTHER // some other problem
|
|
2423
|
+
};
|
|
2424
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD static absl::string_view
|
|
2425
|
+
ErrorLocationName(ErrorLocation location);
|
|
2426
|
+
|
|
2427
|
+
// Reports an error in the FileDescriptorProto. Use this function if the
|
|
2428
|
+
// problem occurred should interrupt building the FileDescriptorProto.
|
|
2429
|
+
// Provided the following arguments:
|
|
2430
|
+
// filename - File name in which the error occurred.
|
|
2431
|
+
// element_name - Full name of the erroneous element.
|
|
2432
|
+
// descriptor - Descriptor of the erroneous element.
|
|
2433
|
+
// location - One of the location constants, above.
|
|
2434
|
+
// message - Human-readable error message.
|
|
2435
|
+
virtual void RecordError(absl::string_view filename,
|
|
2436
|
+
absl::string_view element_name,
|
|
2437
|
+
const Message* descriptor, ErrorLocation location,
|
|
2438
|
+
absl::string_view message)
|
|
2439
|
+
= 0;
|
|
2440
|
+
|
|
2441
|
+
// Reports a warning in the FileDescriptorProto. Use this function if the
|
|
2442
|
+
// problem occurred should NOT interrupt building the FileDescriptorProto.
|
|
2443
|
+
// Provided the following arguments:
|
|
2444
|
+
// filename - File name in which the error occurred.
|
|
2445
|
+
// element_name - Full name of the erroneous element.
|
|
2446
|
+
// descriptor - Descriptor of the erroneous element.
|
|
2447
|
+
// location - One of the location constants, above.
|
|
2448
|
+
// message - Human-readable error message.
|
|
2449
|
+
virtual void RecordWarning([[maybe_unused]] absl::string_view filename,
|
|
2450
|
+
[[maybe_unused]] absl::string_view element_name,
|
|
2451
|
+
[[maybe_unused]] const Message* descriptor,
|
|
2452
|
+
[[maybe_unused]] ErrorLocation location,
|
|
2453
|
+
[[maybe_unused]] absl::string_view message) {
|
|
2454
|
+
}
|
|
2455
|
+
|
|
2456
|
+
};
|
|
2457
|
+
|
|
2458
|
+
// Convert the FileDescriptorProto to real descriptors and place them in
|
|
2459
|
+
// this DescriptorPool. All dependencies of the file must already be in
|
|
2460
|
+
// the pool. Returns the resulting FileDescriptor, or nullptr if there were
|
|
2461
|
+
// problems with the input (e.g. the message was invalid, or dependencies
|
|
2462
|
+
// were missing). Details about the errors are written to ABSL_LOG(ERROR).
|
|
2463
|
+
const FileDescriptor* BuildFile(const FileDescriptorProto& proto);
|
|
2464
|
+
|
|
2465
|
+
// Same as BuildFile() except errors are sent to the given ErrorCollector.
|
|
2466
|
+
const FileDescriptor* BuildFileCollectingErrors(
|
|
2467
|
+
const FileDescriptorProto& proto, ErrorCollector* error_collector);
|
|
2468
|
+
|
|
2469
|
+
// By default, it is an error if a FileDescriptorProto contains references
|
|
2470
|
+
// to types or other files that are not found in the DescriptorPool (or its
|
|
2471
|
+
// backing DescriptorDatabase, if any). If you call
|
|
2472
|
+
// AllowUnknownDependencies(), however, then unknown types and files
|
|
2473
|
+
// will be replaced by placeholder descriptors (which can be identified by
|
|
2474
|
+
// the is_placeholder() method). This can allow you to
|
|
2475
|
+
// perform some useful operations with a .proto file even if you do not
|
|
2476
|
+
// have access to other .proto files on which it depends. However, some
|
|
2477
|
+
// heuristics must be used to fill in the gaps in information, and these
|
|
2478
|
+
// can lead to descriptors which are inaccurate. For example, the
|
|
2479
|
+
// DescriptorPool may be forced to guess whether an unknown type is a message
|
|
2480
|
+
// or an enum, as well as what package it resides in. Furthermore,
|
|
2481
|
+
// placeholder types will not be discoverable via FindMessageTypeByName()
|
|
2482
|
+
// and similar methods, which could confuse some descriptor-based algorithms.
|
|
2483
|
+
// Generally, the results of this option should be handled with extreme care.
|
|
2484
|
+
void AllowUnknownDependencies() { allow_unknown_ = true; }
|
|
2485
|
+
|
|
2486
|
+
// By default, weak imports are allowed to be missing, in which case we will
|
|
2487
|
+
// use a placeholder for the dependency and convert the field to be an Empty
|
|
2488
|
+
// message field. If you call EnforceWeakDependencies(true), however, the
|
|
2489
|
+
// DescriptorPool will report a import not found error.
|
|
2490
|
+
void EnforceWeakDependencies(bool enforce) { enforce_weak_ = enforce; }
|
|
2491
|
+
|
|
2492
|
+
// Enforce the naming style rules. This applies the intended style rules
|
|
2493
|
+
// corresponding to the edition of the file, and was first introduced
|
|
2494
|
+
// with Edition 2024. Proto2, Proto3 and Edition 2023 are never considered
|
|
2495
|
+
// to be in violation and so are unaffected by this.
|
|
2496
|
+
//
|
|
2497
|
+
// In Edition 2024+, the 'enforce_naming_style` feature can be used to opt out
|
|
2498
|
+
// of this enforcement.
|
|
2499
|
+
void EnforceNamingStyle(bool enforce) { enforce_naming_style_ = enforce; }
|
|
2500
|
+
|
|
2501
|
+
// Enforce validation of feature support.
|
|
2502
|
+
//
|
|
2503
|
+
// This is used to guard feature support validation for the lifetimes of
|
|
2504
|
+
// options and features.
|
|
2505
|
+
void EnforceFeatureSupportValidation(bool enforce) {
|
|
2506
|
+
enforce_feature_support_validation_ = enforce;
|
|
2507
|
+
}
|
|
2508
|
+
|
|
2509
|
+
// Enforce symbol visibility rules. This will enable enforcement of the
|
|
2510
|
+
// `export` and `local` keywords added in edition 2024, honoring the behavior
|
|
2511
|
+
// of the `default_symbol_visibility` feature.
|
|
2512
|
+
void EnforceSymbolVisibility(bool enforce) {
|
|
2513
|
+
enforce_symbol_visibility_ = enforce;
|
|
2514
|
+
}
|
|
2515
|
+
|
|
2516
|
+
// Sets the default feature mappings used during the build. If this function
|
|
2517
|
+
// isn't called, the C++ feature set defaults are used. If this function is
|
|
2518
|
+
// called, these defaults will be used instead.
|
|
2519
|
+
// FeatureSetDefaults includes a minimum/maximum supported edition, which will
|
|
2520
|
+
// be enforced while building proto files.
|
|
2521
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD absl::Status SetFeatureSetDefaults(
|
|
2522
|
+
FeatureSetDefaults spec);
|
|
2523
|
+
|
|
2524
|
+
// Returns true if the descriptor pool resolves features for the given
|
|
2525
|
+
// extension.
|
|
2526
|
+
template <typename TypeTraitsT, uint8_t field_type, bool is_packed>
|
|
2527
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool ResolvesFeaturesFor(
|
|
2528
|
+
const google::protobuf::internal::ExtensionIdentifier<
|
|
2529
|
+
FeatureSet, TypeTraitsT, field_type, is_packed>& extension) const {
|
|
2530
|
+
return ResolvesFeaturesForImpl(extension.number());
|
|
2531
|
+
}
|
|
2532
|
+
|
|
2533
|
+
// Toggles enforcement of extension declarations.
|
|
2534
|
+
// This enforcement is disabled by default because it requires full
|
|
2535
|
+
// descriptors with source-retention options, which are generally not
|
|
2536
|
+
// available at runtime.
|
|
2537
|
+
void EnforceExtensionDeclarations(google::protobuf::ExtDeclEnforcementLevel enforce) {
|
|
2538
|
+
enforce_extension_declarations_ = enforce;
|
|
2539
|
+
}
|
|
2540
|
+
|
|
2541
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool
|
|
2542
|
+
ShouldEnforceDescriptorExtensionDeclarations() const {
|
|
2543
|
+
return enforce_extension_declarations_ ==
|
|
2544
|
+
ExtDeclEnforcementLevel::kAllExtensions;
|
|
2545
|
+
}
|
|
2546
|
+
|
|
2547
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool ShouldEnforceExtensionDeclaration(
|
|
2548
|
+
const FieldDescriptor& field) const;
|
|
2549
|
+
|
|
2550
|
+
#ifndef SWIG
|
|
2551
|
+
// Dispatch recursive builds to a callback that may stick them onto a separate
|
|
2552
|
+
// thread. This is primarily to avoid stack overflows on untrusted inputs.
|
|
2553
|
+
// The dispatcher must always synchronously execute the provided callback.
|
|
2554
|
+
// Asynchronous execution is undefined behavior.
|
|
2555
|
+
void SetRecursiveBuildDispatcher(
|
|
2556
|
+
absl::AnyInvocable<void(absl::FunctionRef<void()>) const> dispatcher) {
|
|
2557
|
+
if (dispatcher != nullptr) {
|
|
2558
|
+
dispatcher_ = std::make_unique<
|
|
2559
|
+
absl::AnyInvocable<void(absl::FunctionRef<void()>) const>>(
|
|
2560
|
+
std::move(dispatcher));
|
|
2561
|
+
} else {
|
|
2562
|
+
dispatcher_.reset(nullptr);
|
|
2563
|
+
}
|
|
2564
|
+
}
|
|
2565
|
+
#endif // SWIG
|
|
2566
|
+
|
|
2567
|
+
// Internal stuff --------------------------------------------------
|
|
2568
|
+
// These methods MUST NOT be called from outside the proto2 library.
|
|
2569
|
+
// These methods may contain hidden pitfalls and may be removed in a
|
|
2570
|
+
// future library version.
|
|
2571
|
+
|
|
2572
|
+
// Create a DescriptorPool which is overlaid on top of some other pool.
|
|
2573
|
+
// If you search for a descriptor in the overlay and it is not found, the
|
|
2574
|
+
// underlay will be searched as a backup. If the underlay has its own
|
|
2575
|
+
// underlay, that will be searched next, and so on. This also means that
|
|
2576
|
+
// files built in the overlay will be cross-linked with the underlay's
|
|
2577
|
+
// descriptors if necessary. The underlay remains property of the caller;
|
|
2578
|
+
// it must remain valid for the lifetime of the newly-constructed pool.
|
|
2579
|
+
//
|
|
2580
|
+
// Example: Say you want to parse a .proto file at runtime in order to use
|
|
2581
|
+
// its type with a DynamicMessage. Say this .proto file has dependencies,
|
|
2582
|
+
// but you know that all the dependencies will be things that are already
|
|
2583
|
+
// compiled into the binary. For ease of use, you'd like to load the types
|
|
2584
|
+
// right out of generated_pool() rather than have to parse redundant copies
|
|
2585
|
+
// of all these .protos and runtime. But, you don't want to add the parsed
|
|
2586
|
+
// types directly into generated_pool(): this is not allowed, and would be
|
|
2587
|
+
// bad design anyway. So, instead, you could use generated_pool() as an
|
|
2588
|
+
// underlay for a new DescriptorPool in which you add only the new file.
|
|
2589
|
+
//
|
|
2590
|
+
// WARNING: Use of underlays can lead to many subtle gotchas. Instead,
|
|
2591
|
+
// try to formulate what you want to do in terms of DescriptorDatabases.
|
|
2592
|
+
explicit DescriptorPool(const DescriptorPool* underlay);
|
|
2593
|
+
|
|
2594
|
+
// Called by generated classes at init time to add their descriptors to
|
|
2595
|
+
// generated_pool. Do NOT call this in your own code! filename must be a
|
|
2596
|
+
// permanent string (e.g. a string literal).
|
|
2597
|
+
static void InternalAddGeneratedFile(const void* encoded_file_descriptor,
|
|
2598
|
+
int size);
|
|
2599
|
+
|
|
2600
|
+
// Disallow [enforce_utf8 = false] in .proto files.
|
|
2601
|
+
void DisallowEnforceUtf8() { disallow_enforce_utf8_ = true; }
|
|
2602
|
+
|
|
2603
|
+
|
|
2604
|
+
// For internal use only: Gets a non-const pointer to the generated pool.
|
|
2605
|
+
// This is called at static-initialization time only, so thread-safety is
|
|
2606
|
+
// not a concern. If both an underlay and a fallback database are present,
|
|
2607
|
+
// the underlay takes precedence.
|
|
2608
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD static DescriptorPool*
|
|
2609
|
+
internal_generated_pool();
|
|
2610
|
+
|
|
2611
|
+
// For internal use only: Gets a non-const pointer to the generated
|
|
2612
|
+
// descriptor database.
|
|
2613
|
+
// Only used for testing.
|
|
2614
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD static DescriptorDatabase*
|
|
2615
|
+
internal_generated_database();
|
|
2616
|
+
|
|
2617
|
+
// For internal use only: Changes the behavior of BuildFile() such that it
|
|
2618
|
+
// allows the file to make reference to message types declared in other files
|
|
2619
|
+
// which it did not officially declare as dependencies.
|
|
2620
|
+
void InternalDontEnforceDependencies();
|
|
2621
|
+
|
|
2622
|
+
// For internal use only: Enables lazy building of dependencies of a file.
|
|
2623
|
+
// Delay the building of dependencies of a file descriptor until absolutely
|
|
2624
|
+
// necessary, like when message_type() is called on a field that is defined
|
|
2625
|
+
// in that dependency's file. This will cause functional issues if a proto
|
|
2626
|
+
// or one of its dependencies has errors. Should only be enabled for the
|
|
2627
|
+
// generated_pool_ (because no descriptor build errors are guaranteed by
|
|
2628
|
+
// the compilation generation process), testing, or if a lack of descriptor
|
|
2629
|
+
// build errors can be guaranteed for a pool.
|
|
2630
|
+
void InternalSetLazilyBuildDependencies() {
|
|
2631
|
+
lazily_build_dependencies_ = true;
|
|
2632
|
+
// This needs to be set when lazily building dependencies, as it breaks
|
|
2633
|
+
// dependency checking.
|
|
2634
|
+
InternalDontEnforceDependencies();
|
|
2635
|
+
}
|
|
2636
|
+
|
|
2637
|
+
// For internal use only.
|
|
2638
|
+
void internal_set_underlay(const DescriptorPool* underlay) {
|
|
2639
|
+
underlay_ = underlay;
|
|
2640
|
+
}
|
|
2641
|
+
|
|
2642
|
+
// For internal (unit test) use only: Returns true if a FileDescriptor has
|
|
2643
|
+
// been constructed for the given file, false otherwise. Useful for testing
|
|
2644
|
+
// lazy descriptor initialization behavior.
|
|
2645
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool InternalIsFileLoaded(
|
|
2646
|
+
absl::string_view filename) const;
|
|
2647
|
+
|
|
2648
|
+
// Add a file to to apply more strict checks to.
|
|
2649
|
+
// - unused imports will log either warnings or errors.
|
|
2650
|
+
// - deprecated features will log warnings.
|
|
2651
|
+
void AddDirectInputFile(absl::string_view file_name,
|
|
2652
|
+
bool unused_import_is_error = false);
|
|
2653
|
+
void ClearDirectInputFiles();
|
|
2654
|
+
|
|
2655
|
+
private:
|
|
2656
|
+
friend class Descriptor;
|
|
2657
|
+
friend class internal::LazyDescriptor;
|
|
2658
|
+
friend class FieldDescriptor;
|
|
2659
|
+
friend class EnumDescriptor;
|
|
2660
|
+
friend class ServiceDescriptor;
|
|
2661
|
+
friend class MethodDescriptor;
|
|
2662
|
+
friend class FileDescriptor;
|
|
2663
|
+
friend class DescriptorBuilder;
|
|
2664
|
+
friend class FileDescriptorTables;
|
|
2665
|
+
friend class google::protobuf::descriptor_unittest::DescriptorPoolMemoizationTest;
|
|
2666
|
+
friend class google::protobuf::descriptor_unittest::ValidationErrorTest;
|
|
2667
|
+
friend class ::google::protobuf::compiler::CommandLineInterface;
|
|
2668
|
+
friend class TextFormat;
|
|
2669
|
+
friend Reflection;
|
|
2670
|
+
friend class ::google::protobuf::compiler::java::MemoizeProjection;
|
|
2671
|
+
|
|
2672
|
+
struct MemoBase {
|
|
2673
|
+
virtual ~MemoBase() = default;
|
|
2674
|
+
};
|
|
2675
|
+
template <typename T>
|
|
2676
|
+
struct MemoData : MemoBase {
|
|
2677
|
+
T value;
|
|
2678
|
+
};
|
|
2679
|
+
|
|
2680
|
+
template <typename Desc>
|
|
2681
|
+
static const DescriptorPool* GetPool(const Desc* descriptor) {
|
|
2682
|
+
return descriptor->file()->pool();
|
|
2683
|
+
}
|
|
2684
|
+
|
|
2685
|
+
static const DescriptorPool* GetPool(const FileDescriptor* descriptor) {
|
|
2686
|
+
return descriptor->pool();
|
|
2687
|
+
}
|
|
2688
|
+
|
|
2689
|
+
// Memoize a projection of a descriptor. This is used to cache the results of
|
|
2690
|
+
// calling a function on a descriptor, used for expensive descriptor
|
|
2691
|
+
// calculations.
|
|
2692
|
+
template <typename Desc, typename Func>
|
|
2693
|
+
static const auto& MemoizeProjection(const Desc* descriptor, Func func) {
|
|
2694
|
+
using ResultT = std::decay_t<decltype(func(descriptor))>;
|
|
2695
|
+
auto* pool = GetPool(descriptor);
|
|
2696
|
+
static_assert(std::is_empty_v<Func> ||
|
|
2697
|
+
std::is_function_v<std::remove_pointer_t<Func>>);
|
|
2698
|
+
// This static bool is unique per-Func, so its address can be used as a key.
|
|
2699
|
+
static bool type_key;
|
|
2700
|
+
auto key = std::pair<const void*, const void*>(descriptor, &type_key);
|
|
2701
|
+
{
|
|
2702
|
+
absl::ReaderMutexLock lock(&pool->field_memo_table_mutex_);
|
|
2703
|
+
auto it = pool->field_memo_table_->find(key);
|
|
2704
|
+
if (it != pool->field_memo_table_->end()) {
|
|
2705
|
+
return internal::DownCast<const MemoData<ResultT>&>(*it->second).value;
|
|
2706
|
+
}
|
|
2707
|
+
}
|
|
2708
|
+
auto result = std::make_unique<MemoData<ResultT>>();
|
|
2709
|
+
result->value = func(descriptor);
|
|
2710
|
+
{
|
|
2711
|
+
absl::MutexLock lock(&pool->field_memo_table_mutex_);
|
|
2712
|
+
auto insert_result =
|
|
2713
|
+
pool->field_memo_table_->insert({key, std::move(result)});
|
|
2714
|
+
auto it = insert_result.first;
|
|
2715
|
+
return internal::DownCast<const MemoData<ResultT>&>(*it->second).value;
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2718
|
+
// Return true if the given name is a sub-symbol of any non-package
|
|
2719
|
+
// descriptor that already exists in the descriptor pool. (The full
|
|
2720
|
+
// definition of such types is already known.)
|
|
2721
|
+
bool IsSubSymbolOfBuiltType(absl::string_view name) const;
|
|
2722
|
+
|
|
2723
|
+
// Tries to find something in the fallback database and link in the
|
|
2724
|
+
// corresponding proto file. Returns true if successful, in which case
|
|
2725
|
+
// the caller should search for the thing again. These are declared
|
|
2726
|
+
// const because they are called by (semantically) const methods.
|
|
2727
|
+
// DeferredValidation stores temporary information necessary to run validation
|
|
2728
|
+
// checks that can't be done inside the database lock. This is generally
|
|
2729
|
+
// reflective operations that also require the lock to do safely.
|
|
2730
|
+
class DeferredValidation;
|
|
2731
|
+
bool TryFindFileInFallbackDatabase(
|
|
2732
|
+
absl::string_view name, DeferredValidation& deferred_validation) const;
|
|
2733
|
+
bool TryFindSymbolInFallbackDatabase(
|
|
2734
|
+
absl::string_view name, DeferredValidation& deferred_validation) const;
|
|
2735
|
+
bool TryFindExtensionInFallbackDatabase(
|
|
2736
|
+
const Descriptor* containing_type, int field_number,
|
|
2737
|
+
DeferredValidation& deferred_validation) const;
|
|
2738
|
+
|
|
2739
|
+
// This internal find extension method only check with its table and underlay
|
|
2740
|
+
// descriptor_pool's table. It does not check with fallback DB and no
|
|
2741
|
+
// additional proto file will be build in this method.
|
|
2742
|
+
const FieldDescriptor* InternalFindExtensionByNumberNoLock(
|
|
2743
|
+
const Descriptor* extendee, int number) const;
|
|
2744
|
+
|
|
2745
|
+
// Like BuildFile() but called internally when the file has been loaded from
|
|
2746
|
+
// fallback_database_. Declared const because it is called by (semantically)
|
|
2747
|
+
// const methods.
|
|
2748
|
+
const FileDescriptor* BuildFileFromDatabase(
|
|
2749
|
+
const FileDescriptorProto& proto,
|
|
2750
|
+
DeferredValidation& deferred_validation) const;
|
|
2751
|
+
|
|
2752
|
+
// Helper for when lazily_build_dependencies_ is set, can look up a symbol
|
|
2753
|
+
// after the file's descriptor is built, and can build the file where that
|
|
2754
|
+
// symbol is defined if necessary. Will create a placeholder if the type
|
|
2755
|
+
// doesn't exist in the fallback database, or the file doesn't build
|
|
2756
|
+
// successfully.
|
|
2757
|
+
Symbol CrossLinkOnDemandHelper(absl::string_view name,
|
|
2758
|
+
bool expecting_enum) const;
|
|
2759
|
+
|
|
2760
|
+
// Create a placeholder FileDescriptor of the specified name
|
|
2761
|
+
FileDescriptor* NewPlaceholderFile(absl::string_view name) const;
|
|
2762
|
+
FileDescriptor* NewPlaceholderFileWithMutexHeld(
|
|
2763
|
+
absl::string_view name, internal::FlatAllocator& alloc) const;
|
|
2764
|
+
|
|
2765
|
+
enum PlaceholderType {
|
|
2766
|
+
PLACEHOLDER_MESSAGE,
|
|
2767
|
+
PLACEHOLDER_ENUM,
|
|
2768
|
+
PLACEHOLDER_EXTENDABLE_MESSAGE
|
|
2769
|
+
};
|
|
2770
|
+
// Create a placeholder Descriptor of the specified name
|
|
2771
|
+
Symbol NewPlaceholder(absl::string_view name,
|
|
2772
|
+
PlaceholderType placeholder_type) const;
|
|
2773
|
+
Symbol NewPlaceholderWithMutexHeld(absl::string_view name,
|
|
2774
|
+
PlaceholderType placeholder_type) const;
|
|
2775
|
+
|
|
2776
|
+
#ifndef SWIG
|
|
2777
|
+
mutable absl::Mutex field_memo_table_mutex_;
|
|
2778
|
+
mutable std::unique_ptr<absl::flat_hash_map<
|
|
2779
|
+
std::pair<const void*, const void*>, std::unique_ptr<MemoBase>>>
|
|
2780
|
+
field_memo_table_ ABSL_GUARDED_BY(field_memo_table_mutex_) =
|
|
2781
|
+
std::make_unique<
|
|
2782
|
+
absl::flat_hash_map<std::pair<const void*, const void*>,
|
|
2783
|
+
std::unique_ptr<MemoBase>>>();
|
|
2784
|
+
#endif // SWIG
|
|
2785
|
+
|
|
2786
|
+
// If fallback_database_ is nullptr, this is nullptr. Otherwise, this is a
|
|
2787
|
+
// mutex which must be locked while accessing tables_.
|
|
2788
|
+
absl::Mutex* mutex_;
|
|
2789
|
+
|
|
2790
|
+
// See constructor.
|
|
2791
|
+
DescriptorDatabase* fallback_database_;
|
|
2792
|
+
ErrorCollector* default_error_collector_;
|
|
2793
|
+
const DescriptorPool* underlay_;
|
|
2794
|
+
|
|
2795
|
+
#ifndef SWIG
|
|
2796
|
+
// Dispatcher for recursive calls during builds.
|
|
2797
|
+
std::unique_ptr<absl::AnyInvocable<void(absl::FunctionRef<void()>) const>>
|
|
2798
|
+
dispatcher_;
|
|
2799
|
+
#endif // SWIG
|
|
2800
|
+
|
|
2801
|
+
// This class contains a lot of hash maps with complicated types that
|
|
2802
|
+
// we'd like to keep out of the header.
|
|
2803
|
+
class Tables;
|
|
2804
|
+
std::unique_ptr<Tables> tables_;
|
|
2805
|
+
|
|
2806
|
+
bool enforce_dependencies_;
|
|
2807
|
+
bool lazily_build_dependencies_;
|
|
2808
|
+
bool allow_unknown_;
|
|
2809
|
+
bool enforce_weak_;
|
|
2810
|
+
ExtDeclEnforcementLevel enforce_extension_declarations_;
|
|
2811
|
+
bool disallow_enforce_utf8_;
|
|
2812
|
+
bool deprecated_legacy_json_field_conflicts_;
|
|
2813
|
+
bool enforce_naming_style_;
|
|
2814
|
+
bool enforce_feature_support_validation_ = false;
|
|
2815
|
+
bool enforce_symbol_visibility_ = false;
|
|
2816
|
+
mutable bool build_started_ = false;
|
|
2817
|
+
|
|
2818
|
+
// Set of files to track for additional validation. The bool value when true
|
|
2819
|
+
// means unused imports are treated as errors (and as warnings when false).
|
|
2820
|
+
absl::flat_hash_map<std::string, bool> direct_input_files_;
|
|
2821
|
+
|
|
2822
|
+
// Specification of defaults to use for feature resolution. This defaults to
|
|
2823
|
+
// just the global and C++ features, but can be overridden for other runtimes.
|
|
2824
|
+
std::unique_ptr<FeatureSetDefaults> feature_set_defaults_spec_;
|
|
2825
|
+
|
|
2826
|
+
// Returns true if the field extends an option message of descriptor.proto.
|
|
2827
|
+
bool IsReadyForCheckingDescriptorExtDecl(
|
|
2828
|
+
absl::string_view message_name) const;
|
|
2829
|
+
|
|
2830
|
+
|
|
2831
|
+
bool ResolvesFeaturesForImpl(int extension_number) const;
|
|
2832
|
+
|
|
2833
|
+
const FeatureSetDefaults& GetFeatureSetDefaults() const;
|
|
2834
|
+
};
|
|
2835
|
+
|
|
2836
|
+
|
|
2837
|
+
// inline methods ====================================================
|
|
2838
|
+
|
|
2839
|
+
// These macros makes this repetitive code more readable.
|
|
2840
|
+
#define PROTOBUF_DEFINE_ACCESSOR(CLASS, FIELD, TYPE) \
|
|
2841
|
+
inline TYPE CLASS::FIELD() const { return FIELD##_; }
|
|
2842
|
+
|
|
2843
|
+
// Strings fields are stored as pointers but returned as const references.
|
|
2844
|
+
#define PROTOBUF_DEFINE_STRING_ACCESSOR(CLASS, FIELD) \
|
|
2845
|
+
inline absl::string_view CLASS::FIELD() const { return *FIELD##_; }
|
|
2846
|
+
|
|
2847
|
+
// Name and full name are stored in a single array to save space.
|
|
2848
|
+
#define PROTOBUF_DEFINE_NAME_ACCESSOR(CLASS) \
|
|
2849
|
+
inline absl::string_view CLASS::name() const { return all_names_.name(); } \
|
|
2850
|
+
inline absl::string_view CLASS::full_name() const { \
|
|
2851
|
+
return all_names_.full_name(); \
|
|
2852
|
+
}
|
|
2853
|
+
|
|
2854
|
+
// Arrays take an index parameter, obviously.
|
|
2855
|
+
#define PROTOBUF_DEFINE_ARRAY_ACCESSOR(CLASS, FIELD, TYPE) \
|
|
2856
|
+
inline TYPE CLASS::FIELD(int index) const { \
|
|
2857
|
+
ABSL_DCHECK_LE(0, index); \
|
|
2858
|
+
ABSL_DCHECK_LT(index, FIELD##_count()); \
|
|
2859
|
+
return FIELD##s_ + index; \
|
|
2860
|
+
}
|
|
2861
|
+
|
|
2862
|
+
#define PROTOBUF_DEFINE_OPTIONS_ACCESSOR(CLASS, TYPE) \
|
|
2863
|
+
inline const TYPE& CLASS::options() const { return *options_; }
|
|
2864
|
+
|
|
2865
|
+
PROTOBUF_DEFINE_NAME_ACCESSOR(Descriptor)
|
|
2866
|
+
PROTOBUF_DEFINE_ACCESSOR(Descriptor, file, const FileDescriptor*)
|
|
2867
|
+
PROTOBUF_DEFINE_ACCESSOR(Descriptor, containing_type, const Descriptor*)
|
|
2868
|
+
|
|
2869
|
+
PROTOBUF_DEFINE_ACCESSOR(Descriptor, field_count, int)
|
|
2870
|
+
PROTOBUF_DEFINE_ACCESSOR(Descriptor, oneof_decl_count, int)
|
|
2871
|
+
PROTOBUF_DEFINE_ACCESSOR(Descriptor, real_oneof_decl_count, int)
|
|
2872
|
+
PROTOBUF_DEFINE_ACCESSOR(Descriptor, nested_type_count, int)
|
|
2873
|
+
PROTOBUF_DEFINE_ACCESSOR(Descriptor, enum_type_count, int)
|
|
2874
|
+
|
|
2875
|
+
PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, field, const FieldDescriptor*)
|
|
2876
|
+
PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, oneof_decl, const OneofDescriptor*)
|
|
2877
|
+
PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, nested_type, const Descriptor*)
|
|
2878
|
+
PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, enum_type, const EnumDescriptor*)
|
|
2879
|
+
inline const OneofDescriptor* Descriptor::real_oneof_decl(int index) const {
|
|
2880
|
+
ABSL_DCHECK(index < real_oneof_decl_count());
|
|
2881
|
+
return oneof_decl(index);
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2884
|
+
PROTOBUF_DEFINE_ACCESSOR(Descriptor, extension_range_count, int)
|
|
2885
|
+
PROTOBUF_DEFINE_ACCESSOR(Descriptor, extension_count, int)
|
|
2886
|
+
PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, extension_range,
|
|
2887
|
+
const Descriptor::ExtensionRange*)
|
|
2888
|
+
PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, extension, const FieldDescriptor*)
|
|
2889
|
+
|
|
2890
|
+
PROTOBUF_DEFINE_ACCESSOR(Descriptor, reserved_range_count, int)
|
|
2891
|
+
PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, reserved_range,
|
|
2892
|
+
const Descriptor::ReservedRange*)
|
|
2893
|
+
PROTOBUF_DEFINE_ACCESSOR(Descriptor, reserved_name_count, int)
|
|
2894
|
+
|
|
2895
|
+
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(Descriptor, MessageOptions)
|
|
2896
|
+
PROTOBUF_DEFINE_ACCESSOR(Descriptor, is_placeholder, bool)
|
|
2897
|
+
|
|
2898
|
+
PROTOBUF_DEFINE_NAME_ACCESSOR(FieldDescriptor)
|
|
2899
|
+
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, file, const FileDescriptor*)
|
|
2900
|
+
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, number, int)
|
|
2901
|
+
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, is_extension, bool)
|
|
2902
|
+
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, containing_type, const Descriptor*)
|
|
2903
|
+
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(FieldDescriptor, FieldOptions)
|
|
2904
|
+
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, has_default_value, bool)
|
|
2905
|
+
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, has_json_name, bool)
|
|
2906
|
+
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_int32_t, int32_t)
|
|
2907
|
+
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_int64_t, int64_t)
|
|
2908
|
+
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_uint32_t, uint32_t)
|
|
2909
|
+
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_uint64_t, uint64_t)
|
|
2910
|
+
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_float, float)
|
|
2911
|
+
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_double, double)
|
|
2912
|
+
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_bool, bool)
|
|
2913
|
+
PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, default_value_string)
|
|
2914
|
+
|
|
2915
|
+
PROTOBUF_DEFINE_NAME_ACCESSOR(OneofDescriptor)
|
|
2916
|
+
PROTOBUF_DEFINE_ACCESSOR(OneofDescriptor, containing_type, const Descriptor*)
|
|
2917
|
+
PROTOBUF_DEFINE_ACCESSOR(OneofDescriptor, field_count, int)
|
|
2918
|
+
PROTOBUF_DEFINE_ARRAY_ACCESSOR(OneofDescriptor, field, const FieldDescriptor*)
|
|
2919
|
+
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(OneofDescriptor, OneofOptions)
|
|
2920
|
+
|
|
2921
|
+
PROTOBUF_DEFINE_NAME_ACCESSOR(EnumDescriptor)
|
|
2922
|
+
PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, file, const FileDescriptor*)
|
|
2923
|
+
PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, containing_type, const Descriptor*)
|
|
2924
|
+
PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, value_count, int)
|
|
2925
|
+
PROTOBUF_DEFINE_ARRAY_ACCESSOR(EnumDescriptor, value,
|
|
2926
|
+
const EnumValueDescriptor*)
|
|
2927
|
+
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(EnumDescriptor, EnumOptions)
|
|
2928
|
+
PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, is_placeholder, bool)
|
|
2929
|
+
PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, reserved_range_count, int)
|
|
2930
|
+
PROTOBUF_DEFINE_ARRAY_ACCESSOR(EnumDescriptor, reserved_range,
|
|
2931
|
+
const EnumDescriptor::ReservedRange*)
|
|
2932
|
+
PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, reserved_name_count, int)
|
|
2933
|
+
|
|
2934
|
+
inline absl::string_view EnumValueDescriptor::name() const {
|
|
2935
|
+
return all_names_[0];
|
|
2936
|
+
}
|
|
2937
|
+
inline absl::string_view EnumValueDescriptor::full_name() const {
|
|
2938
|
+
return all_names_[1];
|
|
2939
|
+
}
|
|
2940
|
+
PROTOBUF_DEFINE_ACCESSOR(EnumValueDescriptor, number, int)
|
|
2941
|
+
PROTOBUF_DEFINE_ACCESSOR(EnumValueDescriptor, type, const EnumDescriptor*)
|
|
2942
|
+
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(EnumValueDescriptor, EnumValueOptions)
|
|
2943
|
+
|
|
2944
|
+
PROTOBUF_DEFINE_NAME_ACCESSOR(ServiceDescriptor)
|
|
2945
|
+
PROTOBUF_DEFINE_ACCESSOR(ServiceDescriptor, file, const FileDescriptor*)
|
|
2946
|
+
PROTOBUF_DEFINE_ACCESSOR(ServiceDescriptor, method_count, int)
|
|
2947
|
+
PROTOBUF_DEFINE_ARRAY_ACCESSOR(ServiceDescriptor, method,
|
|
2948
|
+
const MethodDescriptor*)
|
|
2949
|
+
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(ServiceDescriptor, ServiceOptions)
|
|
2950
|
+
|
|
2951
|
+
PROTOBUF_DEFINE_NAME_ACCESSOR(MethodDescriptor)
|
|
2952
|
+
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, service, const ServiceDescriptor*)
|
|
2953
|
+
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(MethodDescriptor, MethodOptions)
|
|
2954
|
+
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, client_streaming, bool)
|
|
2955
|
+
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, server_streaming, bool)
|
|
2956
|
+
|
|
2957
|
+
PROTOBUF_DEFINE_STRING_ACCESSOR(FileDescriptor, name)
|
|
2958
|
+
PROTOBUF_DEFINE_STRING_ACCESSOR(FileDescriptor, package)
|
|
2959
|
+
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, pool, const DescriptorPool*)
|
|
2960
|
+
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, dependency_count, int)
|
|
2961
|
+
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, public_dependency_count, int)
|
|
2962
|
+
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, weak_dependency_count, int)
|
|
2963
|
+
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, option_dependency_count, int)
|
|
2964
|
+
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, message_type_count, int)
|
|
2965
|
+
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, enum_type_count, int)
|
|
2966
|
+
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, service_count, int)
|
|
2967
|
+
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, extension_count, int)
|
|
2968
|
+
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(FileDescriptor, FileOptions)
|
|
2969
|
+
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, is_placeholder, bool)
|
|
2970
|
+
|
|
2971
|
+
PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, message_type, const Descriptor*)
|
|
2972
|
+
PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, enum_type, const EnumDescriptor*)
|
|
2973
|
+
PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, service,
|
|
2974
|
+
const ServiceDescriptor*)
|
|
2975
|
+
PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, extension,
|
|
2976
|
+
const FieldDescriptor*)
|
|
2977
|
+
|
|
2978
|
+
#undef PROTOBUF_DEFINE_ACCESSOR
|
|
2979
|
+
#undef PROTOBUF_DEFINE_STRING_ACCESSOR
|
|
2980
|
+
#undef PROTOBUF_DEFINE_ARRAY_ACCESSOR
|
|
2981
|
+
|
|
2982
|
+
// A few accessors differ from the macros...
|
|
2983
|
+
|
|
2984
|
+
inline Descriptor::WellKnownType Descriptor::well_known_type() const {
|
|
2985
|
+
return static_cast<Descriptor::WellKnownType>(well_known_type_);
|
|
2986
|
+
}
|
|
2987
|
+
|
|
2988
|
+
inline bool Descriptor::IsExtensionNumber(int number) const {
|
|
2989
|
+
return FindExtensionRangeContainingNumber(number) != nullptr;
|
|
2990
|
+
}
|
|
2991
|
+
|
|
2992
|
+
inline bool Descriptor::IsReservedNumber(int number) const {
|
|
2993
|
+
return FindReservedRangeContainingNumber(number) != nullptr;
|
|
2994
|
+
}
|
|
2995
|
+
|
|
2996
|
+
inline bool Descriptor::IsReservedName(absl::string_view name) const {
|
|
2997
|
+
for (int i = 0; i < reserved_name_count(); i++) {
|
|
2998
|
+
if (name == static_cast<absl::string_view>(reserved_name(i))) {
|
|
2999
|
+
return true;
|
|
3000
|
+
}
|
|
3001
|
+
}
|
|
3002
|
+
return false;
|
|
3003
|
+
}
|
|
3004
|
+
|
|
3005
|
+
// Can't use PROTOBUF_DEFINE_ARRAY_ACCESSOR because reserved_names_ is actually
|
|
3006
|
+
// an array of pointers rather than the usual array of objects.
|
|
3007
|
+
inline absl::string_view Descriptor::reserved_name(int index) const {
|
|
3008
|
+
return *reserved_names_[index];
|
|
3009
|
+
}
|
|
3010
|
+
|
|
3011
|
+
inline bool EnumDescriptor::IsReservedNumber(int number) const {
|
|
3012
|
+
return FindReservedRangeContainingNumber(number) != nullptr;
|
|
3013
|
+
}
|
|
3014
|
+
|
|
3015
|
+
inline bool EnumDescriptor::IsReservedName(absl::string_view name) const {
|
|
3016
|
+
for (int i = 0; i < reserved_name_count(); i++) {
|
|
3017
|
+
if (name == static_cast<absl::string_view>(reserved_name(i))) {
|
|
3018
|
+
return true;
|
|
3019
|
+
}
|
|
3020
|
+
}
|
|
3021
|
+
return false;
|
|
3022
|
+
}
|
|
3023
|
+
|
|
3024
|
+
// Can't use PROTOBUF_DEFINE_ARRAY_ACCESSOR because reserved_names_ is actually
|
|
3025
|
+
// an array of pointers rather than the usual array of objects.
|
|
3026
|
+
inline absl::string_view EnumDescriptor::reserved_name(int index) const {
|
|
3027
|
+
return *reserved_names_[index];
|
|
3028
|
+
}
|
|
3029
|
+
|
|
3030
|
+
inline absl::string_view FieldDescriptor::lowercase_name() const {
|
|
3031
|
+
return all_names_.lowercase_name();
|
|
3032
|
+
}
|
|
3033
|
+
|
|
3034
|
+
inline absl::string_view FieldDescriptor::camelcase_name() const {
|
|
3035
|
+
return all_names_.camelcase_name();
|
|
3036
|
+
}
|
|
3037
|
+
|
|
3038
|
+
inline absl::string_view FieldDescriptor::json_name() const {
|
|
3039
|
+
return all_names_.json_name();
|
|
3040
|
+
}
|
|
3041
|
+
|
|
3042
|
+
inline const OneofDescriptor* FieldDescriptor::containing_oneof() const {
|
|
3043
|
+
if (is_oneof_) {
|
|
3044
|
+
auto* res = scope_.containing_oneof;
|
|
3045
|
+
PROTOBUF_ASSUME(res != nullptr);
|
|
3046
|
+
return res;
|
|
3047
|
+
}
|
|
3048
|
+
return nullptr;
|
|
3049
|
+
}
|
|
3050
|
+
|
|
3051
|
+
inline int FieldDescriptor::index_in_oneof() const {
|
|
3052
|
+
ABSL_DCHECK(is_oneof_);
|
|
3053
|
+
return static_cast<int>(this - scope_.containing_oneof->field(0));
|
|
3054
|
+
}
|
|
3055
|
+
|
|
3056
|
+
inline const Descriptor* FieldDescriptor::extension_scope() const {
|
|
3057
|
+
ABSL_CHECK(is_extension_);
|
|
3058
|
+
return scope_.extension_scope;
|
|
3059
|
+
}
|
|
3060
|
+
|
|
3061
|
+
inline FieldDescriptor::Type FieldDescriptor::type() const {
|
|
3062
|
+
return static_cast<Type>(type_);
|
|
3063
|
+
}
|
|
3064
|
+
|
|
3065
|
+
inline FieldDescriptor::CppStringType FieldDescriptor::cpp_string_type() const {
|
|
3066
|
+
ABSL_DCHECK_EQ(cpp_string_type_,
|
|
3067
|
+
static_cast<uint8_t>(CalculateCppStringType()));
|
|
3068
|
+
return static_cast<FieldDescriptor::CppStringType>(cpp_string_type_);
|
|
3069
|
+
}
|
|
3070
|
+
|
|
3071
|
+
inline bool FieldDescriptor::is_repeated() const {
|
|
3072
|
+
ABSL_DCHECK_EQ(is_repeated_, static_cast<Label>(label_) == LABEL_REPEATED);
|
|
3073
|
+
return is_repeated_;
|
|
3074
|
+
}
|
|
3075
|
+
|
|
3076
|
+
inline bool FieldDescriptor::is_packable() const {
|
|
3077
|
+
return is_repeated() && IsTypePackable(type());
|
|
3078
|
+
}
|
|
3079
|
+
|
|
3080
|
+
inline bool FieldDescriptor::is_map() const {
|
|
3081
|
+
ABSL_DCHECK_EQ(is_map_, type() == TYPE_MESSAGE && is_map_message_type());
|
|
3082
|
+
return is_map_;
|
|
3083
|
+
}
|
|
3084
|
+
|
|
3085
|
+
inline const OneofDescriptor* FieldDescriptor::real_containing_oneof() const {
|
|
3086
|
+
if (in_real_oneof_) {
|
|
3087
|
+
auto* res = containing_oneof();
|
|
3088
|
+
PROTOBUF_ASSUME(res != nullptr);
|
|
3089
|
+
ABSL_DCHECK(!res->is_synthetic());
|
|
3090
|
+
return res;
|
|
3091
|
+
}
|
|
3092
|
+
return nullptr;
|
|
3093
|
+
}
|
|
3094
|
+
|
|
3095
|
+
// To save space, index() is computed by looking at the descriptor's position
|
|
3096
|
+
// in the parent's array of children.
|
|
3097
|
+
inline int FieldDescriptor::index() const {
|
|
3098
|
+
if (!is_extension_) {
|
|
3099
|
+
return static_cast<int>(this - containing_type()->fields_);
|
|
3100
|
+
} else if (extension_scope() != nullptr) {
|
|
3101
|
+
return static_cast<int>(this - extension_scope()->extensions_);
|
|
3102
|
+
} else {
|
|
3103
|
+
return static_cast<int>(this - file_->extensions_);
|
|
3104
|
+
}
|
|
3105
|
+
}
|
|
3106
|
+
|
|
3107
|
+
inline int Descriptor::index() const {
|
|
3108
|
+
if (containing_type_ == nullptr) {
|
|
3109
|
+
return static_cast<int>(this - file_->message_types_);
|
|
3110
|
+
} else {
|
|
3111
|
+
return static_cast<int>(this - containing_type_->nested_types_);
|
|
3112
|
+
}
|
|
3113
|
+
}
|
|
3114
|
+
|
|
3115
|
+
inline int Descriptor::ExtensionRange::index() const {
|
|
3116
|
+
return static_cast<int>(this - containing_type_->extension_ranges_);
|
|
3117
|
+
}
|
|
3118
|
+
|
|
3119
|
+
inline const FileDescriptor* OneofDescriptor::file() const {
|
|
3120
|
+
return containing_type()->file();
|
|
3121
|
+
}
|
|
3122
|
+
|
|
3123
|
+
inline int OneofDescriptor::index() const {
|
|
3124
|
+
return static_cast<int>(this - containing_type_->oneof_decls_);
|
|
3125
|
+
}
|
|
3126
|
+
|
|
3127
|
+
inline bool OneofDescriptor::is_synthetic() const {
|
|
3128
|
+
return field_count() == 1 && field(0)->proto3_optional_;
|
|
3129
|
+
}
|
|
3130
|
+
|
|
3131
|
+
inline int EnumDescriptor::index() const {
|
|
3132
|
+
if (containing_type_ == nullptr) {
|
|
3133
|
+
return static_cast<int>(this - file_->enum_types_);
|
|
3134
|
+
} else {
|
|
3135
|
+
return static_cast<int>(this - containing_type_->enum_types_);
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3138
|
+
|
|
3139
|
+
inline const FileDescriptor* EnumValueDescriptor::file() const {
|
|
3140
|
+
return type()->file();
|
|
3141
|
+
}
|
|
3142
|
+
|
|
3143
|
+
inline int EnumValueDescriptor::index() const {
|
|
3144
|
+
return static_cast<int>(this - type_->values_);
|
|
3145
|
+
}
|
|
3146
|
+
|
|
3147
|
+
inline int ServiceDescriptor::index() const {
|
|
3148
|
+
return static_cast<int>(this - file_->services_);
|
|
3149
|
+
}
|
|
3150
|
+
|
|
3151
|
+
inline const FileDescriptor* MethodDescriptor::file() const {
|
|
3152
|
+
return service()->file();
|
|
3153
|
+
}
|
|
3154
|
+
|
|
3155
|
+
inline int MethodDescriptor::index() const {
|
|
3156
|
+
return static_cast<int>(this - service_->methods_);
|
|
3157
|
+
}
|
|
3158
|
+
|
|
3159
|
+
inline absl::string_view FieldDescriptor::type_name() const {
|
|
3160
|
+
return kTypeToName[type()];
|
|
3161
|
+
}
|
|
3162
|
+
|
|
3163
|
+
inline FieldDescriptor::CppType FieldDescriptor::cpp_type() const {
|
|
3164
|
+
return kTypeToCppTypeMap[type()];
|
|
3165
|
+
}
|
|
3166
|
+
|
|
3167
|
+
inline absl::string_view FieldDescriptor::cpp_type_name() const {
|
|
3168
|
+
return kCppTypeToName[kTypeToCppTypeMap[type()]];
|
|
3169
|
+
}
|
|
3170
|
+
|
|
3171
|
+
inline FieldDescriptor::CppType FieldDescriptor::TypeToCppType(Type type) {
|
|
3172
|
+
return kTypeToCppTypeMap[type];
|
|
3173
|
+
}
|
|
3174
|
+
|
|
3175
|
+
inline absl::string_view FieldDescriptor::TypeName(Type type) {
|
|
3176
|
+
return kTypeToName[type];
|
|
3177
|
+
}
|
|
3178
|
+
|
|
3179
|
+
inline absl::string_view FieldDescriptor::CppTypeName(CppType cpp_type) {
|
|
3180
|
+
return kCppTypeToName[cpp_type];
|
|
3181
|
+
}
|
|
3182
|
+
|
|
3183
|
+
inline bool FieldDescriptor::IsTypePackable(Type field_type) {
|
|
3184
|
+
return (field_type != FieldDescriptor::TYPE_STRING &&
|
|
3185
|
+
field_type != FieldDescriptor::TYPE_GROUP &&
|
|
3186
|
+
field_type != FieldDescriptor::TYPE_MESSAGE &&
|
|
3187
|
+
field_type != FieldDescriptor::TYPE_BYTES);
|
|
3188
|
+
}
|
|
3189
|
+
|
|
3190
|
+
inline const FileDescriptor* FileDescriptor::public_dependency(
|
|
3191
|
+
int index) const {
|
|
3192
|
+
return dependency(public_dependencies_[index]);
|
|
3193
|
+
}
|
|
3194
|
+
|
|
3195
|
+
inline const FileDescriptor* FileDescriptor::weak_dependency(int index) const {
|
|
3196
|
+
return dependency(weak_dependencies_[index]);
|
|
3197
|
+
}
|
|
3198
|
+
|
|
3199
|
+
// BitField handling of SymbolVisibility in message/enum
|
|
3200
|
+
inline SymbolVisibility Descriptor::visibility_keyword() const {
|
|
3201
|
+
return static_cast<SymbolVisibility>(visibility_);
|
|
3202
|
+
}
|
|
3203
|
+
|
|
3204
|
+
inline SymbolVisibility EnumDescriptor::visibility_keyword() const {
|
|
3205
|
+
return static_cast<SymbolVisibility>(visibility_);
|
|
3206
|
+
}
|
|
3207
|
+
|
|
3208
|
+
namespace internal {
|
|
3209
|
+
|
|
3210
|
+
inline const std::string& DefaultValueStringAsString(
|
|
3211
|
+
const FieldDescriptor* field) {
|
|
3212
|
+
return *field->default_value_string_;
|
|
3213
|
+
}
|
|
3214
|
+
|
|
3215
|
+
inline const std::string& NameOfEnumAsString(
|
|
3216
|
+
const EnumValueDescriptor* descriptor) {
|
|
3217
|
+
return descriptor->all_names_[0];
|
|
3218
|
+
}
|
|
3219
|
+
|
|
3220
|
+
inline bool IsEnumFullySequential(const EnumDescriptor* enum_desc) {
|
|
3221
|
+
return enum_desc->sequential_value_limit_ == enum_desc->value_count() - 1;
|
|
3222
|
+
}
|
|
3223
|
+
|
|
3224
|
+
// FieldRange(desc) provides an iterable range for the fields of a
|
|
3225
|
+
// descriptor type, appropriate for range-for loops.
|
|
3226
|
+
|
|
3227
|
+
template <typename T>
|
|
3228
|
+
struct FieldRangeImpl;
|
|
3229
|
+
|
|
3230
|
+
template <typename T>
|
|
3231
|
+
FieldRangeImpl<T> FieldRange(const T* desc) {
|
|
3232
|
+
return {desc};
|
|
3233
|
+
}
|
|
3234
|
+
|
|
3235
|
+
template <typename T>
|
|
3236
|
+
struct PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldRangeImpl {
|
|
3237
|
+
struct Iterator {
|
|
3238
|
+
using iterator_category = std::forward_iterator_tag;
|
|
3239
|
+
using value_type = const FieldDescriptor*;
|
|
3240
|
+
using difference_type = int;
|
|
3241
|
+
using pointer = const FieldDescriptor* const*;
|
|
3242
|
+
using reference = const FieldDescriptor* const&;
|
|
3243
|
+
|
|
3244
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD value_type operator*() {
|
|
3245
|
+
return descriptor->field(idx);
|
|
3246
|
+
}
|
|
3247
|
+
|
|
3248
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD friend bool operator==(
|
|
3249
|
+
const Iterator& a, const Iterator& b) {
|
|
3250
|
+
ABSL_DCHECK(a.descriptor == b.descriptor);
|
|
3251
|
+
return a.idx == b.idx;
|
|
3252
|
+
}
|
|
3253
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD friend bool operator!=(
|
|
3254
|
+
const Iterator& a, const Iterator& b) {
|
|
3255
|
+
return !(a == b);
|
|
3256
|
+
}
|
|
3257
|
+
|
|
3258
|
+
Iterator& operator++() {
|
|
3259
|
+
idx++;
|
|
3260
|
+
return *this;
|
|
3261
|
+
}
|
|
3262
|
+
|
|
3263
|
+
int idx;
|
|
3264
|
+
const T* descriptor;
|
|
3265
|
+
};
|
|
3266
|
+
|
|
3267
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD Iterator begin() const {
|
|
3268
|
+
return {0, descriptor};
|
|
3269
|
+
}
|
|
3270
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD Iterator end() const {
|
|
3271
|
+
return {descriptor->field_count(), descriptor};
|
|
3272
|
+
}
|
|
3273
|
+
|
|
3274
|
+
const T* descriptor;
|
|
3275
|
+
};
|
|
3276
|
+
|
|
3277
|
+
// While building descriptors, we need to avoid using MergeFrom()/CopyFrom() to
|
|
3278
|
+
// be -fno-rtti friendly. Without RTTI, MergeFrom() and CopyFrom() will fallback
|
|
3279
|
+
// to the reflection based method, which requires the Descriptor. However, while
|
|
3280
|
+
// building the descriptors, this causes deadlock. We also must disable lazy
|
|
3281
|
+
// parsing because that uses reflection to verify consistency.
|
|
3282
|
+
bool ParseNoReflection(absl::string_view from, google::protobuf::MessageLite& to);
|
|
3283
|
+
|
|
3284
|
+
// The context for these functions under `cpp` is "for the C++ implementation".
|
|
3285
|
+
// In particular, questions like "does this field have a has bit?" have a
|
|
3286
|
+
// different answer depending on the language.
|
|
3287
|
+
namespace cpp {
|
|
3288
|
+
|
|
3289
|
+
// The maximum allowed nesting for message declarations.
|
|
3290
|
+
// Going over this limit will make the proto definition invalid.
|
|
3291
|
+
constexpr int MaxMessageDeclarationNestingDepth() { return 32; }
|
|
3292
|
+
|
|
3293
|
+
// Returns true if 'enum' semantics are such that unknown values are preserved
|
|
3294
|
+
// in the enum field itself, rather than going to the UnknownFieldSet.
|
|
3295
|
+
PROTOBUF_EXPORT bool HasPreservingUnknownEnumSemantics(
|
|
3296
|
+
const FieldDescriptor* field);
|
|
3297
|
+
|
|
3298
|
+
#ifndef SWIG
|
|
3299
|
+
enum class HasbitMode : uint8_t {
|
|
3300
|
+
// Hasbits do not exist for the field.
|
|
3301
|
+
kNoHasbit,
|
|
3302
|
+
// Hasbits exist and indicate field presence.
|
|
3303
|
+
// Hasbit is set if and only if field is present.
|
|
3304
|
+
kTrueHasbit,
|
|
3305
|
+
// Hasbits exist and "hint at" field presence.
|
|
3306
|
+
// When hasbit is set, field is 'probably' present, but field accessors must
|
|
3307
|
+
// still check for field presence (i.e. false positives are possible).
|
|
3308
|
+
// When hasbit is unset, field is guaranteed to be not present.
|
|
3309
|
+
kHintHasbit,
|
|
3310
|
+
};
|
|
3311
|
+
|
|
3312
|
+
// Returns the "hasbit mode" of the field. Depending on the implementation, a
|
|
3313
|
+
// field can:
|
|
3314
|
+
// - have no hasbits in its internal object (kNoHasbit);
|
|
3315
|
+
// - have hasbits where hasbit == 1 indicates field presence and hasbit == 0
|
|
3316
|
+
// indicates an unset field (kTrueHasbit);
|
|
3317
|
+
// - have hasbits where hasbit == 1 indicates "field is possibly modified" and
|
|
3318
|
+
// hasbit == 0 indicates "field is definitely missing" (kHintHasbit).
|
|
3319
|
+
//
|
|
3320
|
+
// Note that this may not match the hasbit mode chosen by the compiler, which
|
|
3321
|
+
// may be influenced by other factors like PDProto profiles.
|
|
3322
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD
|
|
3323
|
+
PROTOBUF_EXPORT HasbitMode
|
|
3324
|
+
GetFieldHasbitModeWithoutProfile(const FieldDescriptor* field);
|
|
3325
|
+
|
|
3326
|
+
// Returns true if there are hasbits for the field.
|
|
3327
|
+
// Note that this does not correlate with "hazzer"s, i.e., whether has_foo APIs
|
|
3328
|
+
// are emitted.
|
|
3329
|
+
//
|
|
3330
|
+
// Note that this may not match the hasbit mode chosen by the compiler, which
|
|
3331
|
+
// may be influenced by other factors like PDProto profiles.
|
|
3332
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD
|
|
3333
|
+
PROTOBUF_EXPORT bool HasHasbitWithoutProfile(const FieldDescriptor* field);
|
|
3334
|
+
|
|
3335
|
+
enum class Utf8CheckMode : uint8_t {
|
|
3336
|
+
kStrict = 0, // Parsing will fail if non UTF-8 data is in string fields.
|
|
3337
|
+
kNone = 2, // No UTF-8 check.
|
|
3338
|
+
};
|
|
3339
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD
|
|
3340
|
+
PROTOBUF_EXPORT Utf8CheckMode GetUtf8CheckMode(const FieldDescriptor* field,
|
|
3341
|
+
bool is_lite);
|
|
3342
|
+
|
|
3343
|
+
// Returns true if the field is a "group-like field" consistent with a proto2
|
|
3344
|
+
// group:
|
|
3345
|
+
// - Message encoding is DELIMITED (synonymous with type TYPE_GROUP)
|
|
3346
|
+
// - Field name is exactly the message name lowercased
|
|
3347
|
+
// - Message is defined within the same scope as the field
|
|
3348
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD
|
|
3349
|
+
PROTOBUF_EXPORT bool IsGroupLike(const FieldDescriptor& field);
|
|
3350
|
+
|
|
3351
|
+
// Returns whether or not this file is lazily initialized rather than
|
|
3352
|
+
// pre-main via static initialization. This has to be done for our bootstrapped
|
|
3353
|
+
// protos to avoid linker bloat in lite runtimes.
|
|
3354
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD
|
|
3355
|
+
PROTOBUF_EXPORT bool IsLazilyInitializedFile(absl::string_view filename);
|
|
3356
|
+
|
|
3357
|
+
// Returns true during internal calls that should avoid calling trackers. These
|
|
3358
|
+
// calls can be particularly dangerous during build steps like feature
|
|
3359
|
+
// resolution, where a MergeFrom call can wind up in a deadlock.
|
|
3360
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD
|
|
3361
|
+
PROTOBUF_EXPORT inline bool& IsTrackingEnabledVar() {
|
|
3362
|
+
static PROTOBUF_THREAD_LOCAL bool is_tracking_enabled = true;
|
|
3363
|
+
return is_tracking_enabled;
|
|
3364
|
+
}
|
|
3365
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD
|
|
3366
|
+
PROTOBUF_EXPORT inline bool IsTrackingEnabled() {
|
|
3367
|
+
return ABSL_PREDICT_TRUE(IsTrackingEnabledVar());
|
|
3368
|
+
}
|
|
3369
|
+
|
|
3370
|
+
template <typename F>
|
|
3371
|
+
auto VisitDescriptorsInFileOrder(const Descriptor* desc, F& f)
|
|
3372
|
+
-> decltype(f(desc)) {
|
|
3373
|
+
for (int i = 0; i < desc->nested_type_count(); i++) {
|
|
3374
|
+
if (auto res = VisitDescriptorsInFileOrder(desc->nested_type(i), f)) {
|
|
3375
|
+
return res;
|
|
3376
|
+
}
|
|
3377
|
+
}
|
|
3378
|
+
if (auto res = f(desc)) return res;
|
|
3379
|
+
return {};
|
|
3380
|
+
}
|
|
3381
|
+
|
|
3382
|
+
// Visit the messages in post-order traversal.
|
|
3383
|
+
// We need several pieces of code to follow the same order because we use the
|
|
3384
|
+
// index of types during array lookups.
|
|
3385
|
+
// If any call returns a "truthy" value, it stops visitation and returns that
|
|
3386
|
+
// value right away. Otherwise returns `{}` after visiting all types.
|
|
3387
|
+
template <typename F>
|
|
3388
|
+
auto VisitDescriptorsInFileOrder(const FileDescriptor* file, F f)
|
|
3389
|
+
-> decltype(f(file->message_type(0))) {
|
|
3390
|
+
for (int i = 0; i < file->message_type_count(); i++) {
|
|
3391
|
+
if (auto res = VisitDescriptorsInFileOrder(file->message_type(i), f)) {
|
|
3392
|
+
return res;
|
|
3393
|
+
}
|
|
3394
|
+
}
|
|
3395
|
+
return {};
|
|
3396
|
+
}
|
|
3397
|
+
#endif // !SWIG
|
|
3398
|
+
|
|
3399
|
+
// Whether the given string field should have the accessors be privatized due
|
|
3400
|
+
// to it being an unsupported type. If this returns true, cpp_string_type()
|
|
3401
|
+
// returns kString for the storage, the C++ Generator will not generate
|
|
3402
|
+
// public accessors for the type, but the field will sill be accessible via
|
|
3403
|
+
// reflection.
|
|
3404
|
+
PROTOBUF_FUTURE_ADD_EARLY_NODISCARD
|
|
3405
|
+
PROTOBUF_EXPORT bool IsStringFieldWithPrivatizedAccessors(
|
|
3406
|
+
const FieldDescriptor& field);
|
|
3407
|
+
|
|
3408
|
+
} // namespace cpp
|
|
3409
|
+
} // namespace internal
|
|
3410
|
+
|
|
3411
|
+
} // namespace protobuf
|
|
3412
|
+
} // namespace google
|
|
3413
|
+
|
|
3414
|
+
#undef PROTOBUF_INTERNAL_CHECK_CLASS_SIZE
|
|
3415
|
+
#include "google/protobuf/port_undef.inc"
|
|
3416
|
+
|
|
3417
|
+
#endif // GOOGLE_PROTOBUF_DESCRIPTOR_H__
|