/proc/self/cwd/eval/public/cel_value_internal.h
Line | Count | Source |
1 | | /* |
2 | | * Copyright 2018 Google LLC |
3 | | * |
4 | | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | | * you may not use this file except in compliance with the License. |
6 | | * You may obtain a copy of the License at |
7 | | * |
8 | | * http://www.apache.org/licenses/LICENSE-2.0 |
9 | | * |
10 | | * Unless required by applicable law or agreed to in writing, software |
11 | | * distributed under the License is distributed on an "AS IS" BASIS, |
12 | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | | * See the License for the specific language governing permissions and |
14 | | * limitations under the License. |
15 | | */ |
16 | | |
17 | | #ifndef THIRD_PARTY_CEL_CPP_EVAL_PUBLIC_CEL_VALUE_INTERNAL_H_ |
18 | | #define THIRD_PARTY_CEL_CPP_EVAL_PUBLIC_CEL_VALUE_INTERNAL_H_ |
19 | | |
20 | | #include <utility> |
21 | | |
22 | | #include "absl/base/macros.h" |
23 | | #include "absl/types/variant.h" |
24 | | #include "eval/public/message_wrapper.h" |
25 | | #include "google/protobuf/message.h" |
26 | | |
27 | | namespace google::api::expr::runtime::internal { |
28 | | |
29 | | // Helper classes needed for IndexOf metafunction implementation. |
30 | | template <int N, bool> |
31 | | struct IndexDef {}; |
32 | | |
33 | | // This partial IndexDef type specialization provides additional constant |
34 | | // "value", associated with the type. |
35 | | template <int N> |
36 | | struct IndexDef<N, true> { |
37 | | static constexpr int value = N; |
38 | | }; |
39 | | |
40 | | // TypeIndexer is a template class, representing metafunction to find the index |
41 | | // of a type in a type list. |
42 | | template <int N, int TYPE_SIZE, class Type, class TypeToTest, class... Types> |
43 | | struct TypeIndexer |
44 | | : public TypeIndexer<N + 1, sizeof...(Types), Type, Types...>, |
45 | | IndexDef<N, std::is_same<Type, TypeToTest>::value> {}; |
46 | | |
47 | | template <int N, class Type, class TypeToTest> |
48 | | struct TypeIndexer<N, 1, Type, TypeToTest> |
49 | | : public IndexDef<N, std::is_same<Type, TypeToTest>::value> {}; |
50 | | |
51 | | // ValueHolder class wraps absl::variant, adding IndexOf metafunction to it. |
52 | | template <class... Args> |
53 | | class ValueHolder { |
54 | | public: |
55 | | template <class T> |
56 | 579k | explicit ValueHolder(T t) : value_(t) {}google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::ValueHolder<absl::lts_20260526::Status const*>(absl::lts_20260526::Status const*) Line | Count | Source | 56 | 125k | explicit ValueHolder(T t) : value_(t) {} |
google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::ValueHolder<std::__1::monostate>(std::__1::monostate) Line | Count | Source | 56 | 185 | explicit ValueHolder(T t) : value_(t) {} |
google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::ValueHolder<bool>(bool) Line | Count | Source | 56 | 3.78k | explicit ValueHolder(T t) : value_(t) {} |
google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::ValueHolder<long>(long) Line | Count | Source | 56 | 957 | explicit ValueHolder(T t) : value_(t) {} |
google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::ValueHolder<unsigned long>(unsigned long) Line | Count | Source | 56 | 93.9k | explicit ValueHolder(T t) : value_(t) {} |
google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::ValueHolder<double>(double) Line | Count | Source | 56 | 582 | explicit ValueHolder(T t) : value_(t) {} |
google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::ValueHolder<google::api::expr::runtime::CelValue::StringHolderBase<0> >(google::api::expr::runtime::CelValue::StringHolderBase<0>) Line | Count | Source | 56 | 107k | explicit ValueHolder(T t) : value_(t) {} |
google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::ValueHolder<google::api::expr::runtime::CelValue::StringHolderBase<1> >(google::api::expr::runtime::CelValue::StringHolderBase<1>) Line | Count | Source | 56 | 9.68k | explicit ValueHolder(T t) : value_(t) {} |
google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::ValueHolder<google::api::expr::runtime::MessageWrapper>(google::api::expr::runtime::MessageWrapper) Line | Count | Source | 56 | 26.4k | explicit ValueHolder(T t) : value_(t) {} |
google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::ValueHolder<absl::lts_20260526::Time>(absl::lts_20260526::Time) Line | Count | Source | 56 | 387 | explicit ValueHolder(T t) : value_(t) {} |
google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::ValueHolder<google::api::expr::runtime::CelValue::StringHolderBase<2> >(google::api::expr::runtime::CelValue::StringHolderBase<2>) Line | Count | Source | 56 | 15 | explicit ValueHolder(T t) : value_(t) {} |
google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::ValueHolder<google::api::expr::runtime::CelList const*>(google::api::expr::runtime::CelList const*) Line | Count | Source | 56 | 2.49k | explicit ValueHolder(T t) : value_(t) {} |
google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::ValueHolder<google::api::expr::runtime::CelMap const*>(google::api::expr::runtime::CelMap const*) Line | Count | Source | 56 | 208k | explicit ValueHolder(T t) : value_(t) {} |
google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::ValueHolder<absl::lts_20260526::Duration>(absl::lts_20260526::Duration) Line | Count | Source | 56 | 80 | explicit ValueHolder(T t) : value_(t) {} |
Unexecuted instantiation: google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::ValueHolder<cel::base_internal::UnknownSet const*>(cel::base_internal::UnknownSet const*) |
57 | | |
58 | | // Metafunction to find the index of a type in a type list. |
59 | | template <class T> |
60 | | using IndexOf = TypeIndexer<0, sizeof...(Args), T, Args...>; |
61 | | |
62 | | template <class T> |
63 | 370k | const T* get() const { |
64 | 370k | return absl::get_if<T>(&value_); |
65 | 370k | } bool const* google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::get<bool>() const Line | Count | Source | 63 | 2 | const T* get() const { | 64 | 2 | return absl::get_if<T>(&value_); | 65 | 2 | } |
long const* google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::get<long>() const Line | Count | Source | 63 | 47 | const T* get() const { | 64 | 47 | return absl::get_if<T>(&value_); | 65 | 47 | } |
unsigned long const* google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::get<unsigned long>() const Line | Count | Source | 63 | 788 | const T* get() const { | 64 | 788 | return absl::get_if<T>(&value_); | 65 | 788 | } |
double const* google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::get<double>() const Line | Count | Source | 63 | 131 | const T* get() const { | 64 | 131 | return absl::get_if<T>(&value_); | 65 | 131 | } |
google::api::expr::runtime::CelValue::StringHolderBase<0> const* google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::get<google::api::expr::runtime::CelValue::StringHolderBase<0> >() const Line | Count | Source | 63 | 2.95k | const T* get() const { | 64 | 2.95k | return absl::get_if<T>(&value_); | 65 | 2.95k | } |
google::api::expr::runtime::CelValue::StringHolderBase<1> const* google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::get<google::api::expr::runtime::CelValue::StringHolderBase<1> >() const Line | Count | Source | 63 | 9.62k | const T* get() const { | 64 | 9.62k | return absl::get_if<T>(&value_); | 65 | 9.62k | } |
google::api::expr::runtime::MessageWrapper const* google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::get<google::api::expr::runtime::MessageWrapper>() const Line | Count | Source | 63 | 26.4k | const T* get() const { | 64 | 26.4k | return absl::get_if<T>(&value_); | 65 | 26.4k | } |
absl::lts_20260526::Duration const* google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::get<absl::lts_20260526::Duration>() const Line | Count | Source | 63 | 15 | const T* get() const { | 64 | 15 | return absl::get_if<T>(&value_); | 65 | 15 | } |
absl::lts_20260526::Time const* google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::get<absl::lts_20260526::Time>() const Line | Count | Source | 63 | 386 | const T* get() const { | 64 | 386 | return absl::get_if<T>(&value_); | 65 | 386 | } |
google::api::expr::runtime::CelList const* const* google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::get<google::api::expr::runtime::CelList const*>() const Line | Count | Source | 63 | 2.27k | const T* get() const { | 64 | 2.27k | return absl::get_if<T>(&value_); | 65 | 2.27k | } |
google::api::expr::runtime::CelMap const* const* google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::get<google::api::expr::runtime::CelMap const*>() const Line | Count | Source | 63 | 207k | const T* get() const { | 64 | 207k | return absl::get_if<T>(&value_); | 65 | 207k | } |
Unexecuted instantiation: google::api::expr::runtime::CelValue::StringHolderBase<2> const* google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::get<google::api::expr::runtime::CelValue::StringHolderBase<2> >() const Unexecuted instantiation: cel::base_internal::UnknownSet const* const* google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::get<cel::base_internal::UnknownSet const*>() const absl::lts_20260526::Status const* const* google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::get<absl::lts_20260526::Status const*>() const Line | Count | Source | 63 | 120k | const T* get() const { | 64 | 120k | return absl::get_if<T>(&value_); | 65 | 120k | } |
|
66 | | |
67 | | template <class T> |
68 | 0 | bool is() const { |
69 | 0 | return absl::holds_alternative<T>(value_); |
70 | 0 | } Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::is<bool>() const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::is<long>() const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::is<unsigned long>() const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::is<double>() const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::is<google::api::expr::runtime::CelValue::StringHolderBase<0> >() const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::is<google::api::expr::runtime::CelValue::StringHolderBase<1> >() const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::is<google::api::expr::runtime::MessageWrapper>() const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::is<absl::lts_20260526::Duration>() const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::is<absl::lts_20260526::Time>() const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::is<google::api::expr::runtime::CelList const*>() const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::is<google::api::expr::runtime::CelMap const*>() const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::is<cel::base_internal::UnknownSet const*>() const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::is<google::api::expr::runtime::CelValue::StringHolderBase<2> >() const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::is<absl::lts_20260526::Status const*>() const |
71 | | |
72 | 464k | int index() const { return value_.index(); } |
73 | | |
74 | | template <class ReturnType, class Op> |
75 | 198k | ReturnType Visit(Op&& op) const { |
76 | 198k | return absl::visit(std::forward<Op>(op), value_); |
77 | 198k | } Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::Visit<bool, google::api::expr::runtime::CelValue::NullCheckOp>(google::api::expr::runtime::CelValue::NullCheckOp&&) const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::Visit<bool, google::api::expr::runtime::CelValue::AssignerOp<google::api::expr::runtime::MessageWrapper, void> >(google::api::expr::runtime::CelValue::AssignerOp<google::api::expr::runtime::MessageWrapper, void>&&) const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::Visit<bool, google::api::expr::runtime::CelValue::AssignerOp<long, void> >(google::api::expr::runtime::CelValue::AssignerOp<long, void>&&) const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::Visit<bool, google::api::expr::runtime::CelValue::AssignerOp<unsigned long, void> >(google::api::expr::runtime::CelValue::AssignerOp<unsigned long, void>&&) const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::Visit<bool, google::api::expr::runtime::CelValue::AssignerOp<double, void> >(google::api::expr::runtime::CelValue::AssignerOp<double, void>&&) const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::Visit<bool, google::api::expr::runtime::CelValue::AssignerOp<google::api::expr::runtime::CelMap const*, void> >(google::api::expr::runtime::CelValue::AssignerOp<google::api::expr::runtime::CelMap const*, void>&&) const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::Visit<bool, google::api::expr::runtime::CelValue::AssignerOp<google::api::expr::runtime::CelList const*, void> >(google::api::expr::runtime::CelValue::AssignerOp<google::api::expr::runtime::CelList const*, void>&&) const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::Visit<bool, google::api::expr::runtime::CelValue::AssignerOp<bool, void> >(google::api::expr::runtime::CelValue::AssignerOp<bool, void>&&) const bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::Visit<bool, google::api::expr::runtime::CelValue::AssignerOp<google::api::expr::runtime::CelValue::StringHolderBase<0>, void> >(google::api::expr::runtime::CelValue::AssignerOp<google::api::expr::runtime::CelValue::StringHolderBase<0>, void>&&) const Line | Count | Source | 75 | 198k | ReturnType Visit(Op&& op) const { | 76 | 198k | return absl::visit(std::forward<Op>(op), value_); | 77 | 198k | } |
Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::Visit<bool, google::api::expr::runtime::CelValue::AssignerOp<google::api::expr::runtime::CelValue::StringHolderBase<1>, void> >(google::api::expr::runtime::CelValue::AssignerOp<google::api::expr::runtime::CelValue::StringHolderBase<1>, void>&&) const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::Visit<bool, google::api::expr::runtime::CelValue::AssignerOp<absl::lts_20260526::Duration, void> >(google::api::expr::runtime::CelValue::AssignerOp<absl::lts_20260526::Duration, void>&&) const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::Visit<bool, google::api::expr::runtime::CelValue::AssignerOp<absl::lts_20260526::Time, void> >(google::api::expr::runtime::CelValue::AssignerOp<absl::lts_20260526::Time, void>&&) const Unexecuted instantiation: cel_value.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::Visit<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::api::expr::runtime::(anonymous namespace)::DebugStringVisitor>(google::api::expr::runtime::(anonymous namespace)::DebugStringVisitor&&) const Unexecuted instantiation: bool google::api::expr::runtime::internal::ValueHolder<std::__1::monostate, bool, long, unsigned long, double, google::api::expr::runtime::CelValue::StringHolderBase<0>, google::api::expr::runtime::CelValue::StringHolderBase<1>, google::api::expr::runtime::MessageWrapper, absl::lts_20260526::Duration, absl::lts_20260526::Time, google::api::expr::runtime::CelList const*, google::api::expr::runtime::CelMap const*, cel::base_internal::UnknownSet const*, google::api::expr::runtime::CelValue::StringHolderBase<2>, absl::lts_20260526::Status const*>::Visit<bool, google::api::expr::runtime::CelValue::AssignerOp<absl::lts_20260526::Status const*, void> >(google::api::expr::runtime::CelValue::AssignerOp<absl::lts_20260526::Status const*, void>&&) const |
78 | | |
79 | | private: |
80 | | absl::variant<Args...> value_; |
81 | | }; |
82 | | |
83 | | // Adapter for visitor clients that depend on google::protobuf::Message as a variant type. |
84 | | template <typename Op, typename T> |
85 | | struct MessageVisitAdapter { |
86 | | explicit MessageVisitAdapter(Op&& op) : op(std::forward<Op>(op)) {} |
87 | | |
88 | | template <typename ArgT> |
89 | | T operator()(const ArgT& arg) { |
90 | | return op(arg); |
91 | | } |
92 | | |
93 | | T operator()(const MessageWrapper& wrapper) { |
94 | | ABSL_ASSERT(wrapper.HasFullProto()); |
95 | | return op(static_cast<const google::protobuf::Message*>(wrapper.message_ptr())); |
96 | | } |
97 | | |
98 | | Op op; |
99 | | }; |
100 | | |
101 | | } // namespace google::api::expr::runtime::internal |
102 | | |
103 | | #endif // THIRD_PARTY_CEL_CPP_EVAL_PUBLIC_CEL_VALUE_INTERNAL_H_ |