 |
PhoenixMock
1.8.7
Tools to split/merge/print mock used in Phoenix
|
Go to the documentation of this file.
23 for(
int i(1); i < argc; ++i){
29 std::string argument(argv[i]);
31 std::string cursorOptionValue(
replaceStrInStr(argument,
"__bashcompletionmode=",
""));
35 std::string cursorOptionValue(
replaceStrInStr(argument,
"__bashcompletionmodeprev=",
""));
68 for(PVecString::const_iterator it(
p_vecArg.begin()); it !=
p_vecArg.end(); ++it){
69 std::cout <<
"\t" << *it << std::endl;
void copyArgParser(const ArgParser &other)
Copy function of ArgParser.
void initialisationArgParser()
Initialisation function of the class ArgParser.
PVecString p_vecArg
Vector of arguments.
const std::string & getPrevCursorOption() const
Get the previous option before the cursor option.
const std::string & getCurrentOption() const
Get the current option.
std::string p_prevCursorOption
Previous option before the cursor option.
size_t p_currentArg
Current argument to be parsed.
bool isSameBegining(const std::string &str, const std::string &beginig)
Check if two string start the same way.
void print() const
Print all the input option.
size_t getNbArgument() const
Get the number of arguments passed to the program.
bool isBashCompletionMode() const
Say if the program is in bash completion mode.
std::string p_cursorOption
Option which is typed right now, given to the program (in bash completion mode)
const std::string & getCursorOption() const
Get the cursor option given to the program, in bash completion mode.
ArgParser()
Default constructor of ArgParser.
bool p_bashCompletionMode
Say if the program is in bash completion mode.
bool isEndOfOption() const
Say if is it the end of the options.
void replaceStrInStr(std::string &out, const std::string &src, const std::string &patern, const std::string &replace)
Replace a patern by an other in the input string.
void rewind()
Go bask to the first argument.
void getNextOption()
Move to the next option.
ArgParser & operator=(const ArgParser &other)
Definition of equal operator of ArgParser.
Parse the list of arguments passed to a program.
virtual ~ArgParser()
Destructeur of ArgParser.