BuildCache
Public Member Functions | Private Attributes | List of all members
bcache::scoped_set_env_t Class Reference

A class for temporarily modifying an environment variable. More...

#include <env_utils.hpp>

Public Member Functions

 scoped_set_env_t (const std::string &name, const std::string &value)
 Temporarily set an environment variable. More...
 
 ~scoped_set_env_t ()
 Restore the environment variable to its old value.
 

Private Attributes

std::string m_name
 
env_var_t m_old_env_var
 

Detailed Description

A class for temporarily modifying an environment variable.

Constructor & Destructor Documentation

◆ scoped_set_env_t()

bcache::scoped_set_env_t::scoped_set_env_t ( const std::string &  name,
const std::string &  value 
)

Temporarily set an environment variable.

Parameters
nameThe name of the environment variable.
valueThe value for the environment variable.

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