NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Classes | Namespaces | Macros
niftkCommandLineParser.h File Reference
Include dependency graph for niftkCommandLineParser.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  niftk::CommandLineArgumentDescription
 
union  niftk::ad
 
struct  niftk::ml
 
class  niftk::CommandLineParser
 Parser for extracting program arguments from the command line. More...
 

Namespaces

 niftk
 

Macros

#define HLP_BRIEF   0x0000
 
#define HLP_VERBOSE   0x0001
 
#define OPT_TYPEMASK   0x00ff /* Mask type of opt. */
 
#define ML_END   (~0)
 
Option flags.

Flags indicating the type of each command line option.

#define OPT_SWITCH   0x0000
 Option is boolean switch. More...
 
#define OPT_INT   0x0001
 Option takes one integer. More...
 
#define OPT_FLOAT   0x0002
 Option takes one float. More...
 
#define OPT_STRING   0x0003
 Option takes one string. More...
 
#define OPT_VARIANT   0x0004
 Option type is variant. More...
 
#define OPT_MULT   0x0005
 Option takes chars stright after option. More...
 
#define OPT_DOUBLE   0x0006
 Simliar to OPT_FLOAT but returns double. More...
 
#define OPT_LONG   0x0007
 Simliar to OPT_INT but returns long. More...
 
#define OPT_INTx2   0x0008
 Option takes two ints '(,)'. More...
 
#define OPT_INTx3   0x0009
 Option takes three ints '(,,)'. More...
 
#define OPT_INTx4   0x000a
 Option takes four ints '(,,,<d)'. More...
 
#define OPT_FLOATx2   0x000b
 Option takes two float '(,)'. More...
 
#define OPT_FLOATx3   0x000c
 Option takes three floats '(,,)'. More...
 
#define OPT_FLOATx4   0x000d
 Option takes four floats '(,,,<d)'. More...
 
#define OPT_DOUBLEx2   0x000e
 Option takes two double '(,)'. More...
 
#define OPT_DOUBLEx3   0x000f
 Option takes three doubles '(,,)'. More...
 
#define OPT_DOUBLEx4   0x0010
 Option takes four doubles '(,,,<d)'. More...
 
#define OPT_DONE   (~0)
 No more options - must terminate array. More...
 
Option qualifier flags.

These flags can be used in conjuction with the above basic types. They should be bitwise OR-ed with the basic type.

#define OPT_CHARBCK   0x0800
 OPT_MULT return char not integer index. More...
 
#define OPT_UNIQUE   0x1000
 Force OPT_MULT to have one entry only. More...
 
#define OPT_LONELY   0x2000
 Parameter doesn't have key. More...
 
#define OPT_REQ   0x4000
 Option is always required. More...
 
#define OPT_NIN   0x8000
 Next option only if this option is. More...
 
#define OPT_MORETYPE   0x0011
 Use OPT_MORE described below. More...
 
#define OPT_MORE   (OPT_MORETYPE | OPT_LONELY)
 

Macro Definition Documentation

#define HLP_BRIEF   0x0000
#define HLP_VERBOSE   0x0001
#define ML_END   (~0)
#define OPT_CHARBCK   0x0800

OPT_MULT return char not integer index.

#define OPT_DONE   (~0)

No more options - must terminate array.

#define OPT_DOUBLE   0x0006

Simliar to OPT_FLOAT but returns double.

#define OPT_DOUBLEx2   0x000e

Option takes two double '(,)'.

#define OPT_DOUBLEx3   0x000f

Option takes three doubles '(,,)'.

#define OPT_DOUBLEx4   0x0010

Option takes four doubles '(,,,<d)'.

#define OPT_FLOAT   0x0002

Option takes one float.

#define OPT_FLOATx2   0x000b

Option takes two float '(,)'.

#define OPT_FLOATx3   0x000c

Option takes three floats '(,,)'.

#define OPT_FLOATx4   0x000d

Option takes four floats '(,,,<d)'.

#define OPT_INT   0x0001

Option takes one integer.

#define OPT_INTx2   0x0008

Option takes two ints '(,)'.

#define OPT_INTx3   0x0009

Option takes three ints '(,,)'.

#define OPT_INTx4   0x000a

Option takes four ints '(,,,<d)'.

#define OPT_LONELY   0x2000

Parameter doesn't have key.

#define OPT_LONG   0x0007

Simliar to OPT_INT but returns long.

#define OPT_MORE   (OPT_MORETYPE | OPT_LONELY)

This can be used as an option type too. Extra arguments can be on command line, returns index of where 'more' args start.

#define OPT_MORETYPE   0x0011

Use OPT_MORE described below.

#define OPT_MULT   0x0005

Option takes chars stright after option.

#define OPT_NIN   0x8000

Next option only if this option is.

#define OPT_REQ   0x4000

Option is always required.

#define OPT_STRING   0x0003

Option takes one string.

#define OPT_SWITCH   0x0000

Option is boolean switch.

#define OPT_TYPEMASK   0x00ff /* Mask type of opt. */
#define OPT_UNIQUE   0x1000

Force OPT_MULT to have one entry only.

#define OPT_VARIANT   0x0004

Option type is variant.