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

This is the base class for PointerTo and ConstPointerTo. More...

#include "pointerToBase.h"

Inheritance diagram for PointerToBase< T >:
PointerToVoid MemoryBase ConstPointerTo< T > PointerTo< T >

List of all members.

Public Types

typedef T To

Public Member Functions

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

Protected Member Functions

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

Detailed Description

template<class T>
class PointerToBase< T >

This is the base class for PointerTo and ConstPointerTo.

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

Definition at line 32 of file pointerToBase.h.


Member Function Documentation

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

A convenient way to set the PointerTo object to NULL.

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

Reimplemented in ConstPointerToArray< Element >, ConstPointerToArray< unsigned char >, PointerToArray< Element >, ConstPointerTo< T >, and PointerTo< T >.

Definition at line 126 of file pointerToBase.I.

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

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

Definition at line 138 of file pointerToBase.I.

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

This is the main work of the PointerTo family.

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

Definition at line 58 of file pointerToBase.I.


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