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

Method LocalSearch

common/map_sdk/map_engine/src/local_search.cpp:18–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16
17namespace hadmap {
18LocalSearch::LocalSearch(MAP_DATA_TYPE type, const std::string& path)
19 : dbPath(path), dbPtr(NULL), dbType(type), optInfo("") {
20 optInfo = std::string("Load DB Failed");
21
22 if (dbType == SQLITE) {
23 dbPtr = dbFactory::getInstance()->getSqliteOp(dbPath);
24 if (dbPtr->connect() && dbPtr->initialize()) {
25 optInfo = std::string("Load DB successful");
26 } else {
27 dbFactory::getInstance()->releaseDB(&dbPtr);
28 dbPtr = NULL;
29 }
30 }
31}
32
33LocalSearch::~LocalSearch() {
34 if (dbPtr == NULL) {

Callers

nothing calls this directly

Calls 4

getSqliteOpMethod · 0.80
releaseDBMethod · 0.80
connectMethod · 0.45
initializeMethod · 0.45

Tested by

no test coverage detected