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

#include <MultiArg.h>

List of all members.

Private Member Functions

int extractValue (const std::string &val)
 ValueExtractor (std::vector< T > &values)

Private Attributes

std::vector< T > & _values

Friends

class MultiArg< T >

Detailed Description

template<class T>
class TCLAP::MULTI_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::MULTI_ARG_HELPER::ValueExtractor< T >::ValueExtractor ( std::vector< T > &  values  )  [inline, private]

Constructor.

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

Member Function Documentation

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

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

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

References TCLAP::MULTI_ARG_HELPER::ValueExtractor< T >::_values, TCLAP::MULTI_ARG_HELPER::EXTRACT_FAILURE, and TCLAP::MULTI_ARG_HELPER::EXTRACT_TOO_MANY.

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


Friends And Related Function Documentation

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

Member Data Documentation

template<class T>
std::vector<T>& TCLAP::MULTI_ARG_HELPER::ValueExtractor< T >::_values [private]

Reference to the vector of values where the result of the extraction will be put.

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


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

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1