Files
godot-docs/classes/class_rid.rst
2022-07-27 13:59:06 +02:00

130 lines
5.2 KiB
ReStructuredText

:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/RID.xml.
.. _class_RID:
RID
===
Handle for a :ref:`Resource<class_Resource>`'s unique ID.
Description
-----------
The RID type is used to access the unique integer ID of a resource. They are opaque, which means they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as :ref:`RenderingServer<class_RenderingServer>`.
Constructors
------------
+-----------------------+------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`RID<class_RID_constructor_RID>` **(** **)** |
+-----------------------+------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`RID<class_RID_constructor_RID>` **(** :ref:`RID<class_RID>` from **)** |
+-----------------------+------------------------------------------------------------------------------+
Methods
-------
+-------------------------+----------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_id<class_RID_method_get_id>` **(** **)** |const| |
+-------------------------+----------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_valid<class_RID_method_is_valid>` **(** **)** |const| |
+-------------------------+----------------------------------------------------------------+
Operators
---------
+-------------------------+-----------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`operator !=<class_RID_operator_neq_bool>` **(** :ref:`RID<class_RID>` right **)** |
+-------------------------+-----------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`operator <<class_RID_operator_lt_bool>` **(** :ref:`RID<class_RID>` right **)** |
+-------------------------+-----------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`operator <=<class_RID_operator_lte_bool>` **(** :ref:`RID<class_RID>` right **)** |
+-------------------------+-----------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`operator ==<class_RID_operator_eq_bool>` **(** :ref:`RID<class_RID>` right **)** |
+-------------------------+-----------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`operator ><class_RID_operator_gt_bool>` **(** :ref:`RID<class_RID>` right **)** |
+-------------------------+-----------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`operator >=<class_RID_operator_gte_bool>` **(** :ref:`RID<class_RID>` right **)** |
+-------------------------+-----------------------------------------------------------------------------------------+
Constructor Descriptions
------------------------
.. _class_RID_constructor_RID:
- :ref:`RID<class_RID>` **RID** **(** **)**
Constructs an empty ``RID`` with the invalid ID ``0``.
----
- :ref:`RID<class_RID>` **RID** **(** :ref:`RID<class_RID>` from **)**
Constructs a ``RID`` as a copy of the given ``RID``.
Method Descriptions
-------------------
.. _class_RID_method_get_id:
- :ref:`int<class_int>` **get_id** **(** **)** |const|
Returns the ID of the referenced resource.
----
.. _class_RID_method_is_valid:
- :ref:`bool<class_bool>` **is_valid** **(** **)** |const|
Returns ``true`` if ``RID`` is valid.
Operator Descriptions
---------------------
.. _class_RID_operator_neq_bool:
- :ref:`bool<class_bool>` **operator !=** **(** :ref:`RID<class_RID>` right **)**
----
.. _class_RID_operator_lt_bool:
- :ref:`bool<class_bool>` **operator <** **(** :ref:`RID<class_RID>` right **)**
----
.. _class_RID_operator_lte_bool:
- :ref:`bool<class_bool>` **operator <=** **(** :ref:`RID<class_RID>` right **)**
----
.. _class_RID_operator_eq_bool:
- :ref:`bool<class_bool>` **operator ==** **(** :ref:`RID<class_RID>` right **)**
----
.. _class_RID_operator_gt_bool:
- :ref:`bool<class_bool>` **operator >** **(** :ref:`RID<class_RID>` right **)**
----
.. _class_RID_operator_gte_bool:
- :ref:`bool<class_bool>` **operator >=** **(** :ref:`RID<class_RID>` right **)**
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`