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