#include <weakref.h>
Public Member Functions | |
| const void * | Lock () const | 
| void | Unlock (const void *target) const | 
| operator Bool () const | |
| const void * | GetCurrent () const | 
| void | UnlockCurrent () const | 
| void | Swap (const void *oldTarget, const void *newTarget) | 
Protected Attributes | |
| AtomicUInt | _target | 
| const void* Lock | ( | ) | const | 
Locks the WeakRefTarget.
| void Unlock | ( | const void * | target | ) | const | 
Unlocks the WeakRefTarget. THREADSAFE.
| [in] | target | Pointer to the (new) target to be stored. | 
      
  | 
  explicit | 
Checks if there currently is a target.
| const void* GetCurrent | ( | ) | const | 
| void UnlockCurrent | ( | ) | const | 
Unlocks the current target.
| void Swap | ( | const void * | oldTarget, | 
| const void * | newTarget | ||
| ) | 
Swaps old and new target.
| [in] | oldTarget | Pointer to the old target. | 
| [in] | newTarget | Pointer to the new target to be stored. | 
      
  | 
  mutableprotected |