tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
tracktion::engine::SafeSelectable< SelectableType > Class Template Reference

Holds a pointer to some type of Selectable, which automatically becomes null if the selectable is deleted. More...

#include "tracktion_Selectable.h"

Public Member Functions

 SafeSelectable ()=default
 Creates a null SafeSelectable.
 
 SafeSelectable (SelectableType &selectable)
 Creates a SafeSelectable that points at the given selectable.
 
 SafeSelectable (SelectableType *selectable)
 Creates a SafeSelectable that points at the given selectable.
 
 SafeSelectable (const SafeSelectable &other) noexcept
 Creates a copy of another SafeSelectable.
 
SafeSelectableoperator= (const SafeSelectable &other)
 Copies another pointer to this one.
 
SafeSelectableoperator= (SelectableType *newSelectable)
 Copies another pointer to this one.
 
SelectableType * get () const noexcept
 Returns the selectable that this pointer refers to, or null if the selectable no longer exists.
 
 operator SelectableType * () const noexcept
 Returns the selectable that this pointer refers to, or null if the selectable no longer exists.
 
SelectableType * operator-> () const noexcept
 Returns the selectable that this pointer refers to, or null if the selectable no longer exists.
 
bool operator== (SelectableType *other) const noexcept
 
bool operator!= (SelectableType *other) const noexcept
 
bool operator== (const SafeSelectable &other) const noexcept
 
bool operator!= (const SafeSelectable &other) const noexcept
 
bool operator== (const SelectableType &other) const noexcept
 
bool operator!= (const SelectableType &other) const noexcept
 
bool operator== (decltype(nullptr)) const noexcept
 
bool operator!= (decltype(nullptr)) const noexcept
 

Detailed Description

template<typename SelectableType>
class tracktion::engine::SafeSelectable< SelectableType >

Holds a pointer to some type of Selectable, which automatically becomes null if the selectable is deleted.

The SelectableType template parameter must be Selectable, or some subclass of Selectable.

Definition at line 264 of file tracktion_Selectable.h.

Constructor & Destructor Documentation

◆ SafeSelectable() [1/3]

template<typename SelectableType >
tracktion::engine::SafeSelectable< SelectableType >::SafeSelectable ( SelectableType &  selectable)

Creates a SafeSelectable that points at the given selectable.

Definition at line 271 of file tracktion_Selectable.h.

◆ SafeSelectable() [2/3]

template<typename SelectableType >
tracktion::engine::SafeSelectable< SelectableType >::SafeSelectable ( SelectableType *  selectable)

Creates a SafeSelectable that points at the given selectable.

Definition at line 274 of file tracktion_Selectable.h.

◆ SafeSelectable() [3/3]

template<typename SelectableType >
tracktion::engine::SafeSelectable< SelectableType >::SafeSelectable ( const SafeSelectable< SelectableType > &  other)
noexcept

Creates a copy of another SafeSelectable.

Definition at line 277 of file tracktion_Selectable.h.

Member Function Documentation

◆ get()

template<typename SelectableType >
SelectableType * tracktion::engine::SafeSelectable< SelectableType >::get ( ) const
noexcept

Returns the selectable that this pointer refers to, or null if the selectable no longer exists.

Definition at line 286 of file tracktion_Selectable.h.

◆ operator SelectableType *()

template<typename SelectableType >
tracktion::engine::SafeSelectable< SelectableType >::operator SelectableType * ( ) const
noexcept

Returns the selectable that this pointer refers to, or null if the selectable no longer exists.

Definition at line 289 of file tracktion_Selectable.h.

◆ operator!=() [1/4]

template<typename SelectableType >
bool tracktion::engine::SafeSelectable< SelectableType >::operator!= ( const SafeSelectable< SelectableType > &  other) const
noexcept

Definition at line 298 of file tracktion_Selectable.h.

◆ operator!=() [2/4]

template<typename SelectableType >
bool tracktion::engine::SafeSelectable< SelectableType >::operator!= ( const SelectableType &  other) const
noexcept

Definition at line 301 of file tracktion_Selectable.h.

◆ operator!=() [3/4]

template<typename SelectableType >
bool tracktion::engine::SafeSelectable< SelectableType >::operator!= ( decltype(nullptr)  ) const
noexcept

Definition at line 304 of file tracktion_Selectable.h.

◆ operator!=() [4/4]

template<typename SelectableType >
bool tracktion::engine::SafeSelectable< SelectableType >::operator!= ( SelectableType *  other) const
noexcept

Definition at line 295 of file tracktion_Selectable.h.

◆ operator->()

template<typename SelectableType >
SelectableType * tracktion::engine::SafeSelectable< SelectableType >::operator-> ( ) const
noexcept

Returns the selectable that this pointer refers to, or null if the selectable no longer exists.

Definition at line 292 of file tracktion_Selectable.h.

◆ operator=() [1/2]

template<typename SelectableType >
SafeSelectable & tracktion::engine::SafeSelectable< SelectableType >::operator= ( const SafeSelectable< SelectableType > &  other)

Copies another pointer to this one.

Definition at line 280 of file tracktion_Selectable.h.

◆ operator=() [2/2]

template<typename SelectableType >
SafeSelectable & tracktion::engine::SafeSelectable< SelectableType >::operator= ( SelectableType *  newSelectable)

Copies another pointer to this one.

Definition at line 283 of file tracktion_Selectable.h.

◆ operator==() [1/4]

template<typename SelectableType >
bool tracktion::engine::SafeSelectable< SelectableType >::operator== ( const SafeSelectable< SelectableType > &  other) const
noexcept

Definition at line 297 of file tracktion_Selectable.h.

◆ operator==() [2/4]

template<typename SelectableType >
bool tracktion::engine::SafeSelectable< SelectableType >::operator== ( const SelectableType &  other) const
noexcept

Definition at line 300 of file tracktion_Selectable.h.

◆ operator==() [3/4]

template<typename SelectableType >
bool tracktion::engine::SafeSelectable< SelectableType >::operator== ( decltype(nullptr)  ) const
noexcept

Definition at line 303 of file tracktion_Selectable.h.

◆ operator==() [4/4]

template<typename SelectableType >
bool tracktion::engine::SafeSelectable< SelectableType >::operator== ( SelectableType *  other) const
noexcept

Definition at line 294 of file tracktion_Selectable.h.


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