/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 | 12.7k | 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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::ValueHolder<absl::lts_20260107::Status const*>(absl::lts_20260107::Status const*) Line | Count | Source | 56 | 5.58k | 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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::ValueHolder<std::__1::monostate>(std::__1::monostate) Line | Count | Source | 56 | 44 | 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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::ValueHolder<bool>(bool) Line | Count | Source | 56 | 3.36k | 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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::ValueHolder<long>(long) Line | Count | Source | 56 | 643 | 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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::ValueHolder<unsigned long>(unsigned long) Line | Count | Source | 56 | 351 | 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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::ValueHolder<double>(double) Line | Count | Source | 56 | 446 | 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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::ValueHolder<google::api::expr::runtime::CelValue::StringHolderBase<0> >(google::api::expr::runtime::CelValue::StringHolderBase<0>) Line | Count | Source | 56 | 677 | 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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::ValueHolder<google::api::expr::runtime::CelValue::StringHolderBase<1> >(google::api::expr::runtime::CelValue::StringHolderBase<1>) Line | Count | Source | 56 | 169 | 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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::ValueHolder<google::api::expr::runtime::MessageWrapper>(google::api::expr::runtime::MessageWrapper) Line | Count | Source | 56 | 290 | 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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::ValueHolder<absl::lts_20260107::Time>(absl::lts_20260107::Time) Line | Count | Source | 56 | 49 | 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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::ValueHolder<google::api::expr::runtime::CelValue::StringHolderBase<2> >(google::api::expr::runtime::CelValue::StringHolderBase<2>) Line | Count | Source | 56 | 12 | 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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::ValueHolder<google::api::expr::runtime::CelList const*>(google::api::expr::runtime::CelList const*) Line | Count | Source | 56 | 361 | 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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::ValueHolder<google::api::expr::runtime::CelMap const*>(google::api::expr::runtime::CelMap const*) Line | Count | Source | 56 | 721 | 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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::ValueHolder<absl::lts_20260107::Duration>(absl::lts_20260107::Duration) Line | Count | Source | 56 | 7 | 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_20260107::Duration, absl::lts_20260107::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_20260107::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 | 2.06k | const T* get() const { |
64 | 2.06k | return absl::get_if<T>(&value_); |
65 | 2.06k | } 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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::get<bool>() const Line | Count | Source | 63 | 1 | const T* get() const { | 64 | 1 | return absl::get_if<T>(&value_); | 65 | 1 | } |
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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::get<long>() const Line | Count | Source | 63 | 76 | const T* get() const { | 64 | 76 | return absl::get_if<T>(&value_); | 65 | 76 | } |
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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::get<unsigned long>() const Line | Count | Source | 63 | 104 | const T* get() const { | 64 | 104 | return absl::get_if<T>(&value_); | 65 | 104 | } |
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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::get<double>() const Line | Count | Source | 63 | 117 | const T* get() const { | 64 | 117 | return absl::get_if<T>(&value_); | 65 | 117 | } |
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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::get<google::api::expr::runtime::CelValue::StringHolderBase<0> >() const Line | Count | Source | 63 | 26 | const T* get() const { | 64 | 26 | return absl::get_if<T>(&value_); | 65 | 26 | } |
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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::get<google::api::expr::runtime::CelValue::StringHolderBase<1> >() const Line | Count | Source | 63 | 102 | const T* get() const { | 64 | 102 | return absl::get_if<T>(&value_); | 65 | 102 | } |
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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::get<google::api::expr::runtime::MessageWrapper>() const Line | Count | Source | 63 | 289 | const T* get() const { | 64 | 289 | return absl::get_if<T>(&value_); | 65 | 289 | } |
absl::lts_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::get<absl::lts_20260107::Duration>() const Line | Count | Source | 63 | 6 | const T* get() const { | 64 | 6 | return absl::get_if<T>(&value_); | 65 | 6 | } |
absl::lts_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::get<absl::lts_20260107::Time>() const Line | Count | Source | 63 | 48 | const T* get() const { | 64 | 48 | return absl::get_if<T>(&value_); | 65 | 48 | } |
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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::get<google::api::expr::runtime::CelList const*>() const Line | Count | Source | 63 | 87 | const T* get() const { | 64 | 87 | return absl::get_if<T>(&value_); | 65 | 87 | } |
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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::get<google::api::expr::runtime::CelMap const*>() const Line | Count | Source | 63 | 677 | const T* get() const { | 64 | 677 | return absl::get_if<T>(&value_); | 65 | 677 | } |
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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::get<cel::base_internal::UnknownSet const*>() const absl::lts_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::get<absl::lts_20260107::Status const*>() const Line | Count | Source | 63 | 528 | const T* get() const { | 64 | 528 | return absl::get_if<T>(&value_); | 65 | 528 | } |
|
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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::is<absl::lts_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::is<absl::lts_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::is<absl::lts_20260107::Status const*>() const |
71 | | |
72 | 2.36k | int index() const { return value_.index(); } |
73 | | |
74 | | template <class ReturnType, class Op> |
75 | 711 | ReturnType Visit(Op&& op) const { |
76 | 711 | return absl::visit(std::forward<Op>(op), value_); |
77 | 711 | } 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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::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 | 711 | ReturnType Visit(Op&& op) const { | 76 | 711 | return absl::visit(std::forward<Op>(op), value_); | 77 | 711 | } |
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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::Visit<bool, google::api::expr::runtime::CelValue::AssignerOp<absl::lts_20260107::Duration, void> >(google::api::expr::runtime::CelValue::AssignerOp<absl::lts_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::Visit<bool, google::api::expr::runtime::CelValue::AssignerOp<absl::lts_20260107::Time, void> >(google::api::expr::runtime::CelValue::AssignerOp<absl::lts_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::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_20260107::Duration, absl::lts_20260107::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_20260107::Status const*>::Visit<bool, google::api::expr::runtime::CelValue::AssignerOp<absl::lts_20260107::Status const*, void> >(google::api::expr::runtime::CelValue::AssignerOp<absl::lts_20260107::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_ |