14#ifndef WEAKPOINTERTO_H
15#define WEAKPOINTERTO_H
31 typedef typename WeakPointerToBase<T>::To To;
48 INLINE To &operator *()
const;
49 INLINE To *operator -> ()
const;
51 INLINE
explicit operator T *()
const;
88 typedef typename WeakPointerToBase<T>::To To;
114 INLINE
const To &operator *()
const;
115 INLINE
const To *operator -> ()
const;
116 INLINE
explicit operator const T *()
const;
120 INLINE
const To *
p()
const;
174#define WPT(type) WeakPointerTo< type >
175#define WCPT(type) WeakConstPointerTo< type >
A ConstPointerTo is similar to a PointerTo, except it keeps a const pointer to the thing.
constexpr bool is_null() const
Returns true if the PointerTo is a NULL pointer, false otherwise.
This file defines the classes PointerTo and ConstPointerTo (and their abbreviations,...
A WeakConstPointerTo is similar to a WeakPointerTo, except it keeps a const pointer to the thing,...
const To * p() const
Returns an ordinary pointer instead of a WeakConstPointerTo.
ConstPointerTo< T > lock() const
A thread-safe way to access the underlying pointer; will silently return null if the underlying point...
const To * get_orig() const
Returns the original pointer value, even if the object has since been deleted.
This is the base class for PointerTo and ConstPointerTo.
void clear()
A convenient way to set the PointerTo object to NULL.
bool owner_before(const WeakPointerToBase< Y > &other) const noexcept
Defines an ordering that is guaranteed to remain consistent even after the weak pointers have expired...
WeakPointerTo is similar to PointerTo, except that it does not actually prevent the referenced pointe...
To * p() const
Returns an ordinary pointer instead of a WeakPointerTo.
PointerTo< T > lock() const
A thread-safe way to access the underlying pointer; will silently return null if the underlying point...
To * get_orig() const
Returns the original pointer value, even if the object has since been deleted.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.