Command line option with argument. More...
Public Member Functions | |
Option (T *const var, bool *const flag) | |
Constructor. | |
virtual | ~Option () |
Virtual destructor. | |
virtual void | Evaluate (const size_t argc, const char *argv[], size_t &index) |
Evaluate and set associated option. | |
virtual mxml_node_t * | MakeXML (mxml_node_t *const parent) const |
Virtual function that returns an XML tree describing this option. | |
virtual std::string | GetParamTypeString () const |
Return a textual description of the parameter associated with this option. | |
virtual std::ostringstream & | PrintHelp (std::ostringstream &fmt) const |
Format additional help information (e.g., default values). | |
virtual void | PrintWiki () const |
Format additional help information (e.g., default values). | |
Protected Attributes | |
T * | Var |
Pointer to associated variable. | |
bool * | Flag |
Pointer to (optional) flag that will be set when this option occurs. |
Command line option with argument.
Definition at line 426 of file cmtkCommandLine.h.
cmtk::CommandLine::Option< T >::Option | ( | T *const | var, |
bool *const | flag | ||
) | [inline] |
Constructor.
Definition at line 432 of file cmtkCommandLine.h.
virtual cmtk::CommandLine::Option< T >::~Option | ( | ) | [inline, virtual] |
Virtual destructor.
Definition at line 435 of file cmtkCommandLine.h.
void cmtk::CommandLine::Option< T >::Evaluate | ( | const size_t | argc, |
const char * | argv[], | ||
size_t & | index | ||
) | [virtual] |
Evaluate and set associated option.
Implements cmtk::CommandLine::Item.
Reimplemented in cmtk::CommandLine::NonOptionParameter, and cmtk::CommandLine::NonOptionParameterVector.
Definition at line 36 of file cmtkCommandLineOption.txx.
std::string cmtk::CommandLine::Option< T >::GetParamTypeString | ( | ) | const [virtual] |
Return a textual description of the parameter associated with this option.
Reimplemented from cmtk::CommandLine::Item.
Reimplemented in cmtk::CommandLine::NonOptionParameter, and cmtk::CommandLine::NonOptionParameterVector.
Definition at line 77 of file cmtkCommandLineOption.txx.
mxml_node_t * cmtk::CommandLine::Option< T >::MakeXML | ( | mxml_node_t *const | parent ) | const [virtual] |
Virtual function that returns an XML tree describing this option.
Implements cmtk::CommandLine::Item.
Definition at line 54 of file cmtkCommandLineOption.txx.
References NULL.
std::ostringstream & cmtk::CommandLine::Option< T >::PrintHelp | ( | std::ostringstream & | fmt ) | const [virtual] |
Format additional help information (e.g., default values).
fmt | Stream that the additional help information is formatted into |
Reimplemented from cmtk::CommandLine::Item.
Reimplemented in cmtk::CommandLine::NonOptionParameter, and cmtk::CommandLine::NonOptionParameterVector.
Definition at line 85 of file cmtkCommandLineOption.txx.
References cmtk::CommandLineTypeTraitsBase< T >::ValueToString().
void cmtk::CommandLine::Option< T >::PrintWiki | ( | ) | const [virtual] |
Format additional help information (e.g., default values).
Reimplemented from cmtk::CommandLine::Item.
Reimplemented in cmtk::CommandLine::NonOptionParameter, and cmtk::CommandLine::NonOptionParameterVector.
Definition at line 97 of file cmtkCommandLineOption.txx.
References cmtk::StdOut, and cmtk::CommandLineTypeTraitsBase< T >::ValueToString().
bool* cmtk::CommandLine::Option< T >::Flag [protected] |
Pointer to (optional) flag that will be set when this option occurs.
Definition at line 458 of file cmtkCommandLine.h.
T* cmtk::CommandLine::Option< T >::Var [protected] |
Pointer to associated variable.
Definition at line 455 of file cmtkCommandLine.h.