|
optionmm::basic_option< Type, argument, multivalue, Trait > Class Template Reference#include <optionmm/option.hh>
Inheritance diagram for optionmm::basic_option< Type, argument, multivalue, Trait >: Detailed Descriptiontemplate<typename Type, bool argument = true, bool multivalue = true, typename Trait = option_trait<Type>>
Command line option class.
|
Public Types | |
typedef Type | value_type |
typedef std::vector< value_type > | value_list |
typedef Trait | trait_type |
Public Member Functions | |
basic_option (char s, const std::string &l, const std::string &h, value_type d) | |
virtual | ~basic_option () |
bool | need_argument () const |
bool | many_values () const |
int | size () const |
const value_type & | value (int i=0) const |
const value_list & | values () const |
int | push_arg (const char *arg, int pos) |
int | push_arg (int pos) |
virtual void | print (int ll, std::ostream &o=std::cout) const |
Protected Attributes | |
value_list | _values |
value_type | _default |
|
Type of value container.
|
|
The value type.
|
|
|
Constructor.
Definition at line 330 of file option.hh. References optionmm::basic_option< Type, argument, multivalue, Trait >::value_type. |
|
Destructor.
|
|
Whether this optin can take many values.
Reimplemented from optionmm::option_base. Definition at line 296 of file option.hh. Referenced by optionmm::basic_option< Type, argument, multivalue, Trait >::print(), and optionmm::basic_option< Type, argument, multivalue, Trait >::push_arg(). |
|
Whether this option need an argument.
Reimplemented from optionmm::option_base. Definition at line 294 of file option.hh. Referenced by optionmm::basic_option< Type, argument, multivalue, Trait >::print(). |
|
Print this option help line to a stream.
Implements optionmm::option_base. Definition at line 398 of file option.hh. References optionmm::option_base::_help_string, optionmm::option_base::_long_name, optionmm::option_base::_short_name, optionmm::basic_option< Type, argument, multivalue, Trait >::many_values(), and optionmm::basic_option< Type, argument, multivalue, Trait >::need_argument(). |
Here is the call graph for this function:
|
Add a value. This is used by the command_line class to set the values of the options, in case need_argument tests false.
Implements optionmm::option_base. Definition at line 376 of file option.hh. References optionmm::basic_option< Type, argument, multivalue, Trait >::_default, optionmm::option_base::_positions, optionmm::basic_option< Type, argument, multivalue, Trait >::_values, optionmm::option_base::can_handle, and optionmm::basic_option< Type, argument, multivalue, Trait >::many_values(). |
Here is the call graph for this function:
|
Add a value from a string. This is used by the command_line class to set the values of the options, in case need_argument tests true.
Implements optionmm::option_base. Definition at line 351 of file option.hh. References optionmm::option_base::_positions, optionmm::basic_option< Type, argument, multivalue, Trait >::_values, optionmm::option_base::bad_argument, optionmm::option_base::can_handle, optionmm::basic_option< Type, argument, multivalue, Trait >::many_values(), and optionmm::basic_option< Type, argument, multivalue, Trait >::value_type. |
Here is the call graph for this function:
|
Number of values of this option.
|
|
Get value.
Definition at line 340 of file option.hh. References optionmm::basic_option< Type, argument, multivalue, Trait >::_default, optionmm::basic_option< Type, argument, multivalue, Trait >::_values, and optionmm::basic_option< Type, argument, multivalue, Trait >::value_type. |
|
Get all values.
|
|
A list of the values.
Definition at line 279 of file option.hh. Referenced by optionmm::basic_option< Type, argument, multivalue, Trait >::push_arg(), and optionmm::basic_option< Type, argument, multivalue, Trait >::value(). |
|
Top of page | Last update Tue Jan 13 19:10:36 2004 |
Christian
Holm |
Created by DoxyGen 1.3.4 |