wibble::commandline::Parser Class Reference

Generic parser for commandline arguments. More...

#include <parser.h>

Inheritance diagram for wibble::commandline::Parser:
[legend]
Collaboration diagram for wibble::commandline::Parser:
[legend]

List of all members.

Public Member Functions

 Parser (const std::string &name, const std::string &usage=std::string(), const std::string &description=std::string(), const std::string &longDescription=std::string())
bool parse (int argc, const char *argv[])
 Parse the commandline.
bool hasNext () const
std::string next ()

Protected Attributes

ArgList m_args
MemoryManager m_manager

Detailed Description

Generic parser for commandline arguments.


Constructor & Destructor Documentation

wibble::commandline::Parser::Parser ( const std::string &  name,
const std::string &  usage = std::string(),
const std::string &  description = std::string(),
const std::string &  longDescription = std::string() 
) [inline]

Member Function Documentation

bool wibble::commandline::Parser::hasNext (  )  const [inline]
std::string wibble::commandline::Parser::next (  )  [inline]
bool wibble::commandline::Parser::parse ( int  argc,
const char *  argv[] 
) [inline]

Parse the commandline.

Returns:
true if it also took care of performing the action requested by the user, or false if the caller should do it instead.

Reimplemented in wibble::commandline::StandardParser, wibble::commandline::StandardParserWithManpage, and wibble::commandline::StandardParserWithMandatoryCommand.

References m_args, and wibble::commandline::Engine::parseList().

Referenced by wibble::commandline::StandardParser::parse().


Member Data Documentation

Referenced by hasNext(), next(), and parse().

Reimplemented from wibble::commandline::Engine.


The documentation for this class was generated from the following file:
Generated on Wed May 12 10:46:57 2010 for wibble by  doxygen 1.6.3