MCPcopy Create free account
hub / github.com/ChunelFeng/CGraph / removeByKey

Method removeByKey

src/GraphCtrl/GraphParam/GParamManager.cpp:77–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75
76
77CStatus GParamManager::removeByKey(const std::string& key) {
78 CGRAPH_FUNCTION_BEGIN
79 CGRAPH_LOCK_GUARD lock(this->mutex_); // 创建和销毁的时候,加锁
80 auto param = params_map_.find(key);
81 if (param == params_map_.end()) {
82 CGRAPH_RETURN_ERROR_STATUS("param [" + key + "] no find")
83 }
84
85 CGRAPH_DELETE_PTR(param->second)
86 params_map_.erase(param);
87 CGRAPH_FUNCTION_END
88}
89
90
91std::vector<std::string> GParamManager::getKeys() {

Callers 1

removeGParamFunction · 0.80

Calls 1

findMethod · 0.45

Tested by

no test coverage detected