MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / translateHandle

Function translateHandle

src/yvalve/why.cpp:729–743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

727
728template <typename T>
729RefPtr<T> translateHandle(GlobalPtr<GenericMap<Pair<NonPooled<FB_API_HANDLE, T*> > > >& map,
730 FB_API_HANDLE* handle)
731{
732 if (!handle)
733 status_exception::raise(Arg::Gds(T::ERROR_CODE));
734
735 ReadLockGuard sync(handleMappingLock, FB_FUNCTION);
736
737 T** obj = map->get(*handle);
738
739 if (!obj)
740 status_exception::raise(Arg::Gds(T::ERROR_CODE));
741
742 return RefPtr<T>(*obj);
743}
744
745//-------------------------------------
746

Calls 3

raiseFunction · 0.85
GdsClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected