RID.hpp 590 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef RID_H
  2. #define RID_H
  3. #include <gdnative/rid.h>
  4. namespace godot {
  5. class Object;
  6. class RID {
  7. godot_rid _godot_rid;
  8. public:
  9. RID();
  10. RID(Object *p);
  11. int32_t get_rid() const;
  12. inline bool is_valid() const {
  13. // is_valid() is not available in the C API...
  14. return *this == RID();
  15. }
  16. bool operator==(const RID & p_other) const;
  17. bool operator!=(const RID & p_other) const;
  18. bool operator<(const RID & p_other) const;
  19. bool operator>(const RID & p_other) const;
  20. bool operator<=(const RID & p_other) const;
  21. bool operator>=(const RID & p_other) const;
  22. };
  23. }
  24. #endif // RID_H