optionmm::option_trait< Type > Struct Template Reference

#include <optionmm/option.hh>

List of all members.


Detailed Description

template<typename Type>
struct optionmm::option_trait< Type >

Trait to help do conversions.

Definition at line 206 of file option.hh.

Public Types

typedef Type value_type
typedef std::vector< value_typelist_type
typedef list_type::reference reference

Static Public Member Functions

bool convert (const char *arg, value_type &val)
bool convert (reference val)


Member Typedef Documentation

template<typename Type>
typedef std::vector<value_type> optionmm::option_trait< Type >::list_type
 

Container used by the option.

Definition at line 211 of file option.hh.

template<typename Type>
typedef list_type::reference optionmm::option_trait< Type >::reference
 

Reference type used by the container.

Definition at line 213 of file option.hh.

Referenced by optionmm::option_trait< Type >::convert().

template<typename Type>
typedef Type optionmm::option_trait< Type >::value_type
 

Type of the trait.

Definition at line 209 of file option.hh.

Referenced by optionmm::option_trait< Type >::convert().


Member Function Documentation

template<typename Type>
bool optionmm::option_trait< Type >::convert reference  val  )  [inline, static]
 

Toggle a value.

Parameters:
val The value to toggle
Returns:
true on success

Definition at line 233 of file option.hh.

References optionmm::option_trait< Type >::reference, and optionmm::option_trait< Type >::value_type.

template<typename Type>
bool optionmm::option_trait< Type >::convert const char *  arg,
value_type val
[inline, static]
 

Convert a string to the value type.

Parameters:
arg The string to convert
val The resulting value
Returns:
true on success, false otherwise.

Definition at line 219 of file option.hh.

References optionmm::option_trait< Type >::value_type.


The documentation for this struct was generated from the following file:
Top of page Last update Tue Jan 13 19:10:36 2004
Christian Holm
Created by DoxyGen 1.3.4