godot-cpp/include/core/Dictionary.hpp

58 lines
864 B
C++
Raw Normal View History

#ifndef DICTIONARY_H
#define DICTIONARY_H
2017-03-15 22:19:58 +00:00
#if defined(_WIN32)
# ifdef _GD_CPP_CORE_API_IMPL
# define GD_CPP_CORE_API __declspec(dllexport)
# else
# define GD_CPP_CORE_API __declspec(dllimport)
# endif
#else
# define GD_CPP_CORE_API
#endif
2017-03-06 07:49:24 +00:00
#include "Variant.hpp"
2017-03-06 07:49:24 +00:00
#include "Array.hpp"
#include <godot/godot_dictionary.h>
namespace godot {
2017-03-15 22:19:58 +00:00
class GD_CPP_CORE_API Dictionary {
godot_dictionary _godot_dictionary;
public:
Dictionary();
void clear();
bool empty() const;
void erase(const Variant& key);
bool has(const Variant& key) const;
bool has_all(const Array& keys) const;
uint32_t hash() const;
Array keys() const;
Variant &operator [](const Variant& key);
const Variant &operator [](const Variant& key) const;
int size() const;
String to_json() const;
Array values() const;
~Dictionary();
};
}
#endif // DICTIONARY_H