Dictionary.hpp 727 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef DICTIONARY_H
  2. #define DICTIONARY_H
  3. #include "Variant.hpp"
  4. #include "Array.hpp"
  5. #include <gdnative/dictionary.h>
  6. namespace godot {
  7. class Dictionary {
  8. godot_dictionary _godot_dictionary;
  9. public:
  10. Dictionary();
  11. Dictionary(const Dictionary & other);
  12. Dictionary & operator=(const Dictionary & other);
  13. void clear();
  14. bool empty() const;
  15. void erase(const Variant& key);
  16. bool has(const Variant& key) const;
  17. bool has_all(const Array& keys) const;
  18. uint32_t hash() const;
  19. Array keys() const;
  20. Variant &operator [](const Variant& key);
  21. const Variant &operator [](const Variant& key) const;
  22. int size() const;
  23. String to_json() const;
  24. Array values() const;
  25. ~Dictionary();
  26. };
  27. }
  28. #endif // DICTIONARY_H