2017-03-03 02:48:27 +00:00
|
|
|
#ifndef RID_H
|
|
|
|
#define RID_H
|
|
|
|
|
2017-10-03 10:37:34 +00:00
|
|
|
#include <gdnative/rid.h>
|
2017-03-03 02:48:27 +00:00
|
|
|
|
|
|
|
namespace godot {
|
|
|
|
|
|
|
|
class Object;
|
|
|
|
|
2017-07-23 15:53:50 +00:00
|
|
|
class RID {
|
2017-03-03 02:48:27 +00:00
|
|
|
godot_rid _godot_rid;
|
|
|
|
public:
|
|
|
|
|
2018-01-20 18:37:23 +00:00
|
|
|
RID();
|
2017-03-06 07:49:24 +00:00
|
|
|
|
2017-03-06 02:30:46 +00:00
|
|
|
RID(Object *p);
|
|
|
|
|
|
|
|
int32_t get_rid() const;
|
|
|
|
|
2018-01-20 18:37:23 +00:00
|
|
|
inline bool is_valid() const {
|
|
|
|
// is_valid() is not available in the C API...
|
2018-01-25 00:10:55 +00:00
|
|
|
return *this != RID();
|
2018-01-20 18:37:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
2017-03-03 02:48:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // RID_H
|