SourceForge Logo
Main Page   Compound List   File List   Compound Members   File Members  

CommandLineParser Class Reference

the parser of the command line arguments. More...

#include <CommandLineParser.h>

List of all members.

Public Methods

 CommandLineParser (int argc, const char **argv)
 Constructor of the parser of the command line arguments. More...

 ~CommandLineParser ()
 Destructor of the parser of the command line arguments. More...

void parse (void)
 parses the command line and defines the informations needed. More...

bool check_syntax (void)
 Check if the arguments parsed are consistent. More...

void syntax_error (void)
 Display the syntax of TPassGuard. More...

string getOption (string option)
 Returns an option found in the command line arguments. More...

string getMode (void) const
 Returns the mode found in the command line arguments. More...

list< string > getSearchStringList (void) const
 Returns the search strings found in the command line arguments. More...

void setSyntaxErrorString (string error_message)
 Add an error message to the error message list in order to have it displayed by the syntax_error() function. More...


Detailed Description

the parser of the command line arguments.


Constructor & Destructor Documentation

CommandLineParser::CommandLineParser int    argc,
const char **    argv
 

Constructor of the parser of the command line arguments.

Parameters:
argc  number of argument on the command line
argv  the array of argument of the command line
Returns:
none

CommandLineParser::~CommandLineParser  
 

Destructor of the parser of the command line arguments.

Returns:
none


Member Function Documentation

bool CommandLineParser::check_syntax void   
 

Check if the arguments parsed are consistent.

Returns:
true if they are / false otherwise

string CommandLineParser::getMode void    const
 

Returns the mode found in the command line arguments.

Returns:
the mode asked on the command line or empty string if not found

string CommandLineParser::getOption string    option
 

Returns an option found in the command line arguments.

Parameters:
option  the name of the option without the hyphen '-'
Returns:
the codec type string or empty string if not found

list< string > CommandLineParser::getSearchStringList void    const
 

Returns the search strings found in the command line arguments.

Returns:
a list of the search strings found

void CommandLineParser::parse void   
 

parses the command line and defines the informations needed.

Returns:
none

void CommandLineParser::setSyntaxErrorString string    error_message
 

Add an error message to the error message list in order to have it displayed by the syntax_error() function.

Parameters:
error_message  the message you want to be displayed by syntax_error() function
Returns:
none

void CommandLineParser::syntax_error void   
 

Display the syntax of TPassGuard.

Returns:
none


The documentation for this class was generated from the following files:
Generated on Thu Feb 27 13:26:19 2003 for TPassGuard by doxygen1.2.15