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:
35
GodoBinding/include/core/RID.hpp
Normal file
35
GodoBinding/include/core/RID.hpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#ifndef RID_H
|
||||
#define RID_H
|
||||
|
||||
#include <gdnative/rid.h>
|
||||
|
||||
namespace godot {
|
||||
|
||||
class Object;
|
||||
|
||||
class RID {
|
||||
godot_rid _godot_rid;
|
||||
|
||||
public:
|
||||
RID();
|
||||
|
||||
RID(Object *p);
|
||||
|
||||
int32_t get_rid() const;
|
||||
|
||||
inline bool is_valid() const {
|
||||
// is_valid() is not available in the C API...
|
||||
return *this != RID();
|
||||
}
|
||||
|
||||
bool operator==(const RID &p_other) const;
|
||||
bool operator!=(const RID &p_other) const;
|
||||
bool operator<(const RID &p_other) const;
|
||||
bool operator>(const RID &p_other) const;
|
||||
bool operator<=(const RID &p_other) const;
|
||||
bool operator>=(const RID &p_other) const;
|
||||
};
|
||||
|
||||
} // namespace godot
|
||||
|
||||
#endif // RID_H
|
||||
Reference in New Issue
Block a user