diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/RID.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/core/RID.cpp b/src/core/RID.cpp index 05f2931..aaf8e7a 100644 --- a/src/core/RID.cpp +++ b/src/core/RID.cpp @@ -6,6 +6,10 @@ namespace godot { +RID::RID() +{ + godot::api->godot_rid_new(&_godot_rid); +} RID::RID(Object *p) { @@ -17,5 +21,35 @@ int32_t RID::get_rid() const return godot::api->godot_rid_get_id(&_godot_rid); } +bool RID::operator==(const RID & p_other) const +{ + return godot::api->godot_rid_operator_equal(&_godot_rid, &p_other._godot_rid); +} + +bool RID::operator!=(const RID & p_other) const +{ + return !(*this == p_other); +} + +bool RID::operator<(const RID & p_other) const +{ + return godot::api->godot_rid_operator_less(&_godot_rid, &p_other._godot_rid); +} + +bool RID::operator>(const RID & p_other) const +{ + return !(*this < p_other) && *this != p_other; +} + +bool RID::operator<=(const RID & p_other) const +{ + return (*this < p_other) || *this == p_other; +} + +bool RID::operator>=(const RID & p_other) const +{ + return !(*this < p_other); +} + } |