2#include <NDEVR/Dictionary.h>
3#include <NDEVR/JSONNode.h>
4#include <NDEVR/String.h>
77 def.second.toJSON(node[def.first]);
102 #define _i(id, def) (IconDefinition(id, def))
A hash-based key-value store, useful for quick associative lookups.
Stores information about many different icons.
void addIcon(const IconDefinition &definition)
Adds an icon definition to the manager, indexed by its icon ID.
Dictionary< String, IconDefinition > m_icons
Maps icon ID strings to their corresponding IconDefinition objects.
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.
JavaScript Object Notation or JSON is an open - standard file format that uses human - readable text ...
decltype(auto) getAs() const
const Buffer< JSONNode * > & children() const
Returns the ordered list of child node pointers.
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
The primary namespace for the NDEVR SDK.
Information for displaying a particular icon.
IconDefinition(const StringView &def)
Constructs an IconDefinition using the same value for both the icon ID and default draw operation.
String icon_id
The unique identifier string for this icon.
String default_draw_operation
The default draw operation used to render this icon.
void fromJSON(const JSONNode &node)
Deserializes this icon definition from a JSON node.
IconDefinition(const StringView &id, const StringView &def)
Constructs an IconDefinition with separate icon ID and default draw operation.
IconDefinition(const JSONNode &node)
Constructs an IconDefinition by deserializing from a JSON node.
void toJSON(JSONNode &node) const
Serializes this icon definition to a JSON node.