KiCad PCB EDA Suite
Loading...
Searching...
No Matches
GIT_TRANSFER_BUSY::HOLD Class Reference

One transfer's hold on its repository, released when reset, begun again or destroyed. More...

#include <git_transfer_busy.h>

Public Member Functions

 HOLD ()=default
 
 ~HOLD ()
 
 HOLD (const HOLD &)=delete
 
HOLD & operator= (const HOLD &)=delete
 
void Begin (const std::shared_ptr< KIGIT_COMMON > &aRepo, const wxString &aStatus, std::function< void()> aCancel)
 Release any earlier hold, then hold aRepo busy for one transfer.
 
void Release ()
 

Private Attributes

std::weak_ptr< KIGIT_COMMON > m_repo
 
uint64_t m_id = 0
 

Friends

class GIT_TRANSFER_BUSY
 

Detailed Description

One transfer's hold on its repository, released when reset, begun again or destroyed.

Definition at line 56 of file git_transfer_busy.h.

Constructor & Destructor Documentation

◆ HOLD() [1/2]

GIT_TRANSFER_BUSY::HOLD::HOLD ( )
default

Referenced by HOLD(), and operator=().

◆ ~HOLD()

GIT_TRANSFER_BUSY::HOLD::~HOLD ( )
inline

Definition at line 60 of file git_transfer_busy.h.

References Release().

◆ HOLD() [2/2]

GIT_TRANSFER_BUSY::HOLD::HOLD ( const HOLD & )
delete

References HOLD().

Member Function Documentation

◆ Begin()

void GIT_TRANSFER_BUSY::HOLD::Begin ( const std::shared_ptr< KIGIT_COMMON > & aRepo,
const wxString & aStatus,
std::function< void()> aCancel )

Release any earlier hold, then hold aRepo busy for one transfer.

aCancel may be empty for a transfer that cannot stop.

Definition at line 27 of file git_transfer_busy.cpp.

References GIT_TRANSFER_BUSY, m_id, GIT_TRANSFER_BUSY::m_live, m_repo, UTIL::OBSERVABLE< ObserverInterface >::Notify(), GIT_TRANSFER_WATCHER::OnGitTransfersChanged(), and Release().

Referenced by operator=().

◆ operator=()

HOLD & GIT_TRANSFER_BUSY::HOLD::operator= ( const HOLD & )
delete

References Begin(), HOLD(), and Release().

◆ Release()

void GIT_TRANSFER_BUSY::HOLD::Release ( )

Definition at line 43 of file git_transfer_busy.cpp.

References m_id, m_repo, and GIT_TRANSFER_WATCHER::OnGitTransfersChanged().

Referenced by Begin(), operator=(), and ~HOLD().

Friends And Related Symbol Documentation

◆ GIT_TRANSFER_BUSY

friend class GIT_TRANSFER_BUSY
friend

Definition at line 73 of file git_transfer_busy.h.

References GIT_TRANSFER_BUSY.

Referenced by Begin(), and GIT_TRANSFER_BUSY.

Member Data Documentation

◆ m_id

uint64_t GIT_TRANSFER_BUSY::HOLD::m_id = 0
private

◆ m_repo

std::weak_ptr<KIGIT_COMMON> GIT_TRANSFER_BUSY::HOLD::m_repo
private

Definition at line 75 of file git_transfer_busy.h.

Referenced by Begin(), and Release().


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