gatb.core-API-1.4.2
OptionNoParam Class Reference

Option that has no argument. More...

#include <OptionsParser.hpp>

Inheritance diagram for OptionNoParam:
Inheritance graph

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
 
IOptionsParsergetParser (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::IPropertiesparse (int argc, char **argv)
 
misc::IPropertiesparseString (const std::string &s)
 
misc::IPropertiesgetProperties ()
 
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::IPropertiesgetDefaultProperties ()
 
- 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 ()
 

Detailed Description

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.

Constructor & Destructor Documentation

OptionNoParam ( const std::string &  name,
const std::string &  help,
bool  mandatory = false,
bool  visible = true 
)
inline

Constructor.

Parameters
[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

Member Function Documentation

void proceed ( const std::list< std::string > &  args,
IProperties props 
)
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.


The documentation for this class was generated from the following file: