KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SCOPED_GIT_BACKEND Class Reference

Install a real backend for a test and restore the previous backend afterwards. More...

#include <scoped_git_backend.h>

Public Member Functions

 SCOPED_GIT_BACKEND ()
 
 ~SCOPED_GIT_BACKEND ()
 
 SCOPED_GIT_BACKEND (const SCOPED_GIT_BACKEND &)=delete
 
SCOPED_GIT_BACKEND & operator= (const SCOPED_GIT_BACKEND &)=delete
 
LIBGIT_BACKEND * Backend () const
 

Private Attributes

GIT_BACKEND * m_previous = GetGitBackend()
 
LIBGIT_BACKEND * m_backend = nullptr
 

Detailed Description

Install a real backend for a test and restore the previous backend afterwards.

Definition at line 27 of file scoped_git_backend.h.

Constructor & Destructor Documentation

◆ SCOPED_GIT_BACKEND() [1/2]

SCOPED_GIT_BACKEND::SCOPED_GIT_BACKEND ( )
inline

Definition at line 30 of file scoped_git_backend.h.

References m_backend, and SetGitBackend().

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

◆ ~SCOPED_GIT_BACKEND()

SCOPED_GIT_BACKEND::~SCOPED_GIT_BACKEND ( )
inline

Definition at line 37 of file scoped_git_backend.h.

References m_backend, m_previous, and SetGitBackend().

◆ SCOPED_GIT_BACKEND() [2/2]

SCOPED_GIT_BACKEND::SCOPED_GIT_BACKEND ( const SCOPED_GIT_BACKEND & )
delete

References SCOPED_GIT_BACKEND().

Member Function Documentation

◆ Backend()

LIBGIT_BACKEND * SCOPED_GIT_BACKEND::Backend ( ) const
inline

Definition at line 47 of file scoped_git_backend.h.

References m_backend.

◆ operator=()

SCOPED_GIT_BACKEND & SCOPED_GIT_BACKEND::operator= ( const SCOPED_GIT_BACKEND & )
delete

References SCOPED_GIT_BACKEND().

Member Data Documentation

◆ m_backend

LIBGIT_BACKEND* SCOPED_GIT_BACKEND::m_backend = nullptr
private

Definition at line 51 of file scoped_git_backend.h.

Referenced by Backend(), SCOPED_GIT_BACKEND(), and ~SCOPED_GIT_BACKEND().

◆ m_previous

GIT_BACKEND* SCOPED_GIT_BACKEND::m_previous = GetGitBackend()
private

Definition at line 50 of file scoped_git_backend.h.

Referenced by ~SCOPED_GIT_BACKEND().


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