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 ) {
26 rep = i_resolve(env, --recursions);
29 size_t idx=std::string::npos;
30 while((idx=source.
find(e)) != std::string::npos) {
31 source.
replace(idx, e.length(), rep);
33 return i_resolve(source, --recursions);
53 res = i_resolve(source, recursions);
54 if ( res.
find(
"${") == std::string::npos ) {
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)
GAUDI_API std::string tempDirectory()
This class is used for returning status codes from appropriate routines.