15 #ifndef niftkCommandLineParser_h
16 #define niftkCommandLineParser_h
18 #include <NifTKConfigure.h>
30 #define HLP_BRIEF 0x0000
31 #define HLP_VERBOSE 0x0001
76 #define OPT_TYPEMASK 0x00ff
86 #define OPT_SWITCH 0x0000
87 #define OPT_INT 0x0001
88 #define OPT_FLOAT 0x0002
89 #define OPT_STRING 0x0003
90 #define OPT_VARIANT 0x0004
91 #define OPT_MULT 0x0005
92 #define OPT_DOUBLE 0x0006
93 #define OPT_LONG 0x0007
94 #define OPT_INTx2 0x0008
95 #define OPT_INTx3 0x0009
96 #define OPT_INTx4 0x000a
97 #define OPT_FLOATx2 0x000b
98 #define OPT_FLOATx3 0x000c
99 #define OPT_FLOATx4 0x000d
100 #define OPT_DOUBLEx2 0x000e
101 #define OPT_DOUBLEx3 0x000f
102 #define OPT_DOUBLEx4 0x0010
103 #define OPT_DONE (~0)
113 #define OPT_CHARBCK 0x0800
114 #define OPT_UNIQUE 0x1000
115 #define OPT_LONELY 0x2000
116 #define OPT_REQ 0x4000
117 #define OPT_NIN 0x8000
118 #define OPT_MORETYPE 0x0011
123 #define OPT_MORE (OPT_MORETYPE | OPT_LONELY)
191 int GetArgument(
int,
void *);
194 int GetArgument(
int,
bool &
value);
196 int GetArgument(
int,
unsigned int &
value);
198 int GetArgument(
int,
int &
value);
200 int GetArgument(
int,
int *&
value);
202 int GetArgument(
int,
float &
value);
204 int GetArgument(
int,
float *&
value);
206 int GetArgument(
int,
double &
value);
208 int GetArgument(
int,
double *&
value);
210 int GetArgument(
int,
char *&
value);
214 int GetArgument(
int,
long int &
value);
227 struct ml *m_OptionList;
236 struct ml *ParseArguments(
int argc,
char *argv[],
240 void FreeArguments(
struct ml *mlist);
244 void ReadParameter(
char *argv[],
int arg,
int type,
struct ml *
ml);
249 int incarg(
int,
int);
250 void chknotopt(
char *argv[],
int arg);
251 int *get_intx2(
char *str);
252 int *get_intx3(
char *str);
253 int *get_intx4(
char *str);
254 float *get_floatx2(
char *str);
255 float *get_floatx3(
char *str);
256 float *get_floatx4(
char *str);
257 double *get_doublex2(
char *str);
258 double *get_doublex3(
char *str);
259 double *get_doublex4(
char *str);
260 void errmsg(
const char *
s, ...);
262 void dumpmlist(
void);
263 void dumpmlptr(
struct ml *mlptr);
GLuint GLuint GLsizei GLenum type
Definition: glew.h:1237
const char * helpmsg
The help messages.
Definition: niftkCommandLineParser.h:71
struct CommandLineArgumentDescription * opt
Definition: niftkCommandLineParser.h:145
int type
Type of option.
Definition: niftkCommandLineParser.h:68
int * mult
Definition: niftkCommandLineParser.h:137
int num
Definition: niftkCommandLineParser.h:146
GLint GLenum GLsizei GLint GLsizei const GLvoid * data
Definition: glew.h:1363
struct ml * next
Definition: niftkCommandLineParser.h:144
Definition: niftkCommandLineParser.h:67
Definition: niftkCommandLineParser.h:133
GLsizei const GLfloat * value
Definition: glew.h:1833
Definition: niftkCommandLineParser.h:143
const char * key
option key, eg. "a" will give "-a".
Definition: niftkCommandLineParser.h:69
int * pint
Definition: niftkCommandLineParser.h:138
long along
Definition: niftkCommandLineParser.h:134
Parser for extracting program arguments from the command line.
Definition: niftkCommandLineParser.h:169
double afloat
Definition: niftkCommandLineParser.h:135
void PrintUsage(void)
Printing member function for CommandLineParser.
Definition: niftkCommandLineParser.h:186
const char * parm
The parameters the option takes.
Definition: niftkCommandLineParser.h:70
double * pdouble
Definition: niftkCommandLineParser.h:140
#define HLP_VERBOSE
Definition: niftkCommandLineParser.h:31
float * pfloat
Definition: niftkCommandLineParser.h:139
GLdouble s
Definition: glew.h:1374
Definition: niftkExceptionObject.h:21
GLsizei const GLcharARB ** string
Definition: glew.h:5194
GLsizei GLsizei GLchar * source
Definition: glew.h:1816
char * astr
Definition: niftkCommandLineParser.h:136
struct niftk::CommandLineArgumentDescription clArgList[]
Definition: niftk2DImagesTo3DVolume.cxx:24