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

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

#include <UploadService.h>

Collaboration diagram for 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 104 of file UploadService.h.

Constructor & Destructor Documentation

◆ UploadOperationHandle() [1/4]

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

◆ UploadOperationHandle() [2/4]

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

Definition at line 597 of file UploadService.cpp.

599 : mOperation(std::move(operation))
600{
601}
std::shared_ptr< UploadOperation > mOperation

◆ UploadOperationHandle() [3/4]

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

◆ UploadOperationHandle() [4/4]

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

◆ ~UploadOperationHandle()

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

Definition at line 603 of file UploadService.cpp.

604{
605 if (mOperation)
606 // It is safe to call Abort on completed operations
607 mOperation->Abort();
608}

References mOperation.

Member Function Documentation

◆ operator bool()

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

Definition at line 610 of file UploadService.cpp.

611{
612 return mOperation != nullptr;
613}

◆ operator->()

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

Definition at line 615 of file UploadService.cpp.

616{
617 return mOperation.operator->();
618}

References mOperation.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Member Data Documentation

◆ mOperation

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

Definition at line 122 of file UploadService.h.

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


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