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

Function AbslStringify

common/constant.h:455–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

453
454template <typename Sink>
455void AbslStringify(Sink& sink, const Constant& constant) {
456 absl::visit(
457 absl::Overload(
458 [&sink](absl::monostate) -> void { sink.Append("<unspecified>"); },
459 [&sink](std::nullptr_t value) -> void {
460 sink.Append(FormatNullConstant(value));
461 },
462 [&sink](bool value) -> void {
463 sink.Append(FormatBoolConstant(value));
464 },
465 [&sink](int64_t value) -> void {
466 sink.Append(FormatIntConstant(value));
467 },
468 [&sink](uint64_t value) -> void {
469 sink.Append(FormatUintConstant(value));
470 },
471 [&sink](double value) -> void {
472 sink.Append(FormatDoubleConstant(value));
473 },
474 [&sink](const BytesConstant& value) -> void {
475 sink.Append(FormatBytesConstant(value));
476 },
477 [&sink](const StringConstant& value) -> void {
478 sink.Append(FormatStringConstant(value));
479 },
480 [&sink](absl::Duration value) -> void {
481 sink.Append(FormatDurationConstant(value));
482 },
483 [&sink](absl::Time value) -> void {
484 sink.Append(FormatTimestampConstant(value));
485 }),
486 constant.kind());
487}
488
489} // namespace cel
490

Callers

nothing calls this directly

Calls 11

FormatBoolConstantFunction · 0.85
FormatIntConstantFunction · 0.85
FormatUintConstantFunction · 0.85
FormatDoubleConstantFunction · 0.85
FormatBytesConstantFunction · 0.85
FormatStringConstantFunction · 0.85
FormatDurationConstantFunction · 0.85
FormatTimestampConstantFunction · 0.85
FormatNullConstantFunction · 0.70
AppendMethod · 0.45
kindMethod · 0.45

Tested by

no test coverage detected