gatb.core-API-0.0.0
|
Parser interface that analyzes command line options. More...
#include <IOptionsParser.hpp>
Classes | |
struct | Result |
Public Member Functions | |
virtual const std::string & | getName () const =0 |
virtual void | setName (const std::string &name)=0 |
virtual void | setVisible (bool status)=0 |
virtual bool | isVisible () const =0 |
virtual const std::string & | getHelp () const =0 |
virtual void | setHelp (const std::string &help)=0 |
virtual misc::IProperties * | parse (int argc, char **argv)=0 |
virtual misc::IProperties * | parseString (const std::string &s)=0 |
virtual misc::IProperties * | getProperties ()=0 |
virtual bool | saw (const std::string &name) const =0 |
virtual void | push_back (IOptionsParser *parser, size_t expandDepth=0, bool visibility=true)=0 |
virtual void | push_front (IOptionsParser *parser, size_t expandDepth=0, bool visibility=true)=0 |
virtual IOptionsParser * | getParser (const std::string &name)=0 |
virtual std::list< IOptionsParser * > & | getParsers ()=0 |
virtual misc::IProperties * | getDefaultProperties ()=0 |
virtual void | accept (IOptionsParserVisitor &visitor, size_t depth=0)=0 |
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 SmartPointer | |
SmartPointer () | |
virtual | ~SmartPointer () |
Parser interface that analyzes command line options.
Client can use this class for registering command line options specifications and then can use it for parsing some command line options, typically given as arguments of the 'main' function.
This interface is intended to be implemented as a Composite design pattern, so we will have a 'leaf' implementation (see Option) and a 'composite' implementation (see OptionsParser)
|
pure virtual |
Visitor design pattern.
Implemented in Option, and OptionsParser.
|
pure virtual |
|
pure virtual |
Get help.
Implemented in OptionsParser.
|
pure virtual |
Get name.
Implemented in OptionsParser.
|
pure virtual |
Get a parser given its name.
[in] | name | : name of the parser to be retrieved |
Implemented in Option, and OptionsParser.
|
pure virtual |
|
pure virtual |
Return the properties found during parsing.
Implemented in OptionsParser.
|
pure virtual |
Get visibility status.
Implemented in OptionsParser.
|
pure virtual |
Perform the analyze of the arguments.
[in] | argc | : number of command line arguments. |
[in] | argv | : table of arguments |
Implemented in OptionsParser.
|
pure virtual |
Perform the analyze of the arguments.
[in] | s | : string containing the options to be parsed |
Implemented in OptionsParser.
|
pure virtual |
Add a parser child at the back of known parsers.
[in] | parser | : the child parser |
[in] | expandDepth | : while depth is less than expandDepth, put all the children and not the 'parser' itself. |
[in] | visibility | : visibility status. |
Implemented in OptionsParser.
|
pure virtual |
Add a parser child at the front of known parsers.
[in] | parser | : the child parser |
[in] | expandDepth | : while depth is less than expandDepth, put all the children and not the 'parser' itself. |
[in] | visibility | : visibility status. |
Implemented in OptionsParser.
|
pure virtual |
Tells whether an option has been seen during parsing.
[in] | name | : name of the option to be checked |
Implemented in OptionsParser.
|
pure virtual |
|
pure virtual |
Associate a name to the parser.
[in] | name | : the name of the parser. |
Implemented in OptionsParser.
|
pure virtual |
Set visibility status.
Implemented in OptionsParser.