![]() |
Nazara Engine
0.4
A fast, complete, cross-platform API designed for game development
|
Core class that represents a reference to an object. More...
Public Member Functions | |
| ObjectRef () | |
| Constructs a ObjectRef object by default. | |
| ObjectRef (T *object) | |
| Constructs a ObjectRef object with a pointer to an object. More... | |
| ObjectRef (const ObjectRef &ref) | |
| Constructs a ObjectRef object by assignation. More... | |
| template<typename U > | |
| ObjectRef (const ObjectRef< U > &ref) | |
| Constructs a ObjectRef<U> object from another type of ObjectRef. More... | |
| ObjectRef (ObjectRef &&ref) noexcept | |
| Constructs a ObjectRef object by move semantic. More... | |
| ~ObjectRef () | |
| Destructs the object (remove a reference to the object when shared) | |
| T * | Get () const |
| Gets the underlying pointer. More... | |
| bool | IsValid () const |
| Checks whether the reference is valid. More... | |
| T * | Release () |
| Releases the handle of the pointer. More... | |
| bool | Reset (T *object=nullptr) |
| Resets the content of the ObjectRef with another pointer. More... | |
| ObjectRef & | Swap (ObjectRef &ref) |
| Swaps the content of the two ObjectRef. More... | |
| operator bool () const | |
| Converts the ObjectRef to bool. More... | |
| operator T* () const | |
| Dereferences the ObjectRef. More... | |
| T * | operator-> () const |
| Dereferences the ObjectRef. More... | |
| ObjectRef & | operator= (T *object) |
| Assigns the object into this. More... | |
| ObjectRef & | operator= (const ObjectRef &ref) |
| Sets the reference of the ObjectRef with the handle from another. More... | |
| template<typename U > | |
| ObjectRef & | operator= (const ObjectRef< U > &ref) |
| ObjectRef & | operator= (ObjectRef &&ref) noexcept |
| Moves the ObjectRef into this. More... | |
| template<typename U > | |
| ObjectRef< T > & | operator= (const ObjectRef< U > &ref) |
| Sets the reference of the ObjectRef from another type of ObjectRef. More... | |
Core class that represents a reference to an object.
| Nz::ObjectRef< T >::ObjectRef | ( | T * | object | ) |
Constructs a ObjectRef object with a pointer to an object.
| object | Pointer to handle like a reference (can be nullptr) |
| Nz::ObjectRef< T >::ObjectRef | ( | const ObjectRef< T > & | ref | ) |
| Nz::ObjectRef< T >::ObjectRef | ( | const ObjectRef< U > & | ref | ) |
|
noexcept |
| T * Nz::ObjectRef< T >::Get | ( | ) | const |
Gets the underlying pointer.
| bool Nz::ObjectRef< T >::IsValid | ( | ) | const |
Checks whether the reference is valid.
|
explicit |
| Nz::ObjectRef< T >::operator T* | ( | ) | const |
Dereferences the ObjectRef.
| T * Nz::ObjectRef< T >::operator-> | ( | ) | const |
Dereferences the ObjectRef.
| ObjectRef< T > & Nz::ObjectRef< T >::operator= | ( | T * | object | ) |
Assigns the object into this.
| object | Pointer to handle like a reference (can be nullptr) |
| ObjectRef< T > & Nz::ObjectRef< T >::operator= | ( | const ObjectRef< T > & | ref | ) |
|
noexcept |
| ObjectRef<T>& Nz::ObjectRef< T >::operator= | ( | const ObjectRef< U > & | ref | ) |
| T * Nz::ObjectRef< T >::Release | ( | ) |
Releases the handle of the pointer.
| bool Nz::ObjectRef< T >::Reset | ( | T * | object = nullptr | ) |
Resets the content of the ObjectRef with another pointer.
| ObjectRef< T > & Nz::ObjectRef< T >::Swap | ( | ObjectRef< T > & | ref | ) |