27std::shared_ptr<IImageService> ImageService::instance_ =
nullptr;
31 std::lock_guard<std::mutex> lock(g_imageInstanceMutex);
32 instance_ = std::move(service);
40 std::lock_guard<std::mutex> lock(g_imageInstanceMutex);
46 std::lock_guard<std::mutex> lock(g_imageInstanceMutex);
47 return instance_ !=
nullptr;
static bool hasInstance()
Check if an image service has been set.
static std::shared_ptr< IImageService > instance()
Get the image service instance.
static void setInstance(std::shared_ptr< IImageService > service)
Set the image service implementation.
std::mutex g_imageInstanceMutex