Panda3D
Public Member Functions | List of all members
PointerToVoid Class Reference

This is the non-template part of the base class for PointerTo and ConstPointerTo. More...

#include "pointerToVoid.h"

Inheritance diagram for PointerToVoid:
MemoryBase NodePointerToBase< T > PointerToBase< T > PointerToBase< FileReference > PointerToBase< InternalName > PointerToBase< Multifile > PointerToBase< ReferenceCountedVector< Element > > PointerToBase< ReferenceCountedVector< unsigned char > > ThreadSafePointerToBase< T > WeakPointerToVoid

Public Member Functions

size_t get_hash () const
 
bool is_null () const
 Returns true if the PointerTo is a NULL pointer, false otherwise. More...
 
bool operator!= (const PointerToVoid &other) const
 
bool operator< (const void *other) const
 
bool operator< (const PointerToVoid &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. More...
 

Detailed Description

This is the non-template part of the base class for PointerTo and ConstPointerTo.

It is necessary so we can keep a pointer to a non-template class within the ReferenceCount object, to implement weak reference pointers–we need to have something to clean up when the ReferenceCount object destructs.

This is the base class for PointerToBase<T>.

Definition at line 36 of file pointerToVoid.h.

Member Function Documentation

◆ is_null()

bool PointerToVoid::is_null ( ) const
inline

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

(Direct comparison to a NULL pointer also works.)

Definition at line 54 of file pointerToVoid.I.

References swap().

Referenced by TinyGraphicsStateGuardian::bind_light(), DXTextureContext9::d3d_surface_to_texture(), EventQueue::is_queue_full(), and TexturePeeker::is_valid().

◆ swap()

void PointerToVoid::swap ( PointerToVoid other)
inline

Swaps the contents of this PointerTo with the other, without touching the reference counts.

For internal use only. Use the global swap() function instead.

Definition at line 118 of file pointerToVoid.I.

Referenced by PointerToArray< Element >::empty_array(), and is_null().


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