command 'feed' moved from ebusctl into ebusfeed;tools directory created.

This commit is contained in:
Roland Jax
2014-11-24 15:52:31 +01:00
parent b07a6930fd
commit 972277d68d
9 changed files with 255 additions and 152 deletions
+38 -5
View File
@@ -117,9 +117,10 @@ public:
/**
* @brief create an instance and return the reference.
* @param command is true if an command is needed.
* @param argument is true if command could have an argument.
* @return the reference to instance.
*/
static Appl& Instance(const bool command=false);
static Appl& Instance(const bool command=false, const bool argument=false);
/**
* @brief destructor.
@@ -176,24 +177,50 @@ public:
int numArgs() const { return m_arguments.size(); }
/**
* @brief returns the string of an interested argument (0 = command).
* @brief returns the string of given command.
* @return the command string.
*/
string getCommand() const { return m_command; }
/**
* @brief returns the string of an interested argument.
* @param num number of interested argument.
* @return string value.
* @return the argument string.
*/
string getArg(const int num) const { return m_arguments[num]; }
private:
/** private constructor - singleton pattern */
Appl(const bool command) : m_needCommand(command) {}
/**
* @brief private construtor.
* @param command is true if an command is needed.
* @param argument is true if command could have an argument.
*/
Appl(const bool command, const bool argument)
: m_needCommand(command), m_withArgument(argument) {}
/**
* @brief private copy construtor.
* @param reference to an instance.
*/
Appl(const Appl&);
/**
* @brief private = operator.
* @param reference to an instance.
*/
Appl& operator=(const Appl&);
/** application options */
vector<opt_t> m_opts;
/** application options iterator */
vector<opt_t>::const_iterator o_it;
/** map option - value */
map<const char*, OptVal> m_optvals;
/** map option - value iterator */
map<const char*, OptVal>::iterator ov_it;
/** given arguments */
@@ -205,7 +232,13 @@ private:
/** true if the application need a command */
bool m_needCommand;
/** arguments (argument 0 = command) string */
/** true if the needed command could have an argument */
bool m_withArgument;
/** command (argument 0 = command) string */
string m_command;
/** arguments (argument >= 1) string */
vector<string> m_arguments;
/**