|
libRocket
|
#include <Dictionary.h>
Public Member Functions | |
| Dictionary () | |
| Dictionary (const Dictionary &dict) | |
| ~Dictionary () | |
| void | Set (const String &key, const Variant &value) |
| Store an item in the dictionary. More... | |
| template<typename T > | |
| void | Set (const String &key, const T &value) |
| Templated set eases setting of values. More... | |
| Variant * | Get (const String &key) const |
| Get an item from the dictionary. More... | |
| Variant * | operator[] (const String &key) const |
| template<typename T > | |
| T | Get (const String &key, const T &default_val) const |
| template<typename T > | |
| bool | GetInto (const String &key, T &value) const |
| bool | Remove (const String &key) |
| Remove an item from the dictionary. More... | |
| bool | Iterate (int &pos, String &key, Variant *&value) const |
| Iterate through a dictionary. More... | |
| template<typename T > | |
| bool | Iterate (int &pos, String &key, T &value) const |
| bool | Reserve (int size) |
| Reserve the specified number of entries in the dictionary. More... | |
| void | Clear () |
| Empty the dictionary. More... | |
| bool | IsEmpty () const |
| Is the dictionary empty? More... | |
| int | Size () const |
| Items in the dict. More... | |
| void | Merge (const Dictionary &dict) |
| Merges another dictionary into this one. Any existing values stored against similar keys will be updated. More... | |
| void | operator= (const Dictionary &dict) |
A dictionay is a container of variants. It uses a hash table to maintain a string key to variant mapping.
| Rocket::Core::Dictionary::Dictionary | ( | ) |
| Rocket::Core::Dictionary::Dictionary | ( | const Dictionary & | dict | ) |
| Rocket::Core::Dictionary::~Dictionary | ( | ) |
| void Rocket::Core::Dictionary::Clear | ( | ) |
Empty the dictionary.
|
inline |
Get a value from the dictionary, if it doesn't exist use the supplied default value
|
inline |
Get a value from the dictionary, returns if the value was found or not.
| bool Rocket::Core::Dictionary::IsEmpty | ( | ) | const |
Is the dictionary empty?
Iterate through a dictionary.
|
inline |
| void Rocket::Core::Dictionary::Merge | ( | const Dictionary & | dict | ) |
Merges another dictionary into this one. Any existing values stored against similar keys will be updated.
| void Rocket::Core::Dictionary::operator= | ( | const Dictionary & | dict | ) |
| bool Rocket::Core::Dictionary::Remove | ( | const String & | key | ) |
Remove an item from the dictionary.
| bool Rocket::Core::Dictionary::Reserve | ( | int | size | ) |
Reserve the specified number of entries in the dictionary.
Store an item in the dictionary.
|
inline |
Templated set eases setting of values.
| int Rocket::Core::Dictionary::Size | ( | ) | const |
Items in the dict.
1.8.8