Dictionary.hpp 637 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. void clear();
  12. bool empty() const;
  13. void erase(const Variant& key);
  14. bool has(const Variant& key) const;
  15. bool has_all(const Array& keys) const;
  16. uint32_t hash() const;
  17. Array keys() const;
  18. Variant &operator [](const Variant& key);
  19. const Variant &operator [](const Variant& key) const;
  20. int size() const;
  21. String to_json() const;
  22. Array values() const;
  23. ~Dictionary();
  24. };
  25. }
  26. #endif // DICTIONARY_H