cmake/Source/cmCLocaleEnvironmentScope.h

27 lines
726 B
C
Raw Normal View History

2016-10-30 18:24:19 +01:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
2021-09-14 00:13:48 +02:00
#pragma once
2015-08-17 11:37:30 +02:00
2018-01-26 17:06:56 +01:00
#include "cmConfigure.h" // IWYU pragma: keep
2016-10-30 18:24:19 +01:00
#include <map>
#include <string>
2015-08-17 11:37:30 +02:00
class cmCLocaleEnvironmentScope
{
public:
cmCLocaleEnvironmentScope();
~cmCLocaleEnvironmentScope();
2019-11-11 23:01:05 +01:00
cmCLocaleEnvironmentScope(cmCLocaleEnvironmentScope const&) = delete;
cmCLocaleEnvironmentScope& operator=(cmCLocaleEnvironmentScope const&) =
delete;
2015-08-17 11:37:30 +02:00
private:
std::string GetEnv(std::string const& key);
void SetEnv(std::string const& key, std::string const& value);
2020-02-01 23:06:01 +01:00
using backup_map_t = std::map<std::string, std::string>;
2015-08-17 11:37:30 +02:00
backup_map_t EnvironmentBackup;
};