Navigation
API > API/Plugins > API/Plugins/MutableRuntime
Some of the objects used by the runtime use reference counting to control their life-cycle. When an objects is returned in such a pointer, the user should keep this pointer valid while the data is in use, and clear it when done by assigning nullptr to it. The data returned in Ptr
The underlying lower-level pointer can be obtained with the get() method, but it should never be stored, since it will be valid only while there are valid Ptr<> to the same object.
| Name | Ptr |
| Type | class |
| Header File | /Engine/Plugins/Mutable/Source/MutableRuntime/Public/MuR/Ptr.h |
| Include Path | #include "MuR/Ptr.h" |
Syntax
template<class T>
class Ptr
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| MuR/Ptr.h | |||
| Assign constructor. | MuR/Ptr.h | ||
| Move constructor. | MuR/Ptr.h | ||
Ptr
(
T* p, |
MuR/Ptr.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~Ptr() |
MuR/Ptr.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| m_ptr | T * | MuR/Ptr.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
T * get() |
MuR/Ptr.h | ||
void reset () |
MuR/Ptr.h | ||
void reset
(
T* rhs |
MuR/Ptr.h | ||
void swap
(
Ptr& rhs |
MuR/Ptr.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
operator bool() |
MuR/Ptr.h | ||
T & operator*() |
MuR/Ptr.h | ||
| MuR/Ptr.h | |||
| Assign with copy. | MuR/Ptr.h | ||
| Assign with move. | MuR/Ptr.h | ||
| MuR/Ptr.h | |||
T * operator->() |
MuR/Ptr.h |