LibreOffice Module sd (master) 1
|
This simple class stores frequently used icons so that the classes that use the icons do not have to store them in every one of their instances. More...
#include <IconCache.hxx>
Classes | |
class | Implementation |
Public Member Functions | |
Image | GetIcon (const OUString &rResourceId) |
Return the icon with the given resource id. More... | |
Public Member Functions inherited from sd::SdGlobalResource | |
virtual | ~SdGlobalResource () COVERITY_NOEXCEPT_FALSE |
Static Public Member Functions | |
static IconCache & | Instance () |
The lifetime of the returned reference is limited to that of the sd module. More... | |
Private Member Functions | |
IconCache () | |
The constructor creates the one instance of the cache and registers it at the SdGlobalResourceContainer to limit is lifetime to that of the sd module. More... | |
virtual | ~IconCache () override |
This destructor is called by SdGlobalResourceContainer. More... | |
Private Attributes | |
::std::unique_ptr< Implementation > | mpImpl |
This simple class stores frequently used icons so that the classes that use the icons do not have to store them in every one of their instances.
Icons are addressed over their resource id and are loaded on demand.
This cache acts like a singleton with a lifetime equal to that of the sd module.
Definition at line 37 of file IconCache.hxx.
|
private |
The constructor creates the one instance of the cache and registers it at the SdGlobalResourceContainer to limit is lifetime to that of the sd module.
Definition at line 94 of file IconCache.cxx.
Referenced by Instance().
|
overrideprivatevirtual |
This destructor is called by SdGlobalResourceContainer.
Definition at line 99 of file IconCache.cxx.
Image sd::IconCache::GetIcon | ( | const OUString & | rResourceId | ) |
Return the icon with the given resource id.
Definition at line 92 of file IconCache.cxx.
References mpImpl.
|
static |
The lifetime of the returned reference is limited to that of the sd module.
Definition at line 68 of file IconCache.cxx.
References sd::SdGlobalResourceContainer::AddResource(), DBG_ASSERT, IconCache(), sd::SdGlobalResourceContainer::Instance(), and sd::IconCache::Implementation::s_pIconCache.
|
private |
Definition at line 55 of file IconCache.hxx.
Referenced by GetIcon().