MCPcopy Create free account
hub / github.com/OAID/Tengine / SafeFind

Method SafeFind

core/include/safe_object_manager.hpp:37–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35{
36public:
37 static bool SafeFind(const std::string& name)
38 {
39 auto manager = SimpleObjectManager<M, T>::GetInstance();
40
41 manager->Lock();
42
43 bool ret = true;
44
45 if(manager->count(name) == 0)
46 ret = false;
47
48 manager->Unlock();
49
50 return ret;
51 }
52
53 static bool SafeGet(const std::string& name, T& val)
54 {

Callers

nothing calls this directly

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected