mirror of
https://forge.univ-lyon1.fr/tplifap4/dungeonanddeamon.git
synced 2024-02-27 13:31:50 +01:00
Let's code
This commit is contained in:
54
GodoBinding/include/core/Dictionary.hpp
Normal file
54
GodoBinding/include/core/Dictionary.hpp
Normal file
@@ -0,0 +1,54 @@
|
||||
#ifndef DICTIONARY_H
|
||||
#define DICTIONARY_H
|
||||
|
||||
#include "Variant.hpp"
|
||||
|
||||
#include "Array.hpp"
|
||||
|
||||
#include <gdnative/dictionary.h>
|
||||
|
||||
namespace godot {
|
||||
|
||||
class Dictionary {
|
||||
godot_dictionary _godot_dictionary;
|
||||
|
||||
public:
|
||||
Dictionary();
|
||||
Dictionary(const Dictionary &other);
|
||||
Dictionary &operator=(const Dictionary &other);
|
||||
|
||||
template <class... Args>
|
||||
static Dictionary make(Args... args) {
|
||||
return helpers::add_all(Dictionary(), args...);
|
||||
}
|
||||
|
||||
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();
|
||||
};
|
||||
|
||||
} // namespace godot
|
||||
|
||||
#endif // DICTIONARY_H
|
||||
Reference in New Issue
Block a user