MCPcopy Create free account
hub / github.com/Tencent/TAD_Sim / generatePostJson

Function generatePostJson

common/map_sdk/transmission/src/post_param.cpp:9–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8namespace hadmap {
9void generatePostJson(const std::vector<PostParamPtr>& params, std::string& jsonStr) {
10 neb::CJsonObject paramJsObj;
11 std::set<PostParam::ParamType> typeSets;
12 for (auto& paramPtr : params) {
13 if (typeSets.find(paramPtr->getType()) == typeSets.end()) {
14 typeSets.insert(paramPtr->getType());
15 neb::CJsonObject pAry;
16 paramPtr->addToJson(pAry);
17 paramJsObj.Add(paramPtr->typeStr(), pAry);
18 } else {
19 paramPtr->addToJson(paramJsObj[paramPtr->typeStr()]);
20 }
21 }
22 jsonStr = paramJsObj.ToString();
23}
24} // namespace hadmap

Callers 4

searchPathMethod · 0.85
getBoundariesMethod · 0.85
getRoadsMethod · 0.85
getObjectsMethod · 0.85

Calls 6

findMethod · 0.45
getTypeMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
AddMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected