MCPcopy Create free account
hub / github.com/apache/fory / make_ref_mode

Function make_ref_mode

cpp/fory/serialization/ref_mode.h:53–62  ·  view source on GitHub ↗

Create RefMode from nullable and track_ref flags. This is a constexpr function for compile-time field metadata conversion.

Source from the content-addressed store, hash-verified

51/// Create RefMode from nullable and track_ref flags.
52/// This is a constexpr function for compile-time field metadata conversion.
53FORY_ALWAYS_INLINE constexpr RefMode make_ref_mode(bool nullable,
54 bool track_ref) {
55 if (track_ref) {
56 return RefMode::Tracking;
57 }
58 if (nullable) {
59 return RefMode::NullOnly;
60 }
61 return RefMode::None;
62}
63
64/// Check if this mode reads/writes ref flags.
65/// Fast path check - single comparison.

Callers 6

write_single_fieldFunction · 0.85
FieldTypeMethod · 0.85
buildMethod · 0.85
build_with_resolverMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected