Panda3D
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
ThreadSafeConstPointerTo< T > Class Template Reference
Inheritance diagram for ThreadSafeConstPointerTo< T >:
ThreadSafePointerToBase< T > PointerToVoid MemoryBase

Public Types

typedef ThreadSafePointerToBase< T >::To To
 
- Public Types inherited from ThreadSafePointerToBase< T >
typedef T To
 

Public Member Functions

 ThreadSafeConstPointerTo (const ThreadSafeConstPointerTo< T > &copy)
 
 ThreadSafeConstPointerTo (const ThreadSafePointerTo< T > &copy)
 
 ThreadSafeConstPointerTo (const To *ptr=nullptr)
 
void clear ()
 
 operator const T * () const
 We also have the typecast operator to automatically convert ThreadSafeConstPointerTo's to the required kind of actual pointer.
 
const To & operator* () const
 
const To * operator-> () const
 
ThreadSafeConstPointerTo< T > & operator= (const ThreadSafeConstPointerTo< T > &copy)
 
ThreadSafeConstPointerTo< T > & operator= (const ThreadSafePointerTo< T > &copy)
 
ThreadSafeConstPointerTo< T > & operator= (const To *ptr)
 
const To * p () const
 Returns an ordinary pointer instead of a ThreadSafeConstPointerTo.
 
- Public Member Functions inherited from ThreadSafePointerToBase< T >
void clear ()
 A convenient way to set the ThreadSafePointerTo object to NULL.
 
void output (std::ostream &out) const
 A handy function to output ThreadSafePointerTo's as a hex pointer followed by a reference count.
 
- Public Member Functions inherited from PointerToVoid
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.
 
- Public Member Functions inherited from MemoryBase
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)
 

Detailed Description

template<class T>
class ThreadSafeConstPointerTo< T >

Definition at line 72 of file threadSafePointerTo.h.

Member Typedef Documentation

◆ To

template<class T >
typedef ThreadSafePointerToBase<T>::To ThreadSafeConstPointerTo< T >::To

Definition at line 74 of file threadSafePointerTo.h.

Constructor & Destructor Documentation

◆ ThreadSafeConstPointerTo() [1/2]

template<class T >
ThreadSafeConstPointerTo< T >::ThreadSafeConstPointerTo ( const ThreadSafePointerTo< T > & copy)
inline

Definition at line 114 of file threadSafePointerTo.I.

◆ ThreadSafeConstPointerTo() [2/2]

template<class T >
ThreadSafeConstPointerTo< T >::ThreadSafeConstPointerTo ( const ThreadSafeConstPointerTo< T > & copy)
inline

Definition at line 132 of file threadSafePointerTo.I.

◆ ~ThreadSafeConstPointerTo()

template<class T >
ThreadSafeConstPointerTo< T >::~ThreadSafeConstPointerTo ( )
inline

Definition at line 124 of file threadSafePointerTo.I.

Member Function Documentation

◆ clear()

template<class T >
void ThreadSafeConstPointerTo< T >::clear ( )
inline

Definition at line 97 of file threadSafePointerTo.h.

◆ operator const T *()

template<class T >
ThreadSafeConstPointerTo< T >::operator const T * ( ) const
inline

We also have the typecast operator to automatically convert ThreadSafeConstPointerTo'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 164 of file threadSafePointerTo.I.

References AtomicAdjustDummyImpl::get_ptr().

◆ operator*()

template<class T >
const ThreadSafeConstPointerTo< T >::To & ThreadSafeConstPointerTo< T >::operator* ( ) const
inline

Definition at line 142 of file threadSafePointerTo.I.

◆ operator->()

template<class T >
const ThreadSafeConstPointerTo< T >::To * ThreadSafeConstPointerTo< T >::operator-> ( ) const
inline

Definition at line 151 of file threadSafePointerTo.I.

◆ operator=() [1/3]

template<class T >
ThreadSafeConstPointerTo< T > & ThreadSafeConstPointerTo< T >::operator= ( const ThreadSafeConstPointerTo< T > & copy)
inline

Definition at line 203 of file threadSafePointerTo.I.

◆ operator=() [2/3]

template<class T >
ThreadSafeConstPointerTo< T > & ThreadSafeConstPointerTo< T >::operator= ( const ThreadSafePointerTo< T > & copy)
inline

Definition at line 193 of file threadSafePointerTo.I.

◆ operator=() [3/3]

template<class T >
ThreadSafeConstPointerTo< T > & ThreadSafeConstPointerTo< T >::operator= ( const To * ptr)
inline

Definition at line 183 of file threadSafePointerTo.I.

◆ p()

template<class T >
const ThreadSafeConstPointerTo< T >::To * ThreadSafeConstPointerTo< T >::p ( ) const
inline

Returns an ordinary pointer instead of a ThreadSafeConstPointerTo.

Useful to work around compiler problems, particularly for implicit upcasts.

Definition at line 174 of file threadSafePointerTo.I.

References AtomicAdjustDummyImpl::get_ptr().


The documentation for this class was generated from the following files: