+
+SGCONF::API_ACTION::API_ACTION(COMMANDS & commands,
+ const std::string & paramDescription,
+ bool needArgument,
+ const std::vector<PARAM> & params,
+ API_FUNCTION funPtr)
+ : m_commands(commands),
+ m_description(paramDescription),
+ m_argument(needArgument ? "1" : ""), // Hack
+ m_funPtr(funPtr)
+{
+std::vector<PARAM>::const_iterator it(params.begin());
+while (it != params.end())
+ {
+ m_suboptions.Add(it->name, MakeKVAction(it->name, it->shortDescr), it->longDescr);
+ ++it;
+ }
+}