Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PointerToBase< T > Class Template Reference

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

#include <pointerTo.h>

Inheritance diagram for PointerToBase< T >:

ConstPointerTo< T > PointerTo< T > List of all members.

Public Types

typedef T To

Public Member Functions

bool operator== (const To *other) const
bool operator!= (const To *other) const
bool operator> (const To *other) const
bool operator<= (const To *other) const
bool operator>= (const To *other) const
bool operator== (To *other) const
bool operator!= (To *other) const
bool operator> (To *other) const
bool operator<= (To *other) const
bool operator>= (To *other) const
bool operator== (const PointerToBase< To > &other) const
bool operator!= (const PointerToBase< To > &other) const
bool operator> (const PointerToBase< To > &other) const
bool operator<= (const PointerToBase< To > &other) const
bool operator>= (const PointerToBase< To > &other) const
bool operator< (const To *other) const
bool operator< (const PointerToBase< To > &other) const
bool is_null () const
 Returns true if the PointerTo is a NULL pointer, false otherwise.

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)
 ~PointerToBase ()
void reassign (To *ptr)
 This is the main work of the PointerTo family.

void reassign (const PointerToBase< To > &copy)

Protected Attributes

To_ptr

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 97 of file pointerTo.h.


Member Typedef Documentation

template<class T>
typedef T PointerToBase< T >::To
 

Reimplemented in PointerTo< T >, ConstPointerTo< T >, PointerTo< Lens >, PointerTo< PGMouseWatcherRegion >, PointerTo< GraphicsStateGuardian >, PointerTo< EggSwitchCondition >, PointerTo< NurbsCurveEvaluator >, PointerTo< EggTexture >, PointerTo< PandaNode >, PointerTo< MouseWatcherRegion >, PointerTo< CollisionHandler >, PointerTo< TokenType >, PointerTo< AudioSound >, PointerTo< ProjtexShader >, PointerTo< DriveInterface >, PointerTo< GraphicsPipe >, PointerTo< Trackball >, PointerTo< Light >, PointerTo< SceneSetup >, PointerTo< ButtonEventList >, PointerTo< Connection >, PointerTo< SavedFrameBuffer >, PointerTo< LensNode >, PointerTo< AudioManager >, PointerTo< GeometricBoundingVolume >, PointerTo< PixelBuffer >, PointerTo< GeomNode >, PointerTo< TextFont >, PointerTo< BaseParticleRenderer >, PointerTo< Fog >, PointerTo< ParametricCurve >, PointerTo< EggMaterial >, PointerTo< EventStoreTransform >, PointerTo< CollisionNode >, PointerTo< GraphicsWindow >, PointerTo< LinearIntegrator >, PointerTo< MatrixFrame >, PointerTo< Camera >, PointerTo< PlaneNode >, PointerTo< ClientAnalogDevice >, PointerTo< Texture >, PointerTo< DisplayRegion >, PointerTo< TypedReferenceCount >, PointerTo< EventStoreVec2 >, PointerTo< LerpBlendType >, PointerTo< PartBundle >, PointerTo< LoaderToken >, PointerTo< EventStoreVec3 >, PointerTo< AnimBundle >, PointerTo< GeomSprite >, PointerTo< ComputedVertices >, PointerTo< Geom >, PointerTo< ProjectionScreen >, PointerTo< ClientButtonDevice >, PointerTo< CullResult >, PointerTo< LerpFunctor >, PointerTo< ParametricCurveCollection >, PointerTo< GeomPoint >, PointerTo< TextNode >, PointerTo< BaseParticleFactory >, PointerTo< MouseWatcher >, PointerTo< GeomLine >, PointerTo< BaseParticleEmitter >, PointerTo< EggObject >, PointerTo< BoundingVolume >, PointerTo< AngularIntegrator >, PointerTo< NodePathComponent >, PointerTo< ClientDialDevice >, PointerTo< PartGroup >, PointerTo< Buffer >, PointerTo< ClientTrackerDevice >, ConstPointerTo< Lens >, ConstPointerTo< CollisionSolid >, ConstPointerTo< Event >, ConstPointerTo< TransformState >, ConstPointerTo< RenderEffect >, ConstPointerTo< RenderState >, ConstPointerTo< RenderEffects >, ConstPointerTo< Camera >, ConstPointerTo< Material >, ConstPointerTo< DisplayRegion >, and ConstPointerTo< RenderAttrib >.

