HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
env.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef PXR_BASE_ARCH_ENV_H
8 #define PXR_BASE_ARCH_ENV_H
9 
10 #include "pxr/pxr.h"
11 #include "pxr/base/arch/api.h"
12 
13 #include <string>
14 
16 
17 ///
18 /// Architecture dependent access to environment variables.
19 /// \ingroup group_arch_SystemFunctions
20 ///
21 
22 ///
23 /// Returns \c true if and only if the current environment contains \c name.
24 /// \ingroup group_arch_SystemFunctions
25 ///
26 ARCH_API
27 bool
28 ArchHasEnv(const std::string &name);
29 
30 ///
31 /// Gets a value from the current environment identified by \c name.
32 /// \ingroup group_arch_SystemFunctions
33 ///
34 ARCH_API
35 std::string
36 ArchGetEnv(const std::string &name);
37 
38 ///
39 /// Creates or modifies an environment variable.
40 /// \ingroup group_arch_SystemFunctions
41 ///
43 bool
44 ArchSetEnv(const std::string &name, const std::string &value, bool overwrite);
45 
46 ///
47 /// Removes an environment variable.
48 /// \ingroup group_arch_SystemFunctions
49 ///
51 bool
52 ArchRemoveEnv(const std::string &name);
53 
54 ///
55 /// Expands environment variables in \c str.
56 /// \ingroup group_arch_SystemFunctions
57 ///
59 std::string
60 ArchExpandEnvironmentVariables(const std::string& str);
61 
62 ///
63 /// Return an array of the environment variables.
64 /// \ingroup group_arch_SystemFunctions
65 ///
67 char**
68 ArchEnviron();
69 
71 
72 #endif // PXR_BASE_ARCH_ENV_H
PXR_NAMESPACE_OPEN_SCOPE ARCH_API bool ArchHasEnv(const std::string &name)
GLsizei const GLfloat * value
Definition: glcorearb.h:824
ARCH_API std::string ArchExpandEnvironmentVariables(const std::string &str)
ARCH_API char ** ArchEnviron()
ARCH_API bool ArchRemoveEnv(const std::string &name)
ARCH_API std::string ArchGetEnv(const std::string &name)
GLuint const GLchar * name
Definition: glcorearb.h:786
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
#define ARCH_API
Definition: api.h:23
ARCH_API bool ArchSetEnv(const std::string &name, const std::string &value, bool overwrite)