-
Notifications
You must be signed in to change notification settings - Fork 0
/
Common.h
82 lines (71 loc) · 2.19 KB
/
Common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#pragma once
#include <stdio.h>
#include <stdbool.h>
#include <stdint.h>
#ifdef MLS_EXPORT_LIBRARY
#ifdef _WIN32
#ifdef MLS_LIB_COMPILE
#define MLS_PUBLIC_API __declspec(dllexport)
#else
#define MLS_PUBLIC_API __declspec(dllimport)
#endif
#else
#define MLS_PUBLIC_API
#endif
#else
#define MLS_PUBLIC_API
#endif
#ifdef __cplusplus
extern "C"
{
#endif
typedef struct UCLI_Parser_ArrayFlag UCLI_Parser_ArrayFlag;
typedef void(*UCLI_Parser_UnknownArgumentsCallback)(const char*, void*);
typedef void(*UCLI_Parser_ArrayFlagFunc)(UCLI_Parser_ArrayFlag*, char**, size_t);
typedef struct MLS_PUBLIC_API UCLI_Parser_BooleanFlag
{
const char* longType;
const char* shortType;
bool* flag;
} UCLI_Parser_BooleanFlag;
typedef struct MLS_PUBLIC_API UCLI_Parser_ArrayFlag
{
const char* longType;
const char* shortType;
void* additionalData;
UCLI_Parser_ArrayFlagFunc func;
} UCLI_Parser_ArrayFlag;
typedef struct MLS_PUBLIC_API UCLI_Parser_BooleanFlagWithFunc
{
const char* longType;
const char* shortType;
void* additionalData;
void(*func)(struct UCLI_Parser_BooleanFlagWithFunc*);
} UCLI_Parser_BooleanFlagWithFunc;
typedef struct MLS_PUBLIC_API UCLI_Parser_Pair
{
const char* longType;
// This is internal and should always be set to false
bool InternalbFound;
// Do not touch this, we will copy the data into here
const char* data;
} UCLI_Parser_Pair;
typedef struct MLS_PUBLIC_API UCLI_Parser_PairWithFunc
{
const char* longType;
void* additionalData;
void(*func)(struct UCLI_Parser_PairWithFunc*, const char*);
} UCLI_Parser_PairWithFunc;
typedef struct MLS_PUBLIC_API UCLI_Parser_Data
{
UCLI_Parser_ArrayFlag defaultArrayFlag;
UCLI_Parser_ArrayFlag* currentArrayFlag;
void* unknownArgumentsCallbackAdditionalData;
UCLI_Parser_UnknownArgumentsCallback unknownArgumentsCallback;
char delimiter;
bool bWindowsStyle;
bool bFlipBool;
} UCLI_Parser_Data;
#ifdef __cplusplus
}
#endif