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 74 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 534 of file UploadService.cpp.

536 : mOperation(std::move(operation))
537{
538}
std::shared_ptr< UploadOperation > mOperation
Definition: UploadService.h:92

◆ 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 540 of file UploadService.cpp.

541{
542 if (mOperation)
543 // It is safe to call Abort on completed operations
544 mOperation->Abort();
545}

References mOperation.

Member Function Documentation

◆ operator bool()

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

Definition at line 547 of file UploadService.cpp.

548{
549 return mOperation != nullptr;
550}

◆ operator->()

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

Definition at line 552 of file UploadService.cpp.

553{
554 return mOperation.operator->();
555}

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 92 of file UploadService.h.

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


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