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 > const To * get_orig() const
Returns the original pointer value, even if the object has since been deleted.
To * get_orig() const
Returns the original pointer value, even if the object has since been deleted.
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...
void clear()
A convenient way to set the PointerTo object to NULL.
constexpr bool is_null() const
Returns true if the PointerTo is a NULL pointer, false otherwise.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
To * p() const
Returns an ordinary pointer instead of a WeakPointerTo.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
const To * p() const
Returns an ordinary pointer instead of a WeakConstPointerTo.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PointerTo< T > lock() const
A thread-safe way to access the underlying pointer; will silently return null if the underlying point...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A WeakConstPointerTo is similar to a WeakPointerTo, except it keeps a const pointer to the thing,...
A ConstPointerTo is similar to a PointerTo, except it keeps a const pointer to the thing.
This file defines the classes PointerTo and ConstPointerTo (and their abbreviations,...
This is the base class for PointerTo and ConstPointerTo.
ConstPointerTo< T > lock() const
A thread-safe way to access the underlying pointer; will silently return null if the underlying point...