Definition at line 99 of file pointerTo.h.

Referenced by PointerToBase< T >::operator<(), PointerToBase< T >::operator>=(), PointerToBase< T >::PointerToBase(), and PointerToBase< T >::~PointerToBase().


Constructor & Destructor Documentation

template<class T>
PointerToBase< T >::PointerToBase To ptr  )  [inline, protected]
 

Definition at line 32 of file pointerTo.I.

References PointerToBase< T >::_ptr, INLINE, NULL, PointerToBase< T >::reassign(), and PointerToBase< T >::To.

template<class T>
PointerToBase< T >::PointerToBase const PointerToBase< T > &  copy  )  [inline, protected]
 

Definition at line 46 of file pointerTo.I.

References INLINE, NULL, PointerToBase< T >::reassign(), and PointerToBase< T >::To.

template<class T>
PointerToBase< T >::~PointerToBase  )  [inline, protected]
 

Definition at line 60 of file pointerTo.I.

References PointerToBase< T >::_ptr, NULL, and PointerToBase< T >::To.


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 PointerTo< T >, ConstPointerTo< T >, PointerToArray< Element >, ConstPointerToArray< Element >, PointerTo< Lens >, PointerTo< PGMouseWatcherRegion >, PointerTo< GraphicsStateGuardian >, PointerTo< EggSwitchCondition >, PointerTo< NurbsCurveEvaluator >, PointerTo< EggTexture >, PointerTo< PandaNode >, PointerTo< MouseWatcherRegion >, PointerTo< CollisionHandler >, PointerTo< TokenType >, PointerTo< AudioSound >, PointerTo< ProjtexShader >, PointerTo< DriveInterface >, PointerTo< GraphicsPipe >, PointerTo< Trackball >, PointerTo< Light >, PointerTo< SceneSetup >, PointerTo< ButtonEventList >, PointerTo< Connection >, PointerTo< SavedFrameBuffer >, PointerTo< LensNode >, PointerTo< AudioManager >, PointerTo< GeometricBoundingVolume >, PointerTo< PixelBuffer >, PointerTo< GeomNode >, PointerTo< TextFont >, PointerTo< BaseParticleRenderer >, PointerTo< Fog >, PointerTo< ParametricCurve >, PointerTo< EggMaterial >, PointerTo< EventStoreTransform >, PointerTo< CollisionNode >, PointerTo< GraphicsWindow >, PointerTo< LinearIntegrator >, PointerTo< MatrixFrame >, PointerTo< Camera >, PointerTo< PlaneNode >, PointerTo< ClientAnalogDevice >, PointerTo< Texture >, PointerTo< DisplayRegion >, PointerTo< TypedReferenceCount >, PointerTo< EventStoreVec2 >, PointerTo< LerpBlendType >, PointerTo< PartBundle >, PointerTo< LoaderToken >, PointerTo< EventStoreVec3 >, PointerTo< AnimBundle >, PointerTo< GeomSprite >, PointerTo< ComputedVertices >, PointerTo< Geom >, PointerTo< ProjectionScreen >, PointerTo< ClientButtonDevice >, PointerTo< CullResult >, PointerTo< LerpFunctor >, PointerTo< ParametricCurveCollection >, PointerTo< GeomPoint >, PointerTo< TextNode >, PointerTo< BaseParticleFactory >, PointerTo< MouseWatcher >, PointerTo< GeomLine >, PointerTo< BaseParticleEmitter >, PointerTo< EggObject >, PointerTo< BoundingVolume >, PointerTo< AngularIntegrator >, PointerTo< NodePathComponent >, PointerTo< ClientDialDevice >, PointerTo< PartGroup >, PointerTo< Buffer >, PointerTo< ClientTrackerDevice >, ConstPointerTo< Lens >, ConstPointerTo< CollisionSolid >, ConstPointerTo< Event >, ConstPointerTo< TransformState >, ConstPointerTo< RenderEffect >, ConstPointerTo< RenderState >, ConstPointerTo< RenderEffects >, ConstPointerTo< Camera >, ConstPointerTo< Material >, ConstPointerTo< DisplayRegion >, ConstPointerTo< RenderAttrib >, PointerToArray< Normalf >, PointerToArray< double >, PointerToArray< NodePath >, PointerToArray< Colorf >, PointerToArray< float >, PointerToArray< PlaneNode * >, PointerToArray< int >, PointerToArray< unsigned short >, PointerToArray< unsigned char >, PointerToArray< Vertexf >, PointerToArray< ButtonHandle >, PointerToArray< TexCoordf >, and ConstPointerToArray< float >.

