The ResourceMgr
Class Reference
Singleton for managing resources compiled into an executable. More...
Declaration
Included Headers
Private Constructors Index
ResourceMgr () | |
Private Destructor Index
~ResourceMgr () | |
Public Member Functions Index
void | registerResources (std::initializer_list< Resource > resources) |
Registers an array of resources. More... | |
bool | writeCategory (const QCString &categoryName, const QCString &targetDir) const |
Writes all resource belonging to a given category to a given target directory. More... | |
bool | copyResource (const QCString &name, const QCString &targetDir) const |
Copies a registered resource to a given target directory. More... | |
bool | copyResourceAs (const QCString &name, const QCString &targetDir, const QCString &targetName, bool append=false) const |
Copies a registered resource to a given target directory under a given target name. More... | |
QCString | getAsString (const QCString &name) const |
Gets the resource data as a C string. More... | |
Private Member Functions Index
const Resource * | get (const QCString &name) const |
Returns a pointer to the resource object with the given name. More... | |
Private Member Attributes Index
std::unique_ptr< Private > | p |
Public Static Functions Index
static ResourceMgr & | instance () |
Returns the one and only instance of this class. More... | |
Description
Singleton for managing resources compiled into an executable.
Definition at line 36 of file resourcemgr.h.
Private Constructors
ResourceMgr()
|
Declaration at line 61 of file resourcemgr.h, definition at line 39 of file resourcemgr.cpp.
Reference p.
Referenced by instance.
Private Destructor
~ResourceMgr()
|
Declaration at line 62 of file resourcemgr.h, definition at line 43 of file resourcemgr.cpp.
Public Member Functions
copyResource()
Copies a registered resource to a given target directory.
Declaration at line 49 of file resourcemgr.h, definition at line 122 of file resourcemgr.cpp.
Reference copyResourceAs.
Referenced by CitationManager::generatePage, generateXML, HtmlGenerator::init, HtmlGenerator::writeSearchPage and HtmlGenerator::writeTabData.
copyResourceAs()
|
Copies a registered resource to a given target directory under a given target name.
Declaration at line 52 of file resourcemgr.h, definition at line 79 of file resourcemgr.cpp.
References Resource::data, err, QCString::ExplicitSize, FALSE, get, Portable::openOutputStream, QCString::rawData, replaceColorMarkers, Resource::size, Resource::SVG, TRUE, Resource::type and Resource::Verbatim.
Referenced by copyResource.
getAsString()
|
Gets the resource data as a C string.
Declaration at line 55 of file resourcemgr.h, definition at line 134 of file resourcemgr.cpp.
References Resource::data, QCString::ExplicitSize, get, QCString::rawData and Resource::size.
Referenced by fillColorStyleMaps, generateXML, HtmlGenerator::getNavTreeCss, HtmlGenerator::init, LatexGenerator::init, LayoutDocManager::init, writeDefaultLayoutFile, writeDefaultStyleSheet, writeDefaultStyleSheet, HtmlGenerator::writeExternalSearchPage, HtmlGenerator::writeFooterFile, LatexGenerator::writeFooterFile, HtmlGenerator::writeHeaderFile, LatexGenerator::writeHeaderFile, HtmlGenerator::writeSearchData, HtmlGenerator::writeSearchPage and LatexGenerator::writeStyleInfo.
registerResources()
|
Registers an array of resources.
Declaration at line 43 of file resourcemgr.h, definition at line 47 of file resourcemgr.cpp.
Reference p.
writeCategory()
Writes all resource belonging to a given category to a given target directory.
Declaration at line 46 of file resourcemgr.h, definition at line 55 of file resourcemgr.cpp.
References err, FALSE, Portable::openOutputStream, p and TRUE.
Private Member Functions
get()
|
Returns a pointer to the resource object with the given name.
Declaration at line 59 of file resourcemgr.h, definition at line 127 of file resourcemgr.cpp.
References p and QCString::str.
Referenced by copyResourceAs and getAsString.
Private Member Attributes
p
|
Definition at line 66 of file resourcemgr.h.
Referenced by get, registerResources, ResourceMgr and writeCategory.
Public Static Functions
instance()
| static |
Returns the one and only instance of this class.
Declaration at line 40 of file resourcemgr.h, definition at line 33 of file resourcemgr.cpp.
Reference ResourceMgr.
Referenced by fillColorStyleMaps, generateJSNavTree, CitationManager::generatePage, generateXML, HtmlGenerator::getNavTreeCss, HtmlGenerator::init, LatexGenerator::init, LayoutDocManager::init, writeDefaultLayoutFile, writeDefaultStyleSheet, writeDefaultStyleSheet, HtmlGenerator::writeExternalSearchPage, HtmlGenerator::writeFooterFile, LatexGenerator::writeFooterFile, HtmlGenerator::writeHeaderFile, LatexGenerator::writeHeaderFile, writeJavaScriptSearchIndex, HtmlGenerator::writeSearchData, HtmlGenerator::writeSearchPage, LatexGenerator::writeStyleInfo and HtmlGenerator::writeTabData.
The documentation for this class was generated from the following files:
Generated via doxygen2docusaurus by Doxygen 1.14.0.