23 #include "ocilibcpp/core.hpp"
29 inline HandleStore::HandleStore(SynchronizationGuard* guard)
31 _handles.SetGuard(guard);
37 return dynamic_cast<T
>(_handles.Get(ptr));
41 void HandleStore::Set(
AnyPointer ptr, T handle)
45 _handles.Set(ptr, handle);
53 inline HandleStore& HandleStore::GetStoreForHandle(Handle* handle)
55 HandleStore* store = handle ? handle->GetStore() :
nullptr;
57 return store ? *store : GetDefaultStore();
60 inline HandleStore& HandleStore::GetDefaultStore()
62 static SynchronizationGuard guard(SynchronizationMode::Unsafe);
63 static HandleStore store(&guard);
void * AnyPointer
Alias for the generic void pointer.