123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- #ifndef DICTIONARY_H
- #define DICTIONARY_H
- #include "array.h"
- #include "list.h"
- #include "ustring.h"
- class Variant;
- struct DictionaryPrivate;
- class Dictionary {
- mutable DictionaryPrivate *_p;
- void _ref(const Dictionary &p_from) const;
- void _unref() const;
- public:
- void get_key_list(List<Variant> *p_keys) const;
- Variant &operator[](const Variant &p_key);
- const Variant &operator[](const Variant &p_key) const;
- const Variant *getptr(const Variant &p_key) const;
- Variant *getptr(const Variant &p_key);
- Variant get_valid(const Variant &p_key) const;
- int size() const;
- bool empty() const;
- void clear();
- bool has(const Variant &p_key) const;
- bool has_all(const Array &p_keys) const;
- void erase(const Variant &p_key);
- bool erase_checked(const Variant &p_key);
- bool operator==(const Dictionary &p_dictionary) const;
- uint32_t hash() const;
- void operator=(const Dictionary &p_dictionary);
- const Variant *next(const Variant *p_key = NULL) const;
- Array keys() const;
- Array values() const;
- Dictionary duplicate() const;
- Dictionary(const Dictionary &p_from);
- Dictionary();
- ~Dictionary();
- };
- #endif
|