examples::CommandLine Class Reference

#include <example_command_line.hh>

Inheritance diagram for examples::CommandLine:

paludis::args::ArgsHandler paludis::PrivateImplementationPattern< C_ >

List of all members.

Action arguments

paludis::args::ArgsGroup action_args
paludis::args::SwitchArg a_version
paludis::args::SwitchArg a_help

General arguments

{

paludis::args::ArgsGroup general_args
paludis::args::LogLevelArg a_log_level
paludis::args::StringArg a_environment

Program information

virtual std::string app_name () const
virtual std::string app_synopsis () const
virtual std::string app_description () const

Public Member Functions

virtual void run (const int, const char *const *const, const std::string &client, const std::string &env_var, const std::string &env_prefix)

Friends

class paludis::InstantiationPolicy< CommandLine, paludis::instantiation_method::SingletonTag >


Detailed Description

This class provides basic command line handling for most examples.

Most Paludis clients should support at least '--help', '--version' and '--log-level'. If paludis::EnvironmentFactory is used to create the environment (as opposed to, say, paludis::NoConfigEnvironment), then '--environment' must also be an option.

Clients are free to use whichever command line handling library they prefer, but for convenience all Paludis core clients use a common utility library with a much simpler interface than that provided by overly C-ish getopt derivatives.

The command line is a singleton -- that is, only one instance of it exists globally. This avoids the need to pass around lots of parameters.


Member Function Documentation

std::string CommandLine::app_name (  )  const [virtual]

What is our application name?

Implements paludis::args::ArgsHandler.

std::string CommandLine::app_synopsis (  )  const [virtual]

One line synopsis of what our application is.

Implements paludis::args::ArgsHandler.

std::string CommandLine::app_description (  )  const [virtual]

Long description of what our application is.

Implements paludis::args::ArgsHandler.


The documentation for this class was generated from the following files:
Generated on Mon Sep 21 10:36:09 2009 for paludis by  doxygen 1.5.4