Ark Server API (ASA) - Wiki
|
#include <SharedPointer.h>
Public Types | |
using | ElementType = ObjectType |
Static Public Attributes | |
static constexpr ESPMode | Mode = InMode |
Private Attributes | |
ObjectType * | Object |
SharedPointerInternals::FWeakReferencer< Mode > | WeakReferenceCount |
Friends | |
template<class OtherType , ESPMode OtherMode> | |
class | TWeakPtr |
template<class OtherType , ESPMode OtherMode> | |
class | TSharedPtr |
TWeakPtr is a non-intrusive reference-counted weak object pointer. This weak pointer will be conditionally thread-safe when the optional Mode template argument is set to ThreadSafe.
Definition at line 1245 of file SharedPointer.h.
using TWeakPtr< ObjectType, InMode >::ElementType = ObjectType |
Definition at line 1248 of file SharedPointer.h.
|
inline |
Constructs an empty TWeakPtr
Definition at line 1253 of file SharedPointer.h.
|
inline |
Constructs a weak pointer from a shared reference
InSharedRef | The shared reference to create a weak pointer from |
Definition at line 1269 of file SharedPointer.h.
|
inline |
Constructs a weak pointer from a shared pointer
InSharedPtr | The shared pointer to create a weak pointer from |
Definition at line 1284 of file SharedPointer.h.
|
inline |
Special constructor used internally to statically cast one weak pointer type to another. You should never call this constructor directly. Instead, use the StaticCastWeakPtr() function. This constructor creates a weak pointer as a weak reference to an existing weak pointer after statically casting that pointer's object. This constructor is needed for static casts.
InWeakPtr | The weak pointer whose object we should create an additional reference to |
Definition at line 1299 of file SharedPointer.h.
|
inline |
Special constructor used internally to cast a 'const' weak pointer a 'mutable' pointer. You should never call this constructor directly. Instead, use the ConstCastWeakPtr() function. This constructor creates a weak pointer as a weak reference to an existing weak pointer after const casting that pointer's object. This constructor is needed for const casts.
InWeakPtr | The weak pointer whose object we should create an additional reference to |
Definition at line 1314 of file SharedPointer.h.
|
inline |
Constructs a weak pointer from a weak pointer of another type. This constructor is intended to allow derived-to-base conversions.
InWeakPtr | The weak pointer to create a weak pointer from |
Definition at line 1330 of file SharedPointer.h.
|
inline |
Definition at line 1340 of file SharedPointer.h.
|
inline |
Definition at line 1347 of file SharedPointer.h.
|
inline |
Definition at line 1353 of file SharedPointer.h.
|
inline |
Definition at line 1508 of file SharedPointer.h.
|
inline |
Returns true if the object this weak pointer points to is the same as the specified object pointer.
Definition at line 1503 of file SharedPointer.h.
|
inline |
Checks to see if this weak pointer actually has a valid reference to an object
Definition at line 1486 of file SharedPointer.h.
|
inline |
Assignment to a nullptr pointer. Clears this weak pointer's reference.
Definition at line 1364 of file SharedPointer.h.
|
inline |
Assignment operator sets this weak pointer from a shared pointer
InSharedPtr | The shared pointer used to assign to this weak pointer |
Definition at line 1448 of file SharedPointer.h.
|
inline |
Assignment operator sets this weak pointer from a shared reference
InSharedRef | The shared reference used to assign to this weak pointer |
Definition at line 1432 of file SharedPointer.h.
|
inline |
Definition at line 1382 of file SharedPointer.h.
|
inline |
Assignment operator adds a weak reference to the object referenced by the specified weak pointer
InWeakPtr | The weak pointer for the object to assign |
Definition at line 1375 of file SharedPointer.h.
|
inline |
Definition at line 1414 of file SharedPointer.h.
|
inline |
Assignment operator adds a weak reference to the object referenced by the specified weak pointer. This assignment operator is intended to allow derived-to-base conversions.
InWeakPtr | The weak pointer for the object to assign |
Definition at line 1403 of file SharedPointer.h.
|
inline |
Converts this weak pointer to a shared pointer that you can use to access the object (if it hasn't expired yet.) Remember, if there are no more shared references to the object, the returned shared pointer will not be valid. You should always check to make sure the returned pointer is valid before trying to dereference the shared pointer!
Definition at line 1476 of file SharedPointer.h.
|
inline |
Converts this weak pointer to a shared pointer that you can use to access the object (if it hasn't expired yet.) Remember, if there are no more shared references to the object, the returned shared pointer will not be valid. You should always check to make sure the returned pointer is valid before trying to dereference the shared pointer!
Definition at line 1463 of file SharedPointer.h.
|
inline |
Resets this weak pointer, removing a weak reference to the object. If there are no other shared or weak references to the object, then the tracking object will be destroyed.
Definition at line 1495 of file SharedPointer.h.
|
friend |
Definition at line 1519 of file SharedPointer.h.
Definition at line 1516 of file SharedPointer.h.
Definition at line 1249 of file SharedPointer.h.
|
private |
The object we have a weak reference to. Can be nullptr. Also, it's important to note that because this is a weak reference, the object this pointer points to may have already been destroyed.
Definition at line 1525 of file SharedPointer.h.
|
private |
Interface to the reference counter for this object. Note that the actual reference controller object is shared by all shared and weak pointers that refer to the object
Definition at line 1529 of file SharedPointer.h.