Definition at line 383 of file pointerTo.I.

References PointerToBase< T >::_ptr, INLINE, and TYPENAME.

Referenced by PointerTo< ClientTrackerDevice >::clear().

template<class T>
bool PointerToBase< T >::is_null  )  const [inline]
 

Returns true if the PointerTo is a NULL pointer, false otherwise.

(Direct comparison to a NULL pointer also works.)

Reimplemented in PointerTo< T >, ConstPointerTo< T >, PointerTo< Lens >, PointerTo< PGMouseWatcherRegion >, PointerTo< GraphicsStateGuardian >, PointerTo< EggSwitchCondition >, PointerTo< NurbsCurveEvaluator >, PointerTo< EggTexture >, PointerTo< PandaNode >, PointerTo< MouseWatcherRegion >, PointerTo< CollisionHandler >, PointerTo< TokenType >, PointerTo< AudioSound >, PointerTo< ProjtexShader >, PointerTo< DriveInterface >, PointerTo< GraphicsPipe >, PointerTo< Trackball >, PointerTo< Light >, PointerTo< SceneSetup >, PointerTo< ButtonEventList >, PointerTo< Connection >, PointerTo< SavedFrameBuffer >, PointerTo< LensNode >, PointerTo< AudioManager >, PointerTo< GeometricBoundingVolume >, PointerTo< PixelBuffer >, PointerTo< GeomNode >, PointerTo< TextFont >, PointerTo< BaseParticleRenderer >, PointerTo< Fog >, PointerTo< ParametricCurve >, PointerTo< EggMaterial >, PointerTo< EventStoreTransform >, PointerTo< CollisionNode >, PointerTo< GraphicsWindow >, PointerTo< LinearIntegrator >, PointerTo< MatrixFrame >, PointerTo< Camera >, PointerTo< PlaneNode >, PointerTo< ClientAnalogDevice >, PointerTo< Texture >, PointerTo< DisplayRegion >, PointerTo< TypedReferenceCount >, PointerTo< EventStoreVec2 >, PointerTo< LerpBlendType >, PointerTo< PartBundle >, PointerTo< LoaderToken >, PointerTo< EventStoreVec3 >, PointerTo< AnimBundle >, PointerTo< GeomSprite >, PointerTo< ComputedVertices >, PointerTo< Geom >, PointerTo< ProjectionScreen >, PointerTo< ClientButtonDevice >, PointerTo< CullResult >, PointerTo< LerpFunctor >, PointerTo< ParametricCurveCollection >, PointerTo< GeomPoint >, PointerTo< TextNode >, PointerTo< BaseParticleFactory >, PointerTo< MouseWatcher >, PointerTo< GeomLine >, PointerTo< BaseParticleEmitter >, PointerTo< EggObject >, PointerTo< BoundingVolume >, PointerTo< AngularIntegrator >, PointerTo< NodePathComponent >, PointerTo< ClientDialDevice >, PointerTo< PartGroup >, PointerTo< Buffer >, PointerTo< ClientTrackerDevice >, ConstPointerTo< Lens >, ConstPointerTo< CollisionSolid >, ConstPointerTo< Event >, ConstPointerTo< TransformState >, ConstPointerTo< RenderEffect >, ConstPointerTo< RenderState >, ConstPointerTo< RenderEffects >, ConstPointerTo< Camera >, ConstPointerTo< Material >, ConstPointerTo< DisplayRegion >, and ConstPointerTo< RenderAttrib >.

Definition at line 367 of file pointerTo.I.

References PointerToBase< T >::_ptr, INLINE, and TYPENAME.

Referenced by PointerTo< ClientTrackerDevice >::clear().

template<class T>
bool PointerToBase< T >::operator!= const PointerToBase< To > &  other  )  const [inline]
 

Definition at line 279 of file pointerTo.I.

References PointerToBase< T >::_ptr, and INLINE.

template<class T>
bool PointerToBase< T >::operator!= To other  )  const [inline]
 

Definition at line 214 of file pointerTo.I.

References PointerToBase< T >::_ptr, and INLINE.

template<class T>
bool PointerToBase< T >::operator!= const To other  )  const [inline]
 

Definition at line 150 of file pointerTo.I.

References PointerToBase< T >::_ptr, and INLINE.

template<class T>
bool PointerToBase< T >::operator< const PointerToBase< To > &  other  )  const [inline]
 

Definition at line 345 of file pointerTo.I.

References INLINE.

template<class T>
bool PointerToBase< T >::operator< const To other  )  const [inline]
 

Definition at line 332 of file pointerTo.I.

References PointerToBase< T >::_ptr, INLINE, NULL, and PointerToBase< T >::To.

template<class T>
bool PointerToBase< T >::operator<= const PointerToBase< To > &  other  )  const [inline]
 

Definition at line 305 of file pointerTo.I.

References PointerToBase< T >::_ptr, INLINE, and NULL.

template<class T>
bool PointerToBase< T >::operator<= To other  )  const [inline]
 

Definition at line 240 of file pointerTo.I.

References PointerToBase< T >::_ptr.

template<class T>
bool PointerToBase< T >::operator<= const To other  )  const [inline]
 

Definition at line 176 of file pointerTo.I.

References PointerToBase< T >::_ptr, and INLINE.

template<class T>
bool PointerToBase< T >::operator== const PointerToBase< To > &  other  )  const [inline]
 

Definition at line 266 of file pointerTo.I.

References PointerToBase< T >::_ptr, and INLINE.

template<class T>
bool PointerToBase< T >::operator== To other  )  const [inline]
 

Definition at line 201 of file pointerTo.I.

References PointerToBase< T >::_ptr, and INLINE.

template<class T>
bool PointerToBase< T >::operator== const To other  )  const [inline]
 

Definition at line 137 of file pointerTo.I.

References PointerToBase< T >::_ptr, and INLINE.

template<class T>
bool PointerToBase< T >::operator> const PointerToBase< To > &  other  )  const [inline]
 

Definition at line 292 of file pointerTo.I.

References PointerToBase< T >::_ptr, and INLINE.

template<class T>
bool PointerToBase< T >::operator> To other  )  const [inline]
 

Definition at line 227 of file pointerTo.I.

References PointerToBase< T >::_ptr, and INLINE.

template<class T>
bool PointerToBase< T >::operator> const To other  )  const [inline]
 

Definition at line 163 of file pointerTo.I.

References PointerToBase< T >::_ptr.

template<class T>
bool PointerToBase< T >::operator>= const PointerToBase< To > &  other  )  const [inline]
 

Definition at line 318 of file pointerTo.I.

References INLINE, NULL, PointerToBase< T >::reassign(), and PointerToBase< T >::To.

template<class T>
bool PointerToBase< T >::operator>= To other  )  const [inline]
 

Definition at line 253 of file pointerTo.I.

References PointerToBase< T >::_ptr, and INLINE.

template<class T>
bool PointerToBase< T >::operator>= const To other  )  const [inline]
 

Definition at line 189 of file pointerTo.I.

References PointerToBase< T >::_ptr, and INLINE.

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 399 of file pointerTo.I.

References PointerToBase< T >::_ptr, and INLINE.

template<class T>
void PointerToBase< T >::reassign const PointerToBase< To > &  copy  )  [inline, protected]
 

Definition at line 122 of file pointerTo.I.

References PointerToBase< T >::_ptr, and INLINE.

template<class T>
void PointerToBase< T >::reassign To ptr  )  [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 78 of file pointerTo.I.

Referenced by ConstPointerTo< T >::ConstPointerTo(), PointerToBase< T >::operator>=(), PointerTo< T >::PointerTo(), and PointerToBase< T >::PointerToBase().


Member Data Documentation

template<class T>
To* PointerToBase< T >::_ptr [protected]
 

Definition at line 110 of file pointerTo.h.

Referenced by PointerToBase< T >::clear(), PointerToBase< T >::is_null(), PointerTo< T >::operator TYPENAME PointerToBase(), PointerToBase< T >::operator!=(), PointerToBase< T >::operator<(), PointerToBase< T >::operator<=(), PointerTo< T >::operator=(), PointerToBase< T >::operator==(), PointerToBase< T >::operator>(), PointerToBase< T >::operator>=(), PointerToBase< T >::output(), PointerToBase< T >::PointerToBase(), PointerToBase< T >::reassign(), and PointerToBase< T >::~PointerToBase().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:54:13 2003 for Panda by doxygen1.3