#include <CmdLineParser.h>
Public Member Functions | |
OptionsFLOAT (const Parser &parser) | |
Option< FLOAT > & | Add (const std::string &, const std::string &="", FLOAT=0.0, FLOAT=std::numeric_limits< FLOAT >::min(), FLOAT=std::numeric_limits< FLOAT >::max()) |
bool | Match (int &, char **, int) |
Friends | |
bool | OptionsINT::Match (int &, char **, int) |
CmdLine::OptionsFLOAT::OptionsFLOAT | ( | const Parser & | parser | ) | [inline] |
Option< FLOAT > & OptionsFLOAT::Add | ( | const std::string & | name, | |
const std::string & | alias = "" , |
|||
FLOAT | def = 0.0 , |
|||
FLOAT | min = std::numeric_limits<FLOAT>::min() , |
|||
FLOAT | max = std::numeric_limits<FLOAT>::max() | |||
) |
References CmdLine::Parser::m_flags, and CmdLine::OptionsType< T >::m_parser.
bool OptionsFLOAT::Match | ( | int & | i, | |
char ** | argv, | |||
int | argc | |||
) |
Try to identify a float option in command-line and then add it (together its float argument) into m_opts.
References CmdLine::OptionsType< T >::CheckDuplicate(), CmdLine::OptionsType< T >::Find(), CmdLine::Option< T >::IsSet(), CmdLine::Option< T >::m_found, CmdLine::Option< T >::m_max, CmdLine::Option< T >::m_min, CmdLine::Option< T >::m_value, CmdLine::NO_VALUE, CmdLine::OUT_OF_RANGE, and CmdLine::SILENT.
Referenced by CmdLine::Parser::Process().
bool OptionsINT::Match | ( | int & | , | |
char ** | , | |||
int | ||||
) | [friend] |
Class OptionsINT needs to access OptionsFLOAT::Find() in order to check if there exists a FLOAT option with the same name.