Panda3D
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
NodePointerTo< T > Class Template Reference

This implements the special NodePointerTo template class, which works just like PointerTo except it manages the objects node_ref_count instead of the normal ref_count. More...

#include "nodePointerTo.h"

Inheritance diagram for NodePointerTo< T >:
NodePointerToBase< T > PointerToVoid MemoryBase

Public Types

typedef NodePointerToBase< T >::To To
 
- Public Types inherited from NodePointerToBase< T >
typedef T To
 

Public Member Functions

 NodePointerTo (const NodePointerTo< T > &copy)
 
 NodePointerTo (NodePointerTo< T > &&from) noexcept
 
 NodePointerTo (To *ptr=nullptr)
 
 operator T* () const
 We also have the typecast operator to automatically convert NodePointerTo's to the required kind of actual pointer.
 
To & operator* () const
 
To * operator-> () const
 
NodePointerTo< T > & operator= (const NodePointerTo< T > &copy)
 
NodePointerTo< T > & operator= (NodePointerTo< T > &&from) noexcept
 
NodePointerTo< T > & operator= (To *ptr)
 
To * p () const
 Returns an ordinary pointer instead of a NodePointerTo.
 
- Public Member Functions inherited from NodePointerToBase< T >
void clear ()
 A convenient way to set the NodePointerTo object to NULL.
 
void output (std::ostream &out) const
 A handy function to output NodePointerTo's as a hex pointer followed by a reference count.
 
- Public Member Functions inherited from PointerToVoid
size_t get_hash () const
 
constexpr bool is_null () const
 Returns true if the PointerTo is a NULL pointer, false otherwise.
 
bool operator!= (const PointerToVoid &other) const
 
bool operator< (const PointerToVoid &other) const
 
bool operator< (const void *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.
 
- Public Member Functions inherited from MemoryBase
void operator delete (void *, void *)
 
void operator delete (void *ptr)
 
void operator delete[] (void *, void *)
 
void operator delete[] (void *ptr)
 
void * operator new (size_t size)
 
void * operator new (size_t size, void *ptr)
 
void * operator new[] (size_t size)
 
void * operator new[] (size_t size, void *ptr)
 

Detailed Description

template<class T>
class NodePointerTo< T >

This implements the special NodePointerTo template class, which works just like PointerTo except it manages the objects node_ref_count instead of the normal ref_count.

Definition at line 26 of file nodePointerTo.h.

Member Typedef Documentation

◆ To

template<class T >
typedef NodePointerToBase<T>::To NodePointerTo< T >::To

Definition at line 31 of file nodePointerTo.h.

Constructor & Destructor Documentation

◆ NodePointerTo() [1/3]

template<class T >
NodePointerTo< T >::NodePointerTo ( To * ptr = nullptr)
inline

Definition at line 19 of file nodePointerTo.I.

◆ NodePointerTo() [2/3]

template<class T >
NodePointerTo< T >::NodePointerTo ( const NodePointerTo< T > & copy)
inline

Definition at line 29 of file nodePointerTo.I.

◆ NodePointerTo() [3/3]

template<class T >
NodePointerTo< T >::NodePointerTo ( NodePointerTo< T > && from)
inlinenoexcept

Definition at line 41 of file nodePointerTo.I.

Member Function Documentation

◆ operator T*()

template<class T >
NodePointerTo< T >::operator T* ( ) const
inline

We also have the typecast operator to automatically convert NodePointerTo'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 90 of file nodePointerTo.I.

◆ operator*()

template<class T >
NodePointerTo< T >::To & NodePointerTo< T >::operator* ( ) const
inline

Definition at line 65 of file nodePointerTo.I.

◆ operator->()

template<class T >
NodePointerTo< T >::To * NodePointerTo< T >::operator-> ( ) const
inline

Definition at line 76 of file nodePointerTo.I.

◆ operator=() [1/3]

template<class T >
NodePointerTo< T > & NodePointerTo< T >::operator= ( const NodePointerTo< T > & copy)
inline

Definition at line 125 of file nodePointerTo.I.

◆ operator=() [2/3]

template<class T >
NodePointerTo< T > & NodePointerTo< T >::operator= ( NodePointerTo< T > && from)
inlinenoexcept

Definition at line 53 of file nodePointerTo.I.

◆ operator=() [3/3]

template<class T >
NodePointerTo< T > & NodePointerTo< T >::operator= ( To * ptr)
inline

Definition at line 113 of file nodePointerTo.I.

◆ p()

template<class T >
NodePointerTo< T >::To * NodePointerTo< T >::p ( ) const
inline

Returns an ordinary pointer instead of a NodePointerTo.

Useful to work around compiler problems, particularly for implicit upcasts.

Definition at line 102 of file nodePointerTo.I.


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