Luna::Ref
The smart pointer that represents one typed strong reference to one boxed object.
template <typename _Ty>
class Luna::Ref
Member functions
-
Resets the reference to null.
-
Checks whether this reference is valid.
-
Gets the boxed object.
-
Gets the boxed object casted to
_Ty
. -
Gets the boxed object casted to
_Ty
. -
Attaches provided pointer.
-
Detaches the stored pointer. The reference becomes null after this operation.
-
Constructs one null reference.
-
Constructs one reference by coping the pointer from another reference of the same type.
-
Constructs one reference by moving the pointer from another reference of the same type.
-
Ref & operator=(const Ref &rhs)
Assigns this reference by coping the pointer from another reference of the same type.
-
Assigns this reference by moving the pointer from another reference of the same type.
-
Constructs one reference by coping the pointer from another reference of one different type.
-
Ref & operator=(const Ref< _Rty > &rhs)
Assigns this reference by coping the pointer from another reference of one different type.
-
Constructs one reference by moving the pointer from another reference of one different type.
-
Ref & operator=(Ref< _Rty > &&rhs)
Assigns this reference by moving the pointer from another reference of one different type.
-
Constructs one reference using the native pointer of the same type.
-
Assigns this reference using the native pointer of the same type.
-
Constructs one reference using the native pointer of one different type.
-
Constructs one reference by coping the pointer from one typeless reference.
-
Constructs one reference by moving the pointer from one typeless reference.
-
Ref & operator=(const ObjRef &rhs)
Assigns this reference by coping the pointer from one typeless reference.
-
Assigns this reference by moving the pointer from one typeless reference.
-
bool operator==(const Ref &rhs) const
Compares two references for equality.
-
bool operator!=(const Ref &rhs) const
Compares two references for non-equality.
-
bool operator==(_Ty *rhs) const
Compares one reference with one native pointer for equality.
-
bool operator!=(_Ty *rhs) const
Compares one reference with one native pointer for non-equality.
-
bool operator<(const Ref &rhs) const
Compares two references.
-
Gets the boxed object casted to
_Ty
. -
Gets the boxed object casted to
_Rty
.