Main MRPT website > C++ reference
MRPT logo
Private Member Functions | Private Attributes | Friends
TCLAP::MULTI_ARG_HELPER::ValueExtractor Class Reference

Detailed Description

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.

#include <mrpt/otherlibs/tclap/MultiArg.h>

List of all members.

Private Member Functions

 ValueExtractor (std::vector< T > &values)
 Constructor.
int extractValue (const std::string &val)
 Method that will attempt to parse the input stream for values of type T.

Private Attributes

std::vector< T > & _values
 Reference to the vector of values where the result of the extraction will be put.

Friends

class MultiArg< T >

Constructor & Destructor Documentation

TCLAP::MULTI_ARG_HELPER::ValueExtractor::ValueExtractor ( std::vector< T > &  values) [inline, private]

Constructor.

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

Definition at line 80 of file MultiArg.h.


Member Function Documentation

int TCLAP::MULTI_ARG_HELPER::ValueExtractor::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.

Definition at line 87 of file MultiArg.h.

References TCLAP::MULTI_ARG_HELPER::EXTRACT_FAILURE, TCLAP::MULTI_ARG_HELPER::EXTRACT_TOO_MANY, and _values.

Referenced by TCLAP::MultiArg::_extractValue().


Friends And Related Function Documentation

friend class MultiArg< T > [friend]

Definition at line 66 of file MultiArg.h.


Member Data Documentation

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

Definition at line 74 of file MultiArg.h.

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




Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011