AliasDictionary

The AliasDictionary class provides an alias dictionary to allow quick on-the-fly conversion of unit name aliases such as km/h -> kmph, kmh etc.

Constructors

this
this()

Default constructor as it is

Members

Functions

addAlias
void addAlias(string name, string aliasName)

Adds an alias to the dictionary

aliases
string[] aliases(string name)

Gets a list of aliases for a given name

clear
void clear()

Removes all alias-name from dictionary

isEmpty
bool isEmpty()

Checks if this dictionary is empty

loadFromJson
void loadFromJson(JSONValue json)

Loads alias rules from JSON

name
string name(string aliasName)

Gets name by alias

opBinaryRight
bool opBinaryRight(string aliasName)

Checks if a dictionary contains name for the given alias

Variables

m_aliases
string[string] m_aliases;

Undocumented in source.

m_names
RedBlackTree!string m_names;

Undocumented in source.

Meta