igor::iResourceDictionary Class Reference

#include <iResourceDictionary.h>

Public Member Functions

 iResourceDictionary ()=default
 
bool write (const iaString &filename)
 
bool read (const iaString &filename)
 
void clear ()
 
const iaStringgetFilename (iResourceID id) const
 
const iaStringgetAlias (iResourceID id) const
 
void setAlias (iResourceID id, const iaString &alias)
 
const iResourceID getResource (const iaString &text) const
 
const iResourceID addResource (const iaString &filename, const iaString &alias="", bool internal=false)
 
void removeResource (iResourceID resourceID)
 

Detailed Description

resource dictionary

Constructor & Destructor Documentation

◆ iResourceDictionary()

igor::iResourceDictionary::iResourceDictionary ( )
default

does nothing

Member Function Documentation

◆ addResource()

const iResourceID igor::iResourceDictionary::addResource ( const iaString filename,
const iaString alias = "",
bool  internal = false 
)

adds a resource to the dictionary

Parameters
filenamethe file name of the resource
aliasthe alias to use for this resource
internalif true it is marked for internal use in engine only

◆ clear()

void igor::iResourceDictionary::clear ( )

clears the resource dictionary

◆ getAlias()

const iaString & igor::iResourceDictionary::getAlias ( iResourceID  id) const
Returns
alias for given resource id
Parameters
idthe given resource id

◆ getFilename()

const iaString & igor::iResourceDictionary::getFilename ( iResourceID  id) const
Returns
filename for given resource id
Parameters
idthe given resource id

◆ getResource()

const iResourceID igor::iResourceDictionary::getResource ( const iaString text) const
Returns
resource id for given alias of filepath
Parameters
textthe given alias or filepath

◆ read()

bool igor::iResourceDictionary::read ( const iaString filename)

imports resource dictionary

Parameters
filenamefilename of resource dictionary to import
internalmarks all these entries to not be exported during write
Returns
true if successful

◆ removeResource()

void igor::iResourceDictionary::removeResource ( iResourceID  resourceID)

removes resource with given id

Parameters
resourceIDthe given resource id

◆ setAlias()

void igor::iResourceDictionary::setAlias ( iResourceID  id,
const iaString alias 
)

set alias for given resource (only accept the alias if unique in current environment)

Parameters
idthe given id
aliasthe given alias

◆ write()

bool igor::iResourceDictionary::write ( const iaString filename)

write the current resources in to a dictionary

Parameters
filenameresource dictionary filename
Returns
true if successful

The documentation for this class was generated from the following files: