Audacity 3.2.0
Public Member Functions | List of all members
ClientData::Copyable< Container, ShallowCopying > Struct Template Reference

Specialization that copies pointers, not sub-objects; strong guarantee for assignment. More...

#include <ClientDataHelpers.h>

Inheritance diagram for ClientData::Copyable< Container, ShallowCopying >:
[legend]
Collaboration diagram for ClientData::Copyable< Container, ShallowCopying >:
[legend]

Public Member Functions

 Copyable ()=default
 
 Copyable (const Copyable &other)
 Call through to operator =. More...
 
Copyableoperator= (const Copyable &other)
 
 Copyable (Copyable &&)=default
 
Copyableoperator= (Copyable &&)=default
 

Detailed Description

template<typename Container>
struct ClientData::Copyable< Container, ShallowCopying >

Specialization that copies pointers, not sub-objects; strong guarantee for assignment.

Definition at line 106 of file ClientDataHelpers.h.

Constructor & Destructor Documentation

◆ Copyable() [1/3]

template<typename Container >
ClientData::Copyable< Container, ShallowCopying >::Copyable ( )
default

◆ Copyable() [2/3]

template<typename Container >
ClientData::Copyable< Container, ShallowCopying >::Copyable ( const Copyable< Container, ShallowCopying > &  other)
inline

Call through to operator =.

Definition at line 110 of file ClientDataHelpers.h.

111 { *this = other; }

◆ Copyable() [3/3]

template<typename Container >
ClientData::Copyable< Container, ShallowCopying >::Copyable ( Copyable< Container, ShallowCopying > &&  )
default

Member Function Documentation

◆ operator=() [1/2]

template<typename Container >
Copyable & ClientData::Copyable< Container, ShallowCopying >::operator= ( const Copyable< Container, ShallowCopying > &  other)
inline
Exception safety guarantee:
Strong

Definition at line 113 of file ClientDataHelpers.h.

114 {
115 if (this != &other) {
116 // Build then swap for strong exception guarantee
117 Copyable temp;
118 for ( auto &&ptr : other )
119 temp.push_back( ptr );
120 this->swap( temp );
121 }
122 return *this;
123 }
void swap(std::unique_ptr< Alg_seq > &a, std::unique_ptr< Alg_seq > &b)
Definition: NoteTrack.cpp:628

References anonymous_namespace{NoteTrack.cpp}::swap().

Here is the call graph for this function:

◆ operator=() [2/2]

template<typename Container >
Copyable & ClientData::Copyable< Container, ShallowCopying >::operator= ( Copyable< Container, ShallowCopying > &&  )
default

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