#include <CmdLineParser.h>
Public Member Functions | |
OptionsSTRING (const Parser &parser) | |
Option< std::string > & | Add (const std::string &, const std::string &="", std::string="", const char *first=0,...) |
bool | Match (int &, char **, int) |
Private Attributes | |
std::map< std::string, std::list< std::string > > | m_ranges |
CmdLine::OptionsSTRING::OptionsSTRING | ( | const Parser & | parser | ) | [inline] |
Option< std::string > & OptionsSTRING::Add | ( | const std::string & | name, | |
const std::string & | alias = "" , |
|||
std::string | def = "" , |
|||
const char * | first = 0 , |
|||
... | ||||
) |
String.Add( "-s", "--str", "name1", "name2", NULL );
References CmdLine::Parser::m_flags, CmdLine::OptionsType< std::string >::m_parser, and m_ranges.
bool OptionsSTRING::Match | ( | int & | i, | |
char ** | argv, | |||
int | argc | |||
) |
Try to identify a string option in command-line and then add it (together its string argument) into m_opts.
References CmdLine::OptionsType< std::string >::CheckDuplicate(), CmdLine::OptionsType< std::string >::Find(), CmdLine::Option< T >::IsSet(), CmdLine::Option< T >::m_found, m_ranges, CmdLine::Option< T >::m_value, CmdLine::NO_VALUE, CmdLine::OUT_OF_RANGE, and CmdLine::SILENT.
Referenced by CmdLine::Parser::Process().
std::map<std::string, std::list<std::string> > CmdLine::OptionsSTRING::m_ranges [private] |