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 105 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 109 of file ClientDataHelpers.h.

110 { *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 112 of file ClientDataHelpers.h.

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

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: