All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
getenv.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_TF_GETENV_H
8#define PXR_BASE_TF_GETENV_H
9
13
14#include "pxr/pxr.h"
15#include "pxr/base/tf/api.h"
16
17#include <string>
18
19PXR_NAMESPACE_OPEN_SCOPE
20
23
29TF_API
30std::string TfGetenv(const std::string& envName,
31 const std::string& defaultValue = "");
32
40TF_API
41int TfGetenvInt(const std::string& envName, int defaultValue);
42
50TF_API
51bool TfGetenvBool(const std::string&, bool defaultValue);
52
61TF_API
62double TfGetenvDouble(const std::string& envName, double defaultValue);
63
65
66PXR_NAMESPACE_CLOSE_SCOPE
67
68#endif
TF_API bool TfGetenvBool(const std::string &, bool defaultValue)
Return an environment variable as a boolean.
TF_API int TfGetenvInt(const std::string &envName, int defaultValue)
Return an environment variable as an integer.
TF_API double TfGetenvDouble(const std::string &envName, double defaultValue)
Return an environment variable as a double.
TF_API std::string TfGetenv(const std::string &envName, const std::string &defaultValue="")
Return an environment variable as a string.