TCLAP::VALUE_ARG_HELPER::ValueExtractor< T > Class Template Reference

#include <ValueArg.h>

List of all members.

Private Member Functions

int extractValue (const std::string &val)
int extractValue (const std::string &val)
 ValueExtractor (T &value)
 ValueExtractor (T &value)

Private Attributes

T & _value

Friends

class ValueArg< T >

Detailed Description

template<class T>
class TCLAP::VALUE_ARG_HELPER::ValueExtractor< T >

This class is used to extract a value from an argument. It is used because we need a special implementation to deal with std::string and making a specialiced function puts it in the T segment, thus generating link errors. Having a specialiced class makes the symbols weak. This is not pretty but I don't know how to make it work any other way.


Constructor & Destructor Documentation

template<class T>
TCLAP::VALUE_ARG_HELPER::ValueExtractor< T >::ValueExtractor ( T &  value  )  [inline, private]

Constructor.

Parameters:
value - Where the value extracted will be put.
template<class T>
TCLAP::VALUE_ARG_HELPER::ValueExtractor< T >::ValueExtractor ( T &  value  )  [inline, private]

Constructor.

Parameters:
value - Where the value extracted will be put.

Member Function Documentation

template<class T>
int TCLAP::VALUE_ARG_HELPER::ValueExtractor< T >::extractValue ( const std::string &  val  )  [inline, private]

Method that will attempt to parse the input stream for a value of type T.

Parameters:
val - Where the value parsed will be put.

References TCLAP::VALUE_ARG_HELPER::ValueExtractor< T >::_value, TCLAP::VALUE_ARG_HELPER::EXTRACT_FAILURE, and TCLAP::VALUE_ARG_HELPER::EXTRACT_TOO_MANY.

template<class T>
int TCLAP::VALUE_ARG_HELPER::ValueExtractor< T >::extractValue ( const std::string &  val  )  [inline, private]

Method that will attempt to parse the input stream for a value of type T.

Parameters:
val - Where the value parsed will be put.

References TCLAP::VALUE_ARG_HELPER::ValueExtractor< T >::_value, TCLAP::VALUE_ARG_HELPER::EXTRACT_FAILURE, and TCLAP::VALUE_ARG_HELPER::EXTRACT_TOO_MANY.

Referenced by TCLAP::ValueArg< T >::_extractValue().


Friends And Related Function Documentation

template<class T>
friend class ValueArg< T > [friend]

Member Data Documentation

template<class T>
T & TCLAP::VALUE_ARG_HELPER::ValueExtractor< T >::_value [private]

Reference to the value where the result of the extraction will be put.

Referenced by TCLAP::VALUE_ARG_HELPER::ValueExtractor< std::string >::extractValue(), and TCLAP::VALUE_ARG_HELPER::ValueExtractor< T >::extractValue().


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

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1