MCPcopy Create free account
hub / github.com/antvis/F2Native / GetIntNumber

Function GetIntNumber

core/graphics/util/json.cpp:73–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73const int GetIntNumber(const nlohmann::json &obj, const std::string &key, const int def) {
74 if(obj.is_object() && obj.contains(key) && obj[key].is_number_integer()) {
75 return obj[key].get<int>();
76 } else {
77 return def;
78 }
79}
80
81const float GetFloatNumber(const nlohmann::json &obj, const std::string &key, const float def) {
82 if(obj.is_object() && obj.contains(key) && obj[key].is_number()) {

Callers 10

InitConfigMethod · 0.85
GetTickTextMethod · 0.85
ShowToolTipsMethod · 0.85
ShowToolTipMethod · 0.85
GetPositionMethod · 0.85
RenderMethod · 0.85
IsSelectedMethod · 0.85
associateGeomTapMethod · 0.85
onTapMethod · 0.85
isSelectedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected