Panda3D
|
A ConstPointerTo is similar to a PointerTo, except it keeps a const pointer to the thing. More...
#include "pointerTo.h"
Public Types | |
typedef PointerToBase< T >::To | To |
![]() | |
typedef T | To |
Public Member Functions | |
ConstPointerTo (const ConstPointerTo< T > ©) | |
template<class Y > | |
ConstPointerTo (const ConstPointerTo< Y > &r) noexcept | |
ConstPointerTo (const PointerTo< T > ©) | |
template<class Y > | |
ConstPointerTo (const PointerTo< Y > &r) noexcept | |
ConstPointerTo (const To *ptr) noexcept | |
template<class T > | |
ConstPointerTo (const typename ConstPointerTo< T >::To *ptr) noexcept | |
template<class Y > | |
ConstPointerTo (const Y *ptr) noexcept | |
ConstPointerTo (ConstPointerTo< T > &&from) noexcept | |
template<class Y > | |
ConstPointerTo (ConstPointerTo< Y > &&r) noexcept | |
ConstPointerTo (PointerTo< T > &&from) noexcept | |
template<class Y > | |
ConstPointerTo (PointerTo< Y > &&r) noexcept | |
constexpr | ConstPointerTo (std::nullptr_t) noexcept |
const T *& | cheat () |
Returns a reference to the underlying pointer. | |
constexpr | operator const T * () const noexcept |
We also have the typecast operator to automatically convert ConstPointerTo's to the required kind of actual pointer. | |
constexpr const To & | operator* () const noexcept |
constexpr const To * | operator-> () const noexcept |
ConstPointerTo< T > & | operator= (const ConstPointerTo< T > ©) |
template<class Y > | |
ConstPointerTo< T > & | operator= (const ConstPointerTo< Y > &r) noexcept |
ConstPointerTo< T > & | operator= (const PointerTo< T > ©) |
template<class Y > | |
ConstPointerTo< T > & | operator= (const PointerTo< Y > &r) noexcept |
ConstPointerTo< T > & | operator= (const To *ptr) |
ConstPointerTo< T > & | operator= (ConstPointerTo< T > &&from) noexcept |
template<class Y > | |
ConstPointerTo< T > & | operator= (ConstPointerTo< Y > &&r) noexcept |
ConstPointerTo< T > & | operator= (PointerTo< T > &&from) noexcept |
template<class Y > | |
ConstPointerTo< T > & | operator= (PointerTo< Y > &&r) noexcept |
constexpr const To * | p () const noexcept |
Returns an ordinary pointer instead of a ConstPointerTo. | |
![]() | |
void | clear () |
A convenient way to set the PointerTo object to NULL. | |
void | output (std::ostream &out) const |
A handy function to output PointerTo's as a hex pointer followed by a reference count. | |
![]() | |
size_t | get_hash () const |
constexpr bool | is_null () const |
Returns true if the PointerTo is a NULL pointer, false otherwise. | |
bool | operator!= (const PointerToVoid &other) const |
bool | operator< (const PointerToVoid &other) const |
bool | operator< (const void *other) const |
bool | operator== (const PointerToVoid &other) const |
void | swap (PointerToVoid &other) noexcept |
Swaps the contents of this PointerTo with the other, without touching the reference counts. | |
![]() | |
void | operator delete (void *, void *) |
void | operator delete (void *ptr) |
void | operator delete[] (void *, void *) |
void | operator delete[] (void *ptr) |
void * | operator new (size_t size) |
void * | operator new (size_t size, void *ptr) |
void * | operator new[] (size_t size) |
void * | operator new[] (size_t size, void *ptr) |
A ConstPointerTo is similar to a PointerTo, except it keeps a const pointer to the thing.
(Actually, it keeps a non-const pointer, because it must be allowed to adjust the reference counts, and it must be able to delete it when the reference count goes to zero. But it presents only a const pointer to the outside world.)
Notice that a PointerTo may be assigned to a ConstPointerTo, but a ConstPointerTo may not be assigned to a PointerTo.
Definition at line 144 of file pointerTo.h.
typedef PointerToBase<T>::To ConstPointerTo< T >::To |
Definition at line 146 of file pointerTo.h.
|
inlineexplicitconstexprnoexcept |
Definition at line 149 of file pointerTo.h.
|
inline |
Definition at line 198 of file pointerTo.I.
|
inline |
Definition at line 208 of file pointerTo.I.
|
inlinenoexcept |
Definition at line 218 of file pointerTo.I.
|
inlinenoexcept |
Definition at line 228 of file pointerTo.I.
|
inlineexplicitnoexcept |
Definition at line 240 of file pointerTo.I.
|
inlinenoexcept |
Definition at line 251 of file pointerTo.I.
|
inlinenoexcept |
Definition at line 262 of file pointerTo.I.
|
inlinenoexcept |
Definition at line 273 of file pointerTo.I.
|
inlinenoexcept |
Definition at line 284 of file pointerTo.I.
|
inlinenoexcept |
Definition at line 188 of file pointerTo.I.
|
inline |
Returns a reference to the underlying pointer.
This is a very unsafe method. It's only used by some interrogate code. If you think this method might be useful to you, you're probably wrong.
Promise me you won't use this, okay?
Definition at line 395 of file pointerTo.I.
|
constexprnoexcept |
We also have the typecast operator to automatically convert ConstPointerTo's to the required kind of actual pointer.
This introduces ambiguities which the compiler will resolve one way or the other, but we don't care which way it goes because either will be correct.
Definition at line 382 of file pointerTo.I.
|
constexprnoexcept |
Definition at line 361 of file pointerTo.I.
|
constexprnoexcept |
Definition at line 370 of file pointerTo.I.
|
inline |
Definition at line 434 of file pointerTo.I.
|
inlinenoexcept |
Definition at line 328 of file pointerTo.I.
|
inline |
Definition at line 424 of file pointerTo.I.
|
inlinenoexcept |
Definition at line 317 of file pointerTo.I.
|
inline |
Definition at line 414 of file pointerTo.I.
|
inlinenoexcept |
Definition at line 305 of file pointerTo.I.
|
inlinenoexcept |
Definition at line 350 of file pointerTo.I.
|
inlinenoexcept |
Definition at line 295 of file pointerTo.I.
|
inlinenoexcept |
Definition at line 339 of file pointerTo.I.
|
constexprnoexcept |
Returns an ordinary pointer instead of a ConstPointerTo.
Useful to work around compiler problems, particularly for implicit upcasts.
Definition at line 405 of file pointerTo.I.