dbp::cmdline_parameter Class Reference

Command line parameter. More...

#include <cmdline_parameters.h>

List of all members.

Public Types

enum  parameter_type { OPTION, OPTION_WITH_VALUE, COMMAND, FILENAME }
 

Type of command line parameter.

More...

Public Member Functions

 cmdline_parameter ()
 Constructor.
 cmdline_parameter (char short_name, const std::string &long_name, const std::string &description, const std::string &value_name="", parameter_type type=OPTION)
 Constructor.
 cmdline_parameter (parameter_type type)
 Constructor.
 cmdline_parameter (const std::string &description, parameter_type type)
 Constructor.
bool operator== (const parameter_type p_type) const
 Equality operator.
bool operator== (const std::string &name) const
 Equality operator.

Public Attributes

char short_name
std::string long_name
std::string value_name
std::string value
std::string description
parameter_type type

Detailed Description

Command line parameter.

The command line parameter class represents parameter passed to application via command line.


Member Enumeration Documentation

Type of command line parameter.

Enumerator:
OPTION 

represents a single option, with "-" or "--" prefix, for example: '-v', '--help'

OPTION_WITH_VALUE 

represents an option with value, with "-" or "--" prefix, for example: '-i file.txt', '--input=file.txt'.

COMMAND 

represents the command.

FILENAME 

represents a filename passed to the application.


Member Data Documentation

Option description.

Long option name.

Short option name.

Parameter type.

Option value.

Option value name.


The documentation for this class was generated from the following file:

 
Support This Project
SourceForge.net Logo