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