Panda3D
Public Types | Public Member Functions | Protected Member Functions
ThreadSafePointerToBase< T > Class Template Reference

This is the base class for ThreadSafePointerTo and ThreadSafeConstPointerTo. More...

#include "threadSafePointerToBase.h"

Inheritance diagram for ThreadSafePointerToBase< T >:
PointerToVoid MemoryBase ThreadSafeConstPointerTo< T > ThreadSafePointerTo< T >

List of all members.

Public Types

typedef T To

Public Member Functions

void clear ()
 A convenient way to set the ThreadSafePointerTo object to NULL.
void output (ostream &out) const
 A handy function to output ThreadSafePointerTo's as a hex pointer followed by a reference count.

Protected Member Functions

 ThreadSafePointerToBase (To *ptr)
 ThreadSafePointerToBase (const ThreadSafePointerToBase< T > &copy)
void reassign (To *ptr)
 This is the main work of the ThreadSafePointerTo family.
void reassign (const ThreadSafePointerToBase< To > &copy)

Detailed Description

template<class T>
class ThreadSafePointerToBase< T >

This is the base class for ThreadSafePointerTo and ThreadSafeConstPointerTo.

Don't try to use it directly; use either derived class instead.

Definition at line 33 of file threadSafePointerToBase.h.


Member Function Documentation

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

A convenient way to set the ThreadSafePointerTo object to NULL.

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

Reimplemented in ThreadSafeConstPointerTo< T >, and ThreadSafePointerTo< T >.

Definition at line 136 of file threadSafePointerToBase.I.

template<class T >
void ThreadSafePointerToBase< T >::output ( ostream &  out) const [inline]

A handy function to output ThreadSafePointerTo's as a hex pointer followed by a reference count.

Definition at line 148 of file threadSafePointerToBase.I.

template<class T >
void ThreadSafePointerToBase< T >::reassign ( To *  ptr) [inline, protected]

This is the main work of the ThreadSafePointerTo family.

When the pointer is reassigned, decrement the old reference count and increment the new one.

Definition at line 58 of file threadSafePointerToBase.I.


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