MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / MutableListValue

Class MutableListValue

common/values/list_value_builder.h:62–72  ·  view source on GitHub ↗

Extension of ParsedListValueInterface which is also mutable. Accessing this like a normal list before all elements are finished being appended is a bug. This is primarily used by the runtime to efficiently implement comprehensions which accumulate results into a list. IMPORTANT: This type is only meant to be utilized by the runtime.

Source from the content-addressed store, hash-verified

60//
61// IMPORTANT: This type is only meant to be utilized by the runtime.
62class MutableListValue : public CustomListValueInterface {
63 public:
64 virtual absl::Status Append(Value value) const = 0;
65
66 virtual void Reserve(size_t capacity) const {}
67
68 private:
69 NativeTypeId GetNativeTypeId() const override {
70 return NativeTypeId::For<MutableListValue>();
71 }
72};
73
74// Special implementation of list which is both a modern list, legacy list, and
75// mutable.

Callers 4

TEST_FFunction · 0.85
ToJsonMethod · 0.85
MessageFieldToJsonMethod · 0.85
MutableListValueMethod · 0.85

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.68