|
game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
|
Singleton accessor for the image service. More...
#include <image_service.h>
Static Public Member Functions | |
| 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. | |
Singleton accessor for the image service.
Usage:
Definition at line 92 of file image_service.h.
|
static |
Check if an image service has been set.
Definition at line 44 of file image_service.cpp.
|
static |
Get the image service instance.
Returns a shared_ptr (rather than a raw pointer) so the caller's copy keeps the underlying service alive for the duration of their call — even if another thread races setInstance(nullptr) at QApplication shutdown. Caller pattern: auto svc = ImageService::instance(); if (svc) svc->loadImage(...);
Definition at line 35 of file image_service.cpp.
|
static |
Set the image service implementation.
| service | Shared pointer to the implementation |
Must be called by UI layer before any image operations.
Definition at line 29 of file image_service.cpp.
Referenced by main().