From 59b4ce283be66b7b7a28b791d214c19644dbaa2a Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Sun, 2 May 2010 19:45:27 +0000 Subject: [PATCH] (array) for DI parameters git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1891 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- apps/dsm/DSMCoreModule.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/apps/dsm/DSMCoreModule.cpp b/apps/dsm/DSMCoreModule.cpp index 4d211b70..b465d670 100644 --- a/apps/dsm/DSMCoreModule.cpp +++ b/apps/dsm/DSMCoreModule.cpp @@ -895,6 +895,24 @@ EXEC_ACTION_START(SCDIAction) { sc_sess->SET_STRERROR("converting value '"+p+"' to int\n"); EXEC_ACTION_STOP; } + } else if (p.length() > 5 && + p.substr(0, 5) =="(array)") { + p = resolveVars(p.substr(7), sess, sc_sess, event_params); + AmArg var_struct; + string varprefix = p+"."; + bool has_vars = false; + map::iterator lb = sc_sess->var.lower_bound(varprefix); + while (lb != sc_sess->var.end()) { + if ((lb->first.length() < varprefix.length()) || + strncmp(lb->first.c_str(), varprefix.c_str(),varprefix.length())) + break; + string varname = lb->first.substr(varprefix.length()); + var_struct[varname] = lb->second; + + lb++; + has_vars = true; + } + di_args.push(var_struct); } else { di_args.push(resolveVars(p, sess, sc_sess, event_params).c_str()); }