4#include "system/object.h"
5#include "system/smart_ptr.h"
6#include "system/weak_ptr.h"
12 template <
typename... Args>
45 ASPOSE_UNUSED(trackResurrection);
74 return wptr ==
nullptr;
81 return !(*
this ==
nullptr);
89 return wptr == other.
wptr;
97 return wptr != other.
wptr;
152 return !wptr.expired();
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
Subclass of System::SmartPtr which sets itself to weak mode at construction. Please note that this cl...
Definition: weak_ptr.h:18
Represents a weak reference, which references an object while still allowing that object to be delete...
Definition: weak_reference.h:19
WeakReference(const SmartPtr< T > &data)
Initializes a new instance of the WeakReference class, referencing the specified object.
Definition: weak_reference.h:35
void SetTarget(const SmartPtr< T > &data)
Sets the object (the target) referenced by the current WeakReference object.
Definition: weak_reference.h:60
WeakPtr< T > wptr
Definition: weak_reference.h:101
bool operator==(std::nullptr_t) const
Checks if referenced object is null.
Definition: weak_reference.h:72
bool operator!=(const WeakReference< T > &other) const
Compares referenced object to another instance WeakReference class.
Definition: weak_reference.h:95
bool TryGetTarget(const SmartPtr< T > &data) const
Gets the object (the target) referenced by the current WeakReference object.
Definition: weak_reference.h:52
bool operator==(const WeakReference< T > &other) const
Compares referenced object to another instance WeakReference class.
Definition: weak_reference.h:87
WeakReference()
Default constructor.
Definition: weak_reference.h:24
WeakReference(std::nullptr_t)
Constructor from nullptr.
Definition: weak_reference.h:29
void reset()
Definition: weak_reference.h:65
bool operator!=(std::nullptr_t) const
Checks if referenced object is not null.
Definition: weak_reference.h:79
WeakReference(const SmartPtr< T > &data, bool trackResurrection)
Initializes a new instance of the WeakReference class, referencing the specified object.
Definition: weak_reference.h:43
Represents a weak reference, which references an object while still allowing that object to be delete...
Definition: weak_reference.h:107
bool get_IsAlive() const
Gets an indication whether the object referenced by the current WeakReference object has been deleted...
Definition: weak_reference.h:150
WeakReference()
Default constructor.
Definition: weak_reference.h:112
const WeakPtr< Object > & get_Target() const
Gets the object (the target) referenced by the current WeakReference object.
Definition: weak_reference.h:136
WeakReference(std::nullptr_t)
Constructor from nullptr.
Definition: weak_reference.h:117
void set_Target(const SmartPtr< Object > &data)
Sets the object (the target) referenced by the current WeakReference object.
Definition: weak_reference.h:143
WeakReference(const SmartPtr< Object > &data)
Initializes a new instance of the WeakReference class, referencing the specified object.
Definition: weak_reference.h:123
WeakReference(const SmartPtr< Object > &data, bool trackResurrection)
Initializes a new instance of the WeakReference class, referencing the specified object.
Definition: weak_reference.h:130
Definition: db_command.h:9
class ASPOSECPP_SHARED_CLASS WeakReference
Represents a weak reference, which references an object while still allowing that object to be delete...
Definition: weak_reference.h:13