KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KI_TEST::SCOPED_GIT_CONFIG_SEARCH_PATH Class Reference

Point every config level above the repository at one directory, restoring the previous paths afterwards. More...

#include <git_test_fixture.h>

Public Member Functions

 SCOPED_GIT_CONFIG_SEARCH_PATH (const std::string &aPath)
 
 ~SCOPED_GIT_CONFIG_SEARCH_PATH ()
 
 SCOPED_GIT_CONFIG_SEARCH_PATH (const SCOPED_GIT_CONFIG_SEARCH_PATH &)=delete
 
SCOPED_GIT_CONFIG_SEARCH_PATH & operator= (const SCOPED_GIT_CONFIG_SEARCH_PATH &)=delete
 

Private Member Functions

void restore ()
 

Private Attributes

std::vector< std::pair< git_config_level_t, std::string > > m_saved
 

Detailed Description

Point every config level above the repository at one directory, restoring the previous paths afterwards.

Definition at line 40 of file git_test_fixture.h.

Constructor & Destructor Documentation

◆ SCOPED_GIT_CONFIG_SEARCH_PATH() [1/2]

KI_TEST::SCOPED_GIT_CONFIG_SEARCH_PATH::SCOPED_GIT_CONFIG_SEARCH_PATH ( const std::string & aPath)
inlineexplicit

Definition at line 43 of file git_test_fixture.h.

References BOOST_REQUIRE(), GIT_BUF_INIT, m_saved, and restore().

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

◆ ~SCOPED_GIT_CONFIG_SEARCH_PATH()

KI_TEST::SCOPED_GIT_CONFIG_SEARCH_PATH::~SCOPED_GIT_CONFIG_SEARCH_PATH ( )
inline

Definition at line 66 of file git_test_fixture.h.

References restore().

◆ SCOPED_GIT_CONFIG_SEARCH_PATH() [2/2]

KI_TEST::SCOPED_GIT_CONFIG_SEARCH_PATH::SCOPED_GIT_CONFIG_SEARCH_PATH ( const SCOPED_GIT_CONFIG_SEARCH_PATH & )
delete

Member Function Documentation

◆ operator=()

SCOPED_GIT_CONFIG_SEARCH_PATH & KI_TEST::SCOPED_GIT_CONFIG_SEARCH_PATH::operator= ( const SCOPED_GIT_CONFIG_SEARCH_PATH & )
delete

◆ restore()

void KI_TEST::SCOPED_GIT_CONFIG_SEARCH_PATH::restore ( )
inlineprivate

Definition at line 72 of file git_test_fixture.h.

References m_saved.

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

Member Data Documentation

◆ m_saved

std::vector<std::pair<git_config_level_t, std::string> > KI_TEST::SCOPED_GIT_CONFIG_SEARCH_PATH::m_saved
private

Definition at line 78 of file git_test_fixture.h.

Referenced by restore(), and SCOPED_GIT_CONFIG_SEARCH_PATH().


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