molecular
Public Member Functions | List of all members
molecular::util::CommandLineParser::Option< T > Class Template Reference

Command line option with parameter. More...

#include <CommandLineParser.h>

Inheritance diagram for molecular::util::CommandLineParser::Option< T >:
molecular::util::CommandLineParser::OptionBase molecular::util::CommandLineParser::Arg

Public Member Functions

 Option (CommandLineParser &parser, const std::string &longOpt, const std::string &help, T value=T())
 
void Parse (int &i, int argc, char **argv) override
 
const T * operator-> () const
 
const T & operator* () const
 
- Public Member Functions inherited from molecular::util::CommandLineParser::OptionBase
 OptionBase (CommandLineParser &parser, const std::string &longOpt, const std::string &help)
 
void PrintHelp () override
 
- Public Member Functions inherited from molecular::util::CommandLineParser::Arg
 Arg (const std::string &help)
 
virtual ~Arg ()=default
 
 operator bool ()
 

Additional Inherited Members

- Protected Attributes inherited from molecular::util::CommandLineParser::OptionBase
std::string mLongOpt
 
- Protected Attributes inherited from molecular::util::CommandLineParser::Arg
std::string mHelp
 
bool mPresent = false
 

Detailed Description

template<class T>
class molecular::util::CommandLineParser::Option< T >

Command line option with parameter.

Something like "--input-file foo.txt"

Constructor & Destructor Documentation

template<class T >
molecular::util::CommandLineParser::Option< T >::Option ( CommandLineParser parser,
const std::string &  longOpt,
const std::string &  help,
value = T() 
)
inline

Member Function Documentation

template<class T >
const T& molecular::util::CommandLineParser::Option< T >::operator* ( ) const
inline
template<class T >
const T* molecular::util::CommandLineParser::Option< T >::operator-> ( ) const
inline
template<class T >
void molecular::util::CommandLineParser::Option< T >::Parse ( int &  i,
int  argc,
char **  argv 
)
inlineoverridevirtual

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