Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
audacity::cloud::audiocom::UploadOperationHandle Class Referencefinal

A unique_ptr like class that holds a pointer to UploadOperation. More...

#include <UploadService.h>

Collaboration diagram for audacity::cloud::audiocom::UploadOperationHandle:
[legend]

Public Member Functions

 UploadOperationHandle ()=default
 
 UploadOperationHandle (std::shared_ptr< UploadOperation > operation)
 
 UploadOperationHandle (const UploadOperationHandle &)=delete
 
 UploadOperationHandle (UploadOperationHandle &&)=default
 
UploadOperationHandleoperator= (const UploadOperationHandle &)=delete
 
UploadOperationHandleoperator= (UploadOperationHandle &&)=default
 
 ~UploadOperationHandle ()
 
 operator bool () const noexcept
 
UploadOperationoperator-> () const noexcept
 

Private Attributes

std::shared_ptr< UploadOperationmOperation {}
 

Detailed Description

A unique_ptr like class that holds a pointer to UploadOperation.

Definition at line 107 of file UploadService.h.

Constructor & Destructor Documentation

◆ UploadOperationHandle() [1/4]

audacity::cloud::audiocom::UploadOperationHandle::UploadOperationHandle ( )
default

◆ UploadOperationHandle() [2/4]

audacity::cloud::audiocom::UploadOperationHandle::UploadOperationHandle ( std::shared_ptr< UploadOperation operation)
explicit

Definition at line 605 of file UploadService.cpp.

607 : mOperation(std::move(operation))
608{
609}
std::shared_ptr< UploadOperation > mOperation

◆ UploadOperationHandle() [3/4]

audacity::cloud::audiocom::UploadOperationHandle::UploadOperationHandle ( const UploadOperationHandle )
delete

◆ UploadOperationHandle() [4/4]

audacity::cloud::audiocom::UploadOperationHandle::UploadOperationHandle ( UploadOperationHandle &&  )
default

◆ ~UploadOperationHandle()

audacity::cloud::audiocom::UploadOperationHandle::~UploadOperationHandle ( )

Definition at line 611 of file UploadService.cpp.

612{
613 if (mOperation)
614 // It is safe to call Abort on completed operations
615 mOperation->Abort();
616}

References mOperation.

Member Function Documentation

◆ operator bool()

audacity::cloud::audiocom::UploadOperationHandle::operator bool ( ) const
explicitnoexcept

Definition at line 618 of file UploadService.cpp.

619{
620 return mOperation != nullptr;
621}

◆ operator->()

UploadOperation * audacity::cloud::audiocom::UploadOperationHandle::operator-> ( ) const
noexcept

Definition at line 623 of file UploadService.cpp.

624{
625 return mOperation.operator->();
626}

References mOperation.

◆ operator=() [1/2]

UploadOperationHandle & audacity::cloud::audiocom::UploadOperationHandle::operator= ( const UploadOperationHandle )
delete

◆ operator=() [2/2]

UploadOperationHandle & audacity::cloud::audiocom::UploadOperationHandle::operator= ( UploadOperationHandle &&  )
default

Member Data Documentation

◆ mOperation

std::shared_ptr<UploadOperation> audacity::cloud::audiocom::UploadOperationHandle::mOperation {}
private

Definition at line 125 of file UploadService.h.

Referenced by operator->(), and ~UploadOperationHandle().


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