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

Function CreateCelAttributeQualifierPattern

eval/public/cel_attribute.cc:44–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42} // namespace
43
44CelAttributeQualifierPattern CreateCelAttributeQualifierPattern(
45 const CelValue& value) {
46 switch (value.type()) {
47 case cel::Kind::kInt64:
48 return CelAttributeQualifierPattern::OfInt(value.Int64OrDie());
49 case cel::Kind::kUint64:
50 return CelAttributeQualifierPattern::OfUint(value.Uint64OrDie());
51 case cel::Kind::kString:
52 return CelAttributeQualifierPattern::OfString(
53 std::string(value.StringOrDie().value()));
54 case cel::Kind::kBool:
55 return CelAttributeQualifierPattern::OfBool(value.BoolOrDie());
56 default:
57 return CelAttributeQualifierPattern(CelAttributeQualifier());
58 }
59}
60
61CelAttributeQualifier CreateCelAttributeQualifier(const CelValue& value) {
62 switch (value.type()) {

Callers 9

TESTFunction · 0.85
TESTFunction · 0.85
TEST_PFunction · 0.85
TEST_FFunction · 0.85
TEST_FFunction · 0.85
TEST_FFunction · 0.85
TEST_FFunction · 0.85
TEST_PFunction · 0.85
TESTFunction · 0.85

Calls 6

typeMethod · 0.80
Int64OrDieMethod · 0.80
Uint64OrDieMethod · 0.80
StringOrDieMethod · 0.80
BoolOrDieMethod · 0.80
valueMethod · 0.45

Tested by 9

TESTFunction · 0.68
TESTFunction · 0.68
TEST_PFunction · 0.68
TEST_FFunction · 0.68
TEST_FFunction · 0.68
TEST_FFunction · 0.68
TEST_FFunction · 0.68
TEST_PFunction · 0.68
TESTFunction · 0.68