summaryrefslogtreecommitdiffstats
path: root/include/godot_cpp/core/Dictionary.hpp
blob: 139e3ff5ba091ba133add0fc93f3722dfb27a5d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef DICTIONARY_H
#define DICTIONARY_H

#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

#include "Variant.hpp"

#include "Array.hpp"

#include <godot/godot_dictionary.h>

namespace godot {

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;

	int parse_json(const String& json);

	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