7using MapKey = std::string 
const;
 
   19    friend class ImageManagerAttorney;
 
   21    static ImageManager* ptrInstance;
 
   24    ImageManager(
const ImageManager&) = 
delete;
 
   25    ImageManager& operator=(
const ImageManager&) = 
delete;
 
   26    ~ImageManager() = 
default;
 
   28    static ImageManager& Instance()
 
   30        if (ptrInstance == 
nullptr)
 
   31            ptrInstance = 
new ImageManager();
 
   38    static void Delete() { Instance().privDelete(); };
 
   46    Image* privGet(MapKey key);
 
   47    void privLoad(MapKey key, Texture* tex);
 
   48    void privLoad(MapKey key, Texture* tex, Rect* r);
 
   62    static Image* 
Get(MapKey key) { 
return Instance().privGet(key); };
 
   70    static void Load(MapKey key, Texture* tex) { Instance().privLoad(key, tex); };
 
   79    static void Load(MapKey key, Texture* tex, Rect* r) { Instance().privLoad(key, tex, r); };
 
 
static const MapKey defaultImageKey
Default key for the default image.
Definition ImageManager.h:54
static Image * Get(MapKey key)
Retrieves an Image object by its key.
Definition ImageManager.h:62
static void Load(MapKey key, Texture *tex)
Loads an Image object from a Texture.
Definition ImageManager.h:70
std::map< MapKey, Image * > storageMap
Map storing Image objects associated with their keys.
Definition ImageManager.h:44
static void Delete()
Deletes all managed Image objects and the singleton instance.
Definition ImageManager.h:38
static void Load(MapKey key, Texture *tex, Rect *r)
Loads an Image object from a Texture and a Rect.
Definition ImageManager.h:79