libpsynth 0.2.1
Public Member Functions
psynth::base::option_generic< T, ConvFunc > Class Template Reference

Option that catches the argument and stores its value, converted to any desired type. More...

#include <arg_parser.hpp>

Inheritance diagram for psynth::base::option_generic< T, ConvFunc >:
Inheritance graph
[legend]
Collaboration diagram for psynth::base::option_generic< T, ConvFunc >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 option_generic (T *data)
 Constructor.
bool parse (const char *arg)
 Parses an argument.

Detailed Description

template<class T, class ConvFunc = detail::atoany_func <T>>
class psynth::base::option_generic< T, ConvFunc >

Option that catches the argument and stores its value, converted to any desired type.

Template argument T defines the desired type and ConvFunc must be the proper converter function, which defaults to atoany_func.


Constructor & Destructor Documentation

template<class T , class ConvFunc = detail::atoany_func <T>>
psynth::base::option_generic< T, ConvFunc >::option_generic ( T *  data) [inline]

Constructor.

Parameters:
dataPointer to where you want to store the argument value.

Member Function Documentation

template<class T , class ConvFunc = detail::atoany_func <T>>
bool psynth::base::option_generic< T, ConvFunc >::parse ( const char *  arg) [inline, virtual]

Parses an argument.

Parameters:
argThe argument.
Returns:
true.

Reimplemented from psynth::base::option.


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