Panda3D
Public Types | Public Member Functions
ThreadSafeConstPointerTo< T > Class Template Reference
Inheritance diagram for ThreadSafeConstPointerTo< T >:
ThreadSafePointerToBase< T > PointerToVoid MemoryBase

List of all members.

Public Types

typedef
ThreadSafePointerToBase< T >
::To 
To

Public Member Functions

 ThreadSafeConstPointerTo (const To *ptr=(const To *) NULL)
 ThreadSafeConstPointerTo (const ThreadSafePointerTo< T > &copy)
 ThreadSafeConstPointerTo (const ThreadSafeConstPointerTo< T > &copy)
void clear ()
 A convenient way to set the ThreadSafePointerTo object to NULL.
 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 To *ptr)
ThreadSafeConstPointerTo< T > & operator= (const ThreadSafePointerTo< T > &copy)
ThreadSafeConstPointerTo< T > & operator= (const ThreadSafeConstPointerTo< T > &copy)
const To * p () const
 Returns an ordinary pointer instead of a ThreadSafeConstPointerTo.

Detailed Description

template<class T>
class ThreadSafeConstPointerTo< T >

Definition at line 77 of file threadSafePointerTo.h.


Member Function Documentation

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

A convenient way to set the ThreadSafePointerTo object to NULL.

(Assignment to a NULL pointer also works, of course.)

Reimplemented from ThreadSafePointerToBase< T >.

Definition at line 102 of file threadSafePointerTo.h.

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 204 of file threadSafePointerTo.I.

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 217 of file threadSafePointerTo.I.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations