NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Attributes | List of all members
niftk::CommandLineArgumentDescription Struct Reference

Public Attributes

int type
 Type of option. More...
 
const char * key
 option key, eg. "a" will give "-a". More...
 
const char * parm
 The parameters the option takes. More...
 
const char * helpmsg
 The help messages. More...
 

Detailed Description

Each possible argument on command line must have one of these defined (in an array terminated with OPT_DONE).

The fields are as follows:

int type; The type of option eg. 'OPT_INT' for a single integer or 'OPT_FLOATx3' for a comman separated list of three floats. The various variable types can be OR'ed with (a) 'OPT_LONELY' to specfiy that no option key is associated with this command line option and/or (b) 'OPT_REQ' to indicate that this option is mandatory. 'Lonely' options should come at the end of the command line. 'OPT_MORE' can be used to specify that there are multiple 'lonely' command line options at the end of the command line. This is useful for specifying multiple filenames since the string option 'OPT_STRING' only allows one string to be input.

char *key; The option key string, eg. "option" will give "-option". If 'type' is OR'ed with 'OPT_LONELY' then the option key should be 'NULL'.

char *parm; The parameters the option takes. This string is for descriptive purposes only, for instance indicating to the user that the value required for this option should be a 'filename'.

char *helpmsg; A string describing the function of this option.

Member Data Documentation

const char* niftk::CommandLineArgumentDescription::helpmsg

The help messages.

const char* niftk::CommandLineArgumentDescription::key

option key, eg. "a" will give "-a".

const char* niftk::CommandLineArgumentDescription::parm

The parameters the option takes.

int niftk::CommandLineArgumentDescription::type

Type of option.


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