Skip to content

Commit fe3039a

Browse files
jckingcopybara-github
authored andcommitted
Remove ValueManager
PiperOrigin-RevId: 728180286
1 parent 06ee305 commit fe3039a

File tree

129 files changed

+1302
-2898
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+1302
-2898
lines changed

common/BUILD

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -573,12 +573,7 @@ cc_library(
573573
],
574574
) + [
575575
"legacy_value.cc",
576-
"list_type_reflector.cc",
577-
"map_type_reflector.cc",
578-
"type_reflector.cc",
579576
"value.cc",
580-
"value_factory.cc",
581-
"value_manager.cc",
582577
],
583578
hdrs = glob(
584579
[
@@ -591,14 +586,11 @@ cc_library(
591586
"legacy_value.h",
592587
"type_reflector.h",
593588
"value.h",
594-
"value_factory.h",
595-
"value_manager.h",
596589
],
597590
deps = [
598591
":allocator",
599592
":any",
600593
":casting",
601-
":json",
602594
":kind",
603595
":memory",
604596
":native_type",

common/list_type_reflector.cc

Lines changed: 0 additions & 32 deletions
This file was deleted.

common/map_type_reflector.cc

Lines changed: 0 additions & 32 deletions
This file was deleted.

common/type_reflector.cc

Lines changed: 0 additions & 51 deletions
This file was deleted.

common/type_reflector.h

Lines changed: 5 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -15,65 +15,29 @@
1515
#ifndef THIRD_PARTY_CEL_CPP_COMMON_TYPE_REFLECTOR_H_
1616
#define THIRD_PARTY_CEL_CPP_COMMON_TYPE_REFLECTOR_H_
1717

18-
#include "absl/base/attributes.h"
1918
#include "absl/base/nullability.h"
2019
#include "absl/status/statusor.h"
21-
#include "absl/strings/cord.h"
2220
#include "absl/strings/string_view.h"
23-
#include "absl/types/optional.h"
24-
#include "common/memory.h"
25-
#include "common/type.h"
2621
#include "common/type_introspector.h"
2722
#include "common/value.h"
28-
#include "common/value_factory.h"
29-
#include "google/protobuf/descriptor.h"
23+
#include "google/protobuf/arena.h"
24+
#include "google/protobuf/message.h"
3025

3126
namespace cel {
3227

3328
// `TypeReflector` is an interface for constructing new instances of types are
3429
// runtime. It handles type reflection.
3530
class TypeReflector : public virtual TypeIntrospector {
3631
public:
37-
// Legacy type reflector, will prefer builders for legacy value.
38-
ABSL_DEPRECATED("Is now the same as Builtin()")
39-
static TypeReflector& LegacyBuiltin() { return Builtin(); }
40-
// Will prefer builders for modern values.
41-
ABSL_DEPRECATED("Is now the same as Builtin()")
42-
static TypeReflector& ModernBuiltin() { return Builtin(); }
43-
44-
static TypeReflector& Builtin();
45-
46-
// `NewListValueBuilder` returns a new `ListValueBuilderInterface` for the
47-
// corresponding `ListType` `type`.
48-
absl::StatusOr<absl::Nonnull<ListValueBuilderPtr>> NewListValueBuilder(
49-
ValueFactory& value_factory, const ListType& type) const;
50-
51-
// `NewMapValueBuilder` returns a new `MapValueBuilderInterface` for the
52-
// corresponding `MapType` `type`.
53-
absl::StatusOr<absl::Nonnull<MapValueBuilderPtr>> NewMapValueBuilder(
54-
ValueFactory& value_factory, const MapType& type) const;
55-
56-
// `NewStructValueBuilder` returns a new `StructValueBuilder` for the
57-
// corresponding `StructType` `type`.
58-
virtual absl::StatusOr<absl::Nullable<StructValueBuilderPtr>>
59-
NewStructValueBuilder(ValueFactory& value_factory,
60-
const StructType& type) const;
61-
6232
// `NewValueBuilder` returns a new `ValueBuilder` for the corresponding type
6333
// `name`. It is primarily used to handle wrapper types which sometimes show
6434
// up literally in expressions.
6535
virtual absl::StatusOr<absl::Nullable<ValueBuilderPtr>> NewValueBuilder(
66-
ValueFactory& value_factory, absl::string_view name) const;
67-
68-
virtual absl::Nullable<const google::protobuf::DescriptorPool*> descriptor_pool()
69-
const {
70-
return nullptr;
71-
}
36+
absl::string_view name,
37+
absl::Nonnull<google::protobuf::MessageFactory*> message_factory,
38+
absl::Nonnull<google::protobuf::Arena*> arena) const = 0;
7239
};
7340

74-
Shared<TypeReflector> NewThreadCompatibleTypeReflector(
75-
MemoryManagerRef memory_manager);
76-
7741
} // namespace cel
7842

7943
#endif // THIRD_PARTY_CEL_CPP_COMMON_TYPE_REFLECTOR_H_

common/value_factory.cc

Lines changed: 0 additions & 155 deletions
This file was deleted.

0 commit comments

Comments
 (0)