Update the rules for RefCountedObject

This commit is contained in:
yvt 2019-07-20 13:25:35 +09:00
parent a44a900c62
commit 9e770cc040
No known key found for this signature in database
GPG Key ID: 48F2768FA8D07C92

View File

@ -53,15 +53,8 @@ namespace spades {
* if it is apparent that they store the object as `Handle<T>`.
* - Methods return `T` via a return type `Handle<T>`.
*
* # AngelScript interop
*
* - A return type `Handle<T>` translates to an AngelScript type signature
* `T@`.
* - Methods must not return `T&` or `stmp::optional<T&>`.
* - A parameter type `stmp::optional<T&>` translates to an AngelScript
* type signature `T@+`.
* - Methods must not have a parameter of type `T&` because AngelScript
* does not have a non-nullable object handle.
* Note that `stmp::optional` nor `Handle` can be passed to/from AngelScript
* safely.
*/
class RefCountedObject {
std::atomic<int> refCount;