orx 1.16
Portable Game Engine
Loading...
Searching...
No Matches
orxParam.h
Go to the documentation of this file.
1/* Orx - Portable Game Engine
2 *
3 * Copyright (c) 2008- Orx-Project
4 *
5 * This software is provided 'as-is', without any express or implied
6 * warranty. In no event will the authors be held liable for any damages
7 * arising from the use of this software.
8 *
9 * Permission is granted to anyone to use this software for any purpose,
10 * including commercial applications, and to alter it and redistribute it
11 * freely, subject to the following restrictions:
12 *
13 * 1. The origin of this software must not be misrepresented; you must not
14 * claim that you wrote the original software. If you use this software
15 * in a product, an acknowledgment in the product documentation would be
16 * appreciated but is not required.
17 *
18 * 2. Altered source versions must be plainly marked as such, and must not be
19 * misrepresented as being the original software.
20 *
21 * 3. This notice may not be removed or altered from any source
22 * distribution.
23 */
24
32
41
42
43#ifndef _orxPARAM_H_
44#define _orxPARAM_H_
45
46
47#include "orxInclude.h"
48
49
50/* Macro definition */
51
52/* Flags definitions */
53#define orxPARAM_KU32_FLAG_NONE 0x00000000
54#define orxPARAM_KU32_FLAG_MULTIPLE_ALLOWED 0x00000001
55#define orxPARAM_KU32_FLAG_STOP_ON_ERROR 0x00000002
56
62typedef orxSTATUS (orxFASTCALL *orxPARAM_INIT_FUNCTION)(orxU32 _u32NbParam, const orxSTRING _azParams[]);
63
64/* Parameter's info */
65typedef struct __orxPARAM_t
66{
67 /* Flags associated to the parameters' parser */
68 orxU32 u32Flags;
69
70 /* Short parameter name (ex: "h" for help (will be -h)) */
71 const orxSTRING zShortName;
72
73 /* Long parameter name (ex: "help" for help (will be --help)) */
74 const orxSTRING zLongName;
75
76 /* Short description (ex: "shows params' list") */
77 const orxSTRING zShortDesc;
78
79 /* Long description (ex: "Display the list of parameters.
80 * -help <param> displays the <param> long description") */
81 const orxSTRING zLongDesc;
82
83 /* Function called when the parameter is detected in the command line */
85
86} orxPARAM;
87
88
91extern orxDLLAPI void orxFASTCALL orxParam_Setup();
92
96extern orxDLLAPI orxSTATUS orxFASTCALL orxParam_Init();
97
100extern orxDLLAPI void orxFASTCALL orxParam_Exit();
101
102
107extern orxDLLAPI orxSTATUS orxFASTCALL orxParam_Register(const orxPARAM *_pstParam);
108
113
119extern orxDLLAPI orxSTATUS orxFASTCALL orxParam_SetArgs(orxU32 _u32NbParams, orxSTRING _azParams[]);
120
121#endif /* _orxPARAM_H_ */
122
#define orxDLLAPI
Definition orxDecl.h:381
orxDLLAPI orxSTATUS orxFASTCALL orxParam_DisplayHelp()
orxDLLAPI orxSTATUS orxFASTCALL orxParam_Register(const orxPARAM *_pstParam)
orxDLLAPI orxSTATUS orxFASTCALL orxParam_Init()
orxDLLAPI orxSTATUS orxFASTCALL orxParam_SetArgs(orxU32 _u32NbParams, orxSTRING _azParams[])
orxSTATUS(orxFASTCALL * orxPARAM_INIT_FUNCTION)(orxU32 _u32NbParam, const orxSTRING _azParams[])
Definition orxParam.h:62
orxDLLAPI void orxFASTCALL orxParam_Exit()
orxDLLAPI void orxFASTCALL orxParam_Setup()
orxSTATUS
Definition orxType.h:270
orxU32 u32Flags
Definition orxParam.h:68
const orxSTRING zLongName
Definition orxParam.h:74
const orxSTRING zShortDesc
Definition orxParam.h:77
const orxSTRING zLongDesc
Definition orxParam.h:81
const orxSTRING zShortName
Definition orxParam.h:71
orxPARAM_INIT_FUNCTION pfnParser
Definition orxParam.h:84

Generated for orx by doxygen 1.8.11