RID.hpp 602 B

1234567891011121314151617181920212223242526272829303132333435
  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. } // namespace godot
  24. #endif // RID_H