28 const std::optional<wxString>& aValue ) :
33 if( wxGetEnv( aName, &oldValue ) )
38 wxSetEnv( aName, *aValue );
55 wxSetEnv(
m_name, aValue );
62 if( wxGetEnv(
m_name, &value ) )
KiCad uses environment variables internally for determining the base paths for libraries,...
ENV_VAR_MAP & m_pgmEnvVars
std::optional< ENV_VAR_ITEM > m_oldValue
ENV_VAR_ITEM & GetItem()
Get the wrapped environment variable item.
SCOPED_PGM_ENV_VAR(const wxString &aName, const std::optional< wxString > &aValue)
std::optional< wxString > m_oldValue
std::optional< wxString > GetValue() const
Get the current value of the environment variable, if it exists.
void ClearValue()
Clear the environment variable for the lifetime of this object.
~SCOPED_PROCESS_ENV_VAR()
void SetValue(const wxString &aValue)
Set a new value for the environment variable (which will still only be in effect for the lifetime of ...
SCOPED_PROCESS_ENV_VAR(const wxString &aName, const std::optional< wxString > &aValue)
PGM_BASE & Pgm()
The global program "get" accessor.