NDEVR
API Documentation
IconManager

Stores information about many different icons. More...

Collaboration diagram for IconManager:
[legend]

Public Member Functions

void addIcon (const IconDefinition &definition)
 Adds an icon definition to the manager, indexed by its icon ID.
void fromJSON (const JSONNode &node)
 Deserializes icon definitions from a JSON node and adds them to this manager.
void toJSON (JSONNode &node) const
 Serializes all stored icon definitions to a JSON node.

Protected Attributes

Dictionary< String, IconDefinitionm_icons
 Maps icon ID strings to their corresponding IconDefinition objects.

Detailed Description

Stores information about many different icons.


Definition at line 66 of file IconManager.h.

Member Function Documentation

◆ addIcon()

void IconManager::addIcon ( const IconDefinition & definition)
inline

Adds an icon definition to the manager, indexed by its icon ID.

Parameters
[in]definitionThe icon definition to store.

Definition at line 95 of file IconManager.h.

References IconDefinition::icon_id, and m_icons.

Referenced by fromJSON().

◆ fromJSON()

void IconManager::fromJSON ( const JSONNode & node)
inline

Deserializes icon definitions from a JSON node and adds them to this manager.

Parameters
[in]nodeThe JSON node containing icon definition children to read.

Definition at line 84 of file IconManager.h.

References addIcon(), and JSONNode::children().

◆ toJSON()

void IconManager::toJSON ( JSONNode & node) const
inline

Serializes all stored icon definitions to a JSON node.

Parameters
[in]nodeThe JSON node to write the icon definitions into.

Definition at line 73 of file IconManager.h.

References m_icons.


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