changa
3.5
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Friends
Macros
Groups
Pages
param.h
1
#ifndef PARAM_HINCLUDED
2
#define PARAM_HINCLUDED
3
4
/* Header for parameter parsing module.
5
* First implemented by Joachim Stadel in PKDGRAV.
6
*/
7
#ifdef __cplusplus
8
extern
"C"
{
9
#endif
10
13
enum
TypeParam {
14
paramBool = 0,
15
paramInt = 1,
16
paramDouble = 2,
17
paramString = 3
18
};
19
23
typedef
struct
prmNode
{
24
struct
prmNode
*pnNext;
25
char
*pszName;
26
int
iType;
27
int
bArg;
28
int
bFile;
29
int
iSize;
30
void
*pValue;
31
char
*pszArg;
32
char
*pszArgUsage;
33
}
PRM_NODE
;
34
38
typedef
struct
prmContext
{
39
PRM_NODE
*pnHead;
40
PRM_NODE
*pnTail;
41
void (*fcnLeader)(void);
42
void (*fcnTrailer)(void);
43
} *
PRM
;
44
45
#define PRM_LINE_SIZE 256
46
47
void
prmInitialize(
PRM
*,
void
(*)(
void
),
void
(*)(
void
));
48
void
prmFinish(
PRM
);
49
void
prmAddParam(
PRM
,
const
char
*,
int
,
void
*,
int
,
const
char
*,
const
char
*);
50
void
prmArgUsage(
PRM
prm);
51
void
prmLogParam(
PRM
prm,
const
char
*pszFile);
52
int
prmParseParam(
PRM
,
char
*);
53
int
prmArgProc(
PRM
,
int
,
char
**,
int
);
54
int
prmSpecified(
PRM
,
const
char
*);
55
int
prmArgSpecified(
PRM
,
const
char
*);
56
int
prmFileSpecified(
PRM
,
const
char
*);
57
#ifdef __cplusplus
58
}
59
#endif
60
61
#endif
62
63
64
65
66
67
68
prmContext
Object containing the parameter information.
Definition:
param.h:38
prmNode
Information about a parameter.
Definition:
param.h:23
Generated by
1.8.5