class Appl: numArg function added; ebusd_send: get, set, cyc commands implemented.

This commit is contained in:
Roland Jax
2014-06-03 10:55:06 +02:00
parent 938cc31902
commit 413af597bd
3 changed files with 31 additions and 12 deletions
+7 -4
View File
@@ -62,7 +62,8 @@ public:
~Appl();
void addArgs(const std::string argTxt, const int argNum);
std::string getArg(const int argNum) const { return m_argv[m_argc - 1 - m_argNum + argNum]; }
size_t numArg() const { return m_argValues.size(); }
std::string getArg(const int argNum) const { return m_argValues[argNum]; }
void addItem(const char* name, Param param, const char* shortname,
const char* longname, const char* description,
@@ -87,9 +88,6 @@ private:
Optiontype optiontype;
};
std::string m_argTxt;
int m_argNum;
int m_argc;
std::vector<std::string> m_argv;
@@ -99,6 +97,11 @@ private:
std::map<const char*, Param> m_params;
std::map<const char*, Param>::iterator p_it;
std::string m_argTxt;
int m_argNum;
std::vector<std::string> m_argValues;
bool checkArg(const std::string& name, const std::string& arg);
void addParam(const char* name, Param param) { m_params[name] = param; }