9 if ( recursions > 0 ) {
10 int lvl = 0, mx_lvl = 0;
11 for (
const char *
c = source.
c_str(), *beg =
nullptr; *
c != 0; ++
c ) {
14 if ( *(
c + 1 ) ==
'{' ) {
24 if ( lvl == mx_lvl ) {
27 if ( !
System::getEnv( env.c_str(), rep ) ) rep = i_resolve( env, --recursions );
30 size_t idx = std::string::npos;
31 while ( ( idx = source.
find( e ) ) != std::string::npos ) {
32 source.
replace( idx, e.length(), rep );
34 return i_resolve( source, --recursions );
54 res = i_resolve( source, recursions );
55 if ( res.
find(
"${" ) == std::string::npos ) {
GAUDI_API std::string getEnv(const char *var)
get a particular environment variable (returning "UNKNOWN" if not set)
constexpr static const auto FAILURE
GAUDI_API std::string homeDirectory()
GAUDI_API StatusCode resolveEnv(const std::string &var, std::string &res, int recusions=124)
GAUDI_API std::string tempDirectory()
This class is used for returning status codes from appropriate routines.
constexpr static const auto SUCCESS