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

Method getObjects

common/map_sdk/map_engine/src/remote_search.cpp:497–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

495}
496
497int RemoteSearch::getObjects(const hadmap::PointVec& envelope, const std::vector<hadmap::OBJECT_TYPE>& types,
498 hadmap::txObjects& objects) {
499 std::string baseUrl = pTrans->location();
500 std::string url =
501 UrlGen(baseUrl).db(dbName).getObject().envelope(envelope[0].x, envelope[0].y, envelope[1].x, envelope[1].y).url();
502
503 std::vector<PostParamPtr> params;
504 for (auto& objType : types) params.push_back(PostParamPtr(new ObjTypeParam(objType)));
505 std::string paramJson;
506 generatePostJson(params, paramJson);
507
508 std::string jsonData;
509 if (pTrans->post(url, paramJson, jsonData)) {
510 objects.clear();
511
512 JsonParser::parseObj(jsonData, objects);
513
514 return objects.empty() ? TX_HADMAP_DATA_EMPTY : TX_HADMAP_DATA_OK;
515 }
516
517 return TX_HADMAP_DATA_ERROR;
518}
519
520int RemoteSearch::getObjects(const std::vector<txLaneId>& laneIds, const std::vector<OBJECT_TYPE>& types,
521 txObjects& objects) {

Callers

nothing calls this directly

Calls 8

generatePostJsonFunction · 0.85
urlMethod · 0.80
postMethod · 0.80
locationMethod · 0.45
getObjectMethod · 0.45
push_backMethod · 0.45
clearMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected