cmCLocaleEnvironmentScope.h 793 Bytes
Newer Older
1 2
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
   file Copyright.txt or https://cmake.org/licensing for details.  */
3 4 5
#ifndef cmCLocaleEnvironmentScope_h
#define cmCLocaleEnvironmentScope_h

6
#include "cmConfigure.h" // IWYU pragma: keep
7 8 9

#include <map>
#include <string>
10 11 12 13 14 15 16

class cmCLocaleEnvironmentScope
{
public:
  cmCLocaleEnvironmentScope();
  ~cmCLocaleEnvironmentScope();

wahikihiki's avatar
wahikihiki committed
17 18 19 20
  cmCLocaleEnvironmentScope(cmCLocaleEnvironmentScope const&) = delete;
  cmCLocaleEnvironmentScope& operator=(cmCLocaleEnvironmentScope const&) =
    delete;

21 22 23 24 25 26 27 28 29
private:
  std::string GetEnv(std::string const& key);
  void SetEnv(std::string const& key, std::string const& value);

  typedef std::map<std::string, std::string> backup_map_t;
  backup_map_t EnvironmentBackup;
};

#endif