gatb.core-API-0.0.0
|
Option that has no argument. More...
#include <OptionsParser.hpp>
Public Member Functions | |
OptionNoParam (const std::string &name, const std::string &help, bool mandatory=false, bool visible=true) | |
void | proceed (const std::list< std::string > &args, IProperties &props) |
Public Member Functions inherited from Option | |
Option (const std::string &name, int nbArgs, bool mandatory, const std::string &defaultValue, bool visible, const std::string &help) | |
virtual | ~Option () |
std::string | getDefaultValue () const |
void | setDefaultValue (const std::string &value) |
bool | isMandatory () const |
IOptionsParser * | getParser (const std::string &name) |
void | accept (IOptionsParserVisitor &visitor, size_t depth=0) |
Public Member Functions inherited from OptionsParser | |
OptionsParser (const std::string &name="", const std::string &help="") | |
virtual | ~OptionsParser () |
const std::string & | getName () const |
void | setName (const std::string &name) |
void | setVisible (bool status) |
bool | isVisible () const |
const std::string & | getHelp () const |
void | setHelp (const std::string &help) |
misc::IProperties * | parse (int argc, char **argv) |
misc::IProperties * | parseString (const std::string &s) |
misc::IProperties * | getProperties () |
bool | saw (const std::string &name) const |
void | push_back (IOptionsParser *parser, size_t expandDepth=0, bool visibility=true) |
void | push_front (IOptionsParser *parser, size_t expandDepth=0, bool visibility=true) |
std::list< IOptionsParser * > & | getParsers () |
misc::IProperties * | getDefaultProperties () |
Public Member Functions inherited from SmartPointer | |
void | use () |
void | forget () |
Public Member Functions inherited from ISmartPointer | |
virtual | ~ISmartPointer () |
Additional Inherited Members | |
Protected Member Functions inherited from Option | |
size_t | getNbArgs () const |
Protected Member Functions inherited from SmartPointer | |
SmartPointer () | |
virtual | ~SmartPointer () |
Option that has no argument.
This is a special option (with no name) that memorize the arguments that are not involved with a known option.
|
inline |
Constructor.
[in] | name | : name of the option |
[in] | help | : textual help for this option |
[in] | mandatory | : tells whether this option is mandatory or not |
[in] | visible | : tells whether this option may be shown in help |
|
inlinevirtual |
When an option is recognized in the arguments list, we look the number of waited args and put them in a list of string objects. This is this list that is given as argument of the proceed() method that mainly will affect the given args to the variable given to the instantiation of the (derived class) Option.
Implements Option.