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

Function build_fory

cpp/fory/serialization/xlang_test_main.cc:913–927  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

911}
912
913Fory build_fory(bool compatible = true, bool xlang = true,
914 bool check_struct_version = false, bool track_ref = false) {
915 // In Java xlang mode, check_class_version is automatically set to true for
916 // SCHEMA_CONSISTENT mode (compatible=false). Match this behavior in C++.
917 bool actual_check_version = check_struct_version;
918 if (xlang && !compatible) {
919 actual_check_version = true;
920 }
921 return Fory::builder()
922 .compatible(compatible)
923 .xlang(xlang)
924 .check_struct_version(actual_check_version)
925 .track_ref(track_ref)
926 .build();
927}
928
929void register_basic_structs(Fory &fory) {
930 ensure_ok(fory.register_enum<Color>(101), "register Color");

Callers 15

run_test_simple_structFunction · 0.70
run_test_listFunction · 0.70
run_test_mapFunction · 0.70
run_test_integerFunction · 0.70
run_test_decimalFunction · 0.70
run_test_itemFunction · 0.70
run_test_colorFunction · 0.70

Calls 5

buildMethod · 0.45
track_refMethod · 0.45
check_struct_versionMethod · 0.45
xlangMethod · 0.45
compatibleMethod · 0.45

Tested by

no test coverage detected