Teamcenter C++ API Reference  2312
OSEnvironment.hxx
Go to the documentation of this file.
1 //Copyright 2022 Siemens Digital Industries Software
2 //==================================================
3 //Copyright $2010.
4 //Siemens Product Lifecycle Management Software Inc.
5 //All Rights Reserved.
6 //==================================================
7 //Copyright 2022 Siemens Digital Industries Software
8 
16 #ifndef BASE_UTILS_OSENVIRONMENT_HXX
17 #define BASE_UTILS_OSENVIRONMENT_HXX
18 
19 #include <string>
20 #include <map>
21 #include <base_utils/libbase_utils_exports.h>
22 
23 namespace Teamcenter
24 {
25 namespace OSEnvironment
26 {
44  BASE_UTILS_API std::string get(
45  const std::string & name,
46  bool applyOSEnvNameMapping = true,
47  bool throwStdExceptionIfNotFound = false
49  ); //lint !e1761 This is a non-member function and can be used without ambiguity after resolving the namespace at caller location. 2015-06-19
50 
64  BASE_UTILS_API bool has(
65  const std::string & name,
66  bool applyOSEnvNameMapping = true
67  );
68 
76  BASE_UTILS_API void set(
77  const std::string & name,
78  const std::string & value,
79  bool applyOSEnvNameMapping = true
80  ); //lint !e1761 This is a non-member function and can be used without ambiguity after resolving the namespace at caller location. 2015-06-19
81 
82 
87  BASE_UTILS_API void addPrefixMapping(
88  const std::string & oldPrefix,
89  const std::string & newPrefix
90  );
91 
92 
97  BASE_UTILS_API void removePrefixMapping(
98  const std::string &oldPrefix
99  );
100 
108  BASE_UTILS_API std::string getMappedName(
109  const std::string & originalName
110  );
111 
112 
116  BASE_UTILS_API const std::map< std::string, std::string > & getNamePrefixMap(); //lint !e1929 This function returns a const reference. Further the const reference of a member variable of a singleton whose lifecycle is managed well. 2015-06-19
117 }
118 }
119 #include <base_utils/libbase_utils_undef.h>
120 #endif