Nuke binary plugins 15.0.5
 
Loading...
Searching...
No Matches
DD::Image::RefCountedPtr< T > Class Template Reference

#include <RefCountedObject.h>

Public Member Functions

 RefCountedPtr ()
 
 RefCountedPtr (T *obj)
 
 RefCountedPtr (const RefCountedPtr< T > &other)
 
 ~RefCountedPtr ()
 
void operator= (const RefCountedPtr< T > &other)
 
T & operator* ()
 
const T & operator* () const
 
T * operator-> ()
 
const T * operator-> () const
 
int refcount () const
 
 operator bool () const
 
void allocate ()
 
template<class P1 >
void allocate (const P1 &p1)
 
template<class P1 , class P2 >
void allocate (const P1 &p1, const P2 &p2)
 
template<class P1 , class P2 , class P3 >
void allocate (const P1 &p1, const P2 &p2, const P3 &p3)
 
void clear ()
 

Static Public Member Functions

template<class U >
static RefCountedPtr< T > downCast (RefCountedPtr< U > other)
 

Detailed Description

template<class T>
class DD::Image::RefCountedPtr< T >

Template for a reference counted ptr. Template argument T should be a subclass of RefCountedObject, or provide a similar interface.

Constructor & Destructor Documentation

◆ RefCountedPtr() [1/3]

template<class T >
DD::Image::RefCountedPtr< T >::RefCountedPtr ( )
inline

Create a NULL pointer.

◆ RefCountedPtr() [2/3]

template<class T >
DD::Image::RefCountedPtr< T >::RefCountedPtr ( T *  obj)
inlineexplicit

Create a new RefCountedPtr around an existing object, and increment its reference count.

◆ RefCountedPtr() [3/3]

template<class T >
DD::Image::RefCountedPtr< T >::RefCountedPtr ( const RefCountedPtr< T > &  other)
inline

Copy an existing RefCountedPtr and increment the reference

◆ ~RefCountedPtr()

template<class T >
DD::Image::RefCountedPtr< T >::~RefCountedPtr ( )
inline

Destroy the RefCountedPtr and if needed delete the underlying object

Member Function Documentation

◆ operator=()

template<class T >
void DD::Image::RefCountedPtr< T >::operator= ( const RefCountedPtr< T > &  other)
inline

Copy an existing RefCountedPtr, incrementing and decrementing references as appropriate.

◆ operator*() [1/2]

template<class T >
T & DD::Image::RefCountedPtr< T >::operator* ( )
inline

Get the underlying object

◆ operator*() [2/2]

template<class T >
const T & DD::Image::RefCountedPtr< T >::operator* ( ) const
inline

Get the underlying object

◆ operator->() [1/2]

template<class T >
T * DD::Image::RefCountedPtr< T >::operator-> ( )
inline

Get the underlying object

◆ operator->() [2/2]

template<class T >
const T * DD::Image::RefCountedPtr< T >::operator-> ( ) const
inline

Get the underlying object

◆ refcount()

template<class T >
int DD::Image::RefCountedPtr< T >::refcount ( ) const
inline

Return the reference count of the underlying object

◆ downCast()

template<class T >
template<class U >
static RefCountedPtr< T > DD::Image::RefCountedPtr< T >::downCast ( RefCountedPtr< U >  other)
inlinestatic

Use dynamic_cast to downcast to another, more specific, RefCountedPtr type

◆ operator bool()

template<class T >
DD::Image::RefCountedPtr< T >::operator bool ( ) const
inline

Test whether the pointer is pointing at an object right now. True if it is.

◆ allocate() [1/4]

template<class T >
void DD::Image::RefCountedPtr< T >::allocate ( )
inline

Allocate a new object and make this pointer be a reference to it.

Referenced by DD::Image::GeometryList::add_primitive().

◆ allocate() [2/4]

template<class T >
template<class P1 >
void DD::Image::RefCountedPtr< T >::allocate ( const P1 &  p1)
inline

Allocate a new object and make this pointer be a reference to it.

◆ allocate() [3/4]

template<class T >
template<class P1 , class P2 >
void DD::Image::RefCountedPtr< T >::allocate ( const P1 &  p1,
const P2 &  p2 
)
inline

Allocate a new object and make this pointer be a reference to it.

◆ allocate() [4/4]

template<class T >
template<class P1 , class P2 , class P3 >
void DD::Image::RefCountedPtr< T >::allocate ( const P1 &  p1,
const P2 &  p2,
const P3 &  p3 
)
inline

Allocate a new object and make this pointer be a reference to it.

◆ clear()

template<class T >
void DD::Image::RefCountedPtr< T >::clear ( )
inline

Unreference the existing object (possibly deleting it)

Referenced by DD::Image::GeoOp::delete_allocations(), and DD::Image::GeoOp::get_geometry().



©2024 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.foundry.com