#include <CmdLine.h>


Public Member Functions | |
| CmdLine (int argc, char *argv[]) | |
| virtual | ~CmdLine () |
| unsigned long | getOptionCount () const |
| bool | isShortOption (unsigned long i) const |
| String & | getName (unsigned long i) const |
| String & | getContent (unsigned long i) const |
| bool | displayHelpRequired () const |
| bool | displayVersionRequired () const |
| void | copyIntoConfig (Config &c) const |
| virtual String | getClassName () const |
Private Member Functions | |
| CmdLine (const CmdLine &) | |
| const CmdLine & | operator= (const CmdLine &c) |
| bool | operator== (const CmdLine &c) const |
| bool | operator!= (const CmdLine &c) const |
Private Attributes | |
| XList | _list |
| bool | _displayHelp |
| bool | _displayVersion |
Class for the command line.
Definition at line 83 of file CmdLine.h.
| CmdLine::CmdLine | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 64 of file CmdLine.cpp.
References _displayHelp, _displayVersion, _list, alize::XLine::addElement(), and alize::XList::addLine().
| CmdLine::~CmdLine | ( | ) | [virtual] |
Definition at line 146 of file CmdLine.cpp.
| alize::CmdLine::CmdLine | ( | const CmdLine & | ) | [private] |
| void CmdLine::copyIntoConfig | ( | Config & | c ) | const |
Copy options of command line into the configuration object
| c | the configuration |
Definition at line 135 of file CmdLine.cpp.
References _list, alize::XLine::getElement(), alize::XList::getLine(), alize::XList::getLineCount(), and alize::Config::setParam().
| bool CmdLine::displayHelpRequired | ( | ) | const |
Return true if the command line contains --help
Definition at line 131 of file CmdLine.cpp.
References _displayHelp.
| bool CmdLine::displayVersionRequired | ( | ) | const |
Return true if the command line contains --version
Definition at line 133 of file CmdLine.cpp.
References _displayVersion.
| String CmdLine::getClassName | ( | ) | const [virtual] |
Returns the name of the class
Implements alize::Object.
Definition at line 144 of file CmdLine.cpp.
| String & CmdLine::getContent | ( | unsigned long | i ) | const |
Returns the content of the option i
| i | index of the option |
Definition at line 128 of file CmdLine.cpp.
References _list, alize::XLine::getElement(), and alize::XList::getLine().
| String & CmdLine::getName | ( | unsigned long | i ) | const |
Returns the name of the option i
| i | index of the option |
Definition at line 125 of file CmdLine.cpp.
References _list, alize::XLine::getElement(), and alize::XList::getLine().
| unsigned long CmdLine::getOptionCount | ( | ) | const |
Affiche le nombre d'options de la ligne. Attention : les options --help et --version ne sont pas comptée
Definition at line 119 of file CmdLine.cpp.
References _list, and alize::XList::getLineCount().
| bool CmdLine::isShortOption | ( | unsigned long | i ) | const |
Tests whether an option is a short (-)or a long (--) option
| i | index of the option |
Definition at line 122 of file CmdLine.cpp.
References _list, alize::XLine::getElement(), and alize::XList::getLine().
| bool alize::CmdLine::operator!= | ( | const CmdLine & | c ) | const [private] |
not implemented
| bool alize::CmdLine::operator== | ( | const CmdLine & | c ) | const [private] |
not implemented
bool alize::CmdLine::_displayHelp [private] |
Definition at line 134 of file CmdLine.h.
Referenced by CmdLine(), and displayHelpRequired().
bool alize::CmdLine::_displayVersion [private] |
Definition at line 135 of file CmdLine.h.
Referenced by CmdLine(), and displayVersionRequired().
XList alize::CmdLine::_list [private] |
Definition at line 133 of file CmdLine.h.
Referenced by CmdLine(), copyIntoConfig(), getContent(), getName(), getOptionCount(), and isShortOption().
1.7.2