NDEVR
API Documentation
IconDefinition

Information for displaying a particular icon. More...

Collaboration diagram for IconDefinition:
[legend]

Public Member Functions

 IconDefinition (const JSONNode &node)
 Constructs an IconDefinition by deserializing from a JSON node.
 IconDefinition (const StringView &def)
 Constructs an IconDefinition using the same value for both the icon ID and default draw operation.
 IconDefinition (const StringView &id, const StringView &def)
 Constructs an IconDefinition with separate icon ID and default draw operation.
void fromJSON (const JSONNode &node)
 Deserializes this icon definition from a JSON node.
void toJSON (JSONNode &node) const
 Serializes this icon definition to a JSON node.

Public Attributes

String default_draw_operation
 The default draw operation used to render this icon.
String icon_id
 The unique identifier string for this icon.

Detailed Description

Information for displaying a particular icon.


Definition at line 11 of file IconManager.h.

Constructor & Destructor Documentation

◆ IconDefinition() [1/3]

IconDefinition::IconDefinition ( const StringView & def)
inline

Constructs an IconDefinition using the same value for both the icon ID and default draw operation.

Parameters
[in]defThe string used as both the icon identifier and the default draw operation.

Definition at line 17 of file IconManager.h.

References default_draw_operation, and icon_id.

◆ IconDefinition() [2/3]

IconDefinition::IconDefinition ( const StringView & id,
const StringView & def )
inline

Constructs an IconDefinition with separate icon ID and default draw operation.

Parameters
[in]idThe unique identifier for the icon.
[in]defThe default draw operation string for rendering the icon.

Definition at line 27 of file IconManager.h.

References default_draw_operation, and icon_id.

◆ IconDefinition() [3/3]

IconDefinition::IconDefinition ( const JSONNode & node)
inline

Constructs an IconDefinition by deserializing from a JSON node.

Parameters
[in]nodeThe JSON node containing the icon definition data.

Definition at line 36 of file IconManager.h.

References fromJSON().

Member Function Documentation

◆ fromJSON()

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

Deserializes this icon definition from a JSON node.

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

Definition at line 53 of file IconManager.h.

References default_draw_operation, JSONNode::getAs(), and icon_id.

Referenced by IconDefinition().

◆ toJSON()

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

Serializes this icon definition to a JSON node.

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

Definition at line 44 of file IconManager.h.

References default_draw_operation, and icon_id.


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