Gazebo Utils

API Reference

3.1.0
Environment.hh
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 Open Source Robotics Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17
18#ifndef GZ_UTILS_ENVIRONMENT_HH_
19#define GZ_UTILS_ENVIRONMENT_HH_
20
21#include <gz/utils/config.hh>
22#include <gz/utils/Export.hh>
23
24#include <string>
25#include <unordered_map>
26#include <vector>
27
28namespace gz
29{
30namespace utils
31{
32inline namespace GZ_UTILS_VERSION_NAMESPACE {
33
44bool GZ_UTILS_VISIBLE env(
45 const std::string &_name, std::string &_value,
46 bool _allowEmpty = false);
47
52//
59bool GZ_UTILS_VISIBLE setenv(
60 const std::string &_name, const std::string &_value);
61
69bool GZ_UTILS_VISIBLE unsetenv(const std::string &_name);
70
77bool GZ_UTILS_VISIBLE clearenv();
78
81
85
91 const EnvironmentStrings &_envStrings);
92
98 const EnvironmentMap &_envMap);
99
106EnvironmentMap GZ_UTILS_VISIBLE env();
107
112//
118bool GZ_UTILS_VISIBLE setenv(const EnvironmentMap &_vars);
119
129std::string GZ_UTILS_VISIBLE printenv();
130} // namespace GZ_UTILS_VERSION_NAMESPACE
131} // namespace utils
132} // namespace gz
133
134#endif // GZ_UTILS_ENVIRONMENT_HH_