openshot-audio
0.1.5
|
#include <juce_core.h>
Public Types | |
typedef ReferenceCountedObjectClass | ReferencedType |
Public Member Functions | |
ReferenceCountedObjectPtr () noexcept | |
ReferenceCountedObjectPtr (ReferencedType *refCountedObject) noexcept | |
ReferenceCountedObjectPtr (const ReferenceCountedObjectPtr &other) noexcept | |
template<class Convertible > | |
ReferenceCountedObjectPtr (const ReferenceCountedObjectPtr< Convertible > &other) noexcept | |
ReferenceCountedObjectPtr & | operator= (const ReferenceCountedObjectPtr &other) |
template<class Convertible > | |
ReferenceCountedObjectPtr & | operator= (const ReferenceCountedObjectPtr< Convertible > &other) |
ReferenceCountedObjectPtr & | operator= (ReferencedType *const newObject) |
~ReferenceCountedObjectPtr () | |
operator ReferencedType * () const noexcept | |
ReferencedType * | get () const noexcept |
ReferencedType * | getObject () const noexcept |
ReferencedType * | operator-> () const noexcept |
A smart-pointer class which points to a reference-counted object.
The template parameter specifies the class of the object you want to point to - the easiest way to make a class reference-countable is to simply make it inherit from ReferenceCountedObject or SingleThreadedReferenceCountedObject, but if you need to, you can roll your own reference-countable class by implementing a set of methods called incReferenceCount(), decReferenceCount(), and decReferenceCountWithoutDeleting(). See ReferenceCountedObject for examples of how these methods should behave.
When using this class, you'll probably want to create a typedef to abbreviate the full templated name - e.g.
typedef ReferenceCountedObjectClass juce::ReferenceCountedObjectPtr< ReferenceCountedObjectClass >::ReferencedType |
The class being referenced by this pointer.
|
inlinenoexcept |
Creates a pointer to a null object.
|
inlinenoexcept |
Creates a pointer to an object. This will increment the object's reference-count.
|
inlinenoexcept |
Copies another pointer. This will increment the object's reference-count.
|
inlinenoexcept |
Copies another pointer. This will increment the object's reference-count (if it is non-null).
|
inline |
Destructor. This will decrement the object's reference-count, which will cause the object to be deleted when the ref-count hits zero.
|
inlinenoexcept |
Returns the object that this pointer references. The pointer returned may be null, of course.
|
inlinenoexcept |
Returns the object that this pointer references. The pointer returned may be null, of course.
|
inlinenoexcept |
Returns the object that this pointer references. The pointer returned may be null, of course.
|
inlinenoexcept |
|
inline |
Changes this pointer to point at a different object. The reference count of the old object is decremented, and it might be deleted if it hits zero. The new object's count is incremented.
|
inline |
Changes this pointer to point at a different object. The reference count of the old object is decremented, and it might be deleted if it hits zero. The new object's count is incremented.
|
inline |
Changes this pointer to point at a different object.
The reference count of the old object is decremented, and it might be deleted if it hits zero. The new object's count is incremented.