optparse::Option Class Reference

#include <optparse.h>

List of all members.

Public Member Functions

 Option (std::string shrt, std::string lng, std::string dest, std::string hlp, action_t act, std::string dfault, type_t type, std::string allowed_args)
 ~Option ()
bool is_allowed (std::string argument)

Public Attributes

action_t action
std::string shrt_flag
std::string lng_flag
std::string help
std::string destination
std::string dfault_
type_t type_
std::string allowed_args_
 Comma-separated list of allowed option arguments.

Detailed Description

Option for OptionParser

Definition at line 43 of file optparse.h.

Constructor & Destructor Documentation

optparse::Option::Option ( std::string  shrt,
std::string  lng,
std::string  dest,
std::string  hlp,
action_t  act,
std::string  dfault,
type_t  type,
std::string  allowed_args 

optparse::Option::~Option (  ) 

Definition at line 30 of file optparse.cpp.

Member Function Documentation

bool optparse::Option::is_allowed ( std::string  argument  ) 

Validate option argument. Test if argument is valid for the option. The argument must be valid w.r.t. to type_ and allowed_values_.

argument Argument to be tested.
true if argument is valid.

Definition at line 33 of file optparse.cpp.

References allowed_args_.

Referenced by optparse::OptionParser::set_option().

Member Data Documentation

action_t optparse::Option::action

Definition at line 59 of file optparse.h.

std::string optparse::Option::allowed_args_

Comma-separated list of allowed option arguments.

Definition at line 74 of file optparse.h.

Referenced by is_allowed().

std::string optparse::Option::destination

Definition at line 63 of file optparse.h.

Referenced by optparse::OptionParser::set_option().

std::string optparse::Option::dfault_

Default value. An empty string means no default value exist.

Definition at line 67 of file optparse.h.

std::string optparse::Option::help

Definition at line 62 of file optparse.h.

std::string optparse::Option::lng_flag

Definition at line 61 of file optparse.h.

std::string optparse::Option::shrt_flag

Definition at line 60 of file optparse.h.

type_t optparse::Option::type_

Expected type the argument of this option should have. Only relevant for STORE action. Used for generating the usage string.

Definition at line 73 of file optparse.h.

The documentation for this class was generated from the following files:
Generated on Fri Oct 26 13:35:18 2007 for FEMAXX (Finite Element Maxwell Eigensolver) by  doxygen 1.4.7