MCPcopy Create free account
hub / github.com/comaps/comaps / DebugPrint

Function DebugPrint

generator/hierarchy_entry.cpp:29–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29std::string DebugPrint(HierarchyEntry const & entry)
30{
31 auto obj = base::NewJSONObject();
32 ToJSONObject(*obj, "id", DebugPrint(entry.m_id));
33 if (entry.m_parentId)
34 ToJSONObject(*obj, "parentId", DebugPrint(*entry.m_parentId));
35 ToJSONObject(*obj, "depth", entry.m_depth);
36 ToJSONObject(*obj, "type", classif().GetReadableObjectName(entry.m_type));
37 ToJSONObject(*obj, "name", entry.m_name);
38 ToJSONObject(*obj, "country", entry.m_country);
39
40 auto center = base::NewJSONObject();
41 ToJSONObject(*center, "x", entry.m_center.x);
42 ToJSONObject(*center, "y", entry.m_center.y);
43 ToJSONObject(*obj, "center", center);
44 return DumpToString(obj);
45}
46
47namespace hierarchy
48{

Callers

nothing calls this directly

Calls 4

NewJSONObjectFunction · 0.85
DumpToStringFunction · 0.85
GetReadableObjectNameMethod · 0.80
ToJSONObjectFunction · 0.50

Tested by

no test coverage detected