KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KIGIT_COMMON::OPERATION_GUARD Class Reference

Publishes a token for as long as its operation runs. More...

#include <kicad_git_common.h>

Public Member Functions

 OPERATION_GUARD (KIGIT_COMMON *aCommon, const CANCEL_TOKEN &aToken)
 
 ~OPERATION_GUARD ()
 Only while it is still the published one, or a slow operation finishing would drop a newer one's token.
 
 OPERATION_GUARD (const OPERATION_GUARD &)=delete
 
OPERATION_GUARD & operator= (const OPERATION_GUARD &)=delete
 

Private Attributes

KIGIT_COMMON * m_common
 
CANCEL_TOKEN m_token
 

Detailed Description

Publishes a token for as long as its operation runs.

Constructed once the action lock is held, so Cancel can only reach the operation that owns the repository.

Definition at line 620 of file kicad_git_common.h.

Constructor & Destructor Documentation

◆ OPERATION_GUARD() [1/2]

KIGIT_COMMON::OPERATION_GUARD::OPERATION_GUARD ( KIGIT_COMMON * aCommon,
const CANCEL_TOKEN & aToken )
inline

Definition at line 623 of file kicad_git_common.h.

References KIGIT_COMMON::KIGIT_COMMON(), m_common, and m_token.

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

◆ ~OPERATION_GUARD()

KIGIT_COMMON::OPERATION_GUARD::~OPERATION_GUARD ( )
inline

Only while it is still the published one, or a slow operation finishing would drop a newer one's token.

Definition at line 637 of file kicad_git_common.h.

References m_common, and m_token.

◆ OPERATION_GUARD() [2/2]

KIGIT_COMMON::OPERATION_GUARD::OPERATION_GUARD ( const OPERATION_GUARD & )
delete

References OPERATION_GUARD().

Member Function Documentation

◆ operator=()

OPERATION_GUARD & KIGIT_COMMON::OPERATION_GUARD::operator= ( const OPERATION_GUARD & )
delete

References OPERATION_GUARD().

Member Data Documentation

◆ m_common

KIGIT_COMMON* KIGIT_COMMON::OPERATION_GUARD::m_common
private

Definition at line 649 of file kicad_git_common.h.

Referenced by OPERATION_GUARD(), and ~OPERATION_GUARD().

◆ m_token

CANCEL_TOKEN KIGIT_COMMON::OPERATION_GUARD::m_token
private

Definition at line 650 of file kicad_git_common.h.

Referenced by OPERATION_GUARD(), and ~OPERATION_GUARD().


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