Audacity 3.2.0
Public Types | Public Member Functions | List of all members
ClientData::Cloneable< Covariant, Owner > Struct Template Referenceabstract

A convenient base class defining abstract virtual Clone() for a given kind of pointer. More...

#include <ClientData.h>

Inheritance diagram for ClientData::Cloneable< Covariant, Owner >:
[legend]

Public Types

using Base = std::conditional_t< std::is_void_v< Covariant >, Cloneable, Covariant >
 
using PointerType = Owner< Base >
 

Public Member Functions

 Cloneable ()=default
 
 Cloneable (const Cloneable &)=default
 
Cloneableoperator= (const Cloneable &)=default
 
virtual ~Cloneable ()=default
 
virtual PointerType Clone () const =0
 

Detailed Description

template<typename Covariant = void, template< typename > class Owner = UniquePtr>
struct ClientData::Cloneable< Covariant, Owner >

A convenient base class defining abstract virtual Clone() for a given kind of pointer.

Template Parameters
Ownertemplate-template parameter for the kind of smart pointer, like std::shared_ptr, returned by Clone()
See also
ClientData::DeepCopying

Definition at line 49 of file ClientData.h.

Member Typedef Documentation

◆ Base

template<typename Covariant = void, template< typename > class Owner = UniquePtr>
using ClientData::Cloneable< Covariant, Owner >::Base = std::conditional_t< std::is_void_v<Covariant>, Cloneable, Covariant >

Definition at line 51 of file ClientData.h.

◆ PointerType

template<typename Covariant = void, template< typename > class Owner = UniquePtr>
using ClientData::Cloneable< Covariant, Owner >::PointerType = Owner< Base >

Definition at line 54 of file ClientData.h.

Constructor & Destructor Documentation

◆ Cloneable() [1/2]

template<typename Covariant = void, template< typename > class Owner = UniquePtr>
ClientData::Cloneable< Covariant, Owner >::Cloneable ( )
default

◆ Cloneable() [2/2]

template<typename Covariant = void, template< typename > class Owner = UniquePtr>
ClientData::Cloneable< Covariant, Owner >::Cloneable ( const Cloneable< Covariant, Owner > &  )
default

◆ ~Cloneable()

template<typename Covariant = void, template< typename > class Owner = UniquePtr>
virtual ClientData::Cloneable< Covariant, Owner >::~Cloneable ( )
virtualdefault

Member Function Documentation

◆ Clone()

template<typename Covariant = void, template< typename > class Owner = UniquePtr>
virtual PointerType ClientData::Cloneable< Covariant, Owner >::Clone ( ) const
pure virtual

◆ operator=()

template<typename Covariant = void, template< typename > class Owner = UniquePtr>
Cloneable & ClientData::Cloneable< Covariant, Owner >::operator= ( const Cloneable< Covariant, Owner > &  )
default

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