-
Notifications
You must be signed in to change notification settings - Fork 0
/
MaaApiDocument.cs
76 lines (65 loc) · 2.24 KB
/
MaaApiDocument.cs
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
public class MaaApiDocument : CodegenCS.Models.IJsonInputModel
{
public string Version { get; set; } = "v0.0.0";
public Dictionary<string, CompoundDoc> Compounds { get; set; } = [];
}
public class CompoundDoc
{
public string Location { get; set; } = string.Empty;
public Dictionary<string, TypedefDoc> Typedefs { get; set; } = [];
public Dictionary<string, DefineDoc> Defines { get; set; } = [];
public Dictionary<string, FunctionDoc> Functions { get; set; } = [];
public Dictionary<string, EnumDoc> Enums { get; set; } = [];
public Dictionary<string, StructDoc> Structs { get; set; } = [];
}
public class DescriptionDoc
{
public string Brief { get; set; } = string.Empty;
// Multiple line string
public List<string> Details { get; set; } = [];
public string? Deprecated { get; set; } = null;
}
public class TypedefDoc
{
public TypeDoc? Type { get; set; } = null;
public FunctionDoc? FunctionPointer { get; set; } = null;
}
public class TypeDoc
{
public DescriptionDoc Description { get; set; } = new();
public string Define { get; set; } = string.Empty;
}
public class DefineDoc
{
public DescriptionDoc Description { get; set; } = new();
public string Value { get; set; } = string.Empty;
}
public class FunctionDoc
{
public DescriptionDoc Description { get; set; } = new();
public Dictionary<string, string> Types { get; set; } = [];
public Dictionary<string, ParameterDoc> Parameters { get; set; } = [];
}
public class ParameterDoc
{
public string Type { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public System.Data.ParameterDirection Direction { get; set; } = 0;
public bool? IsPointerToArray { get; set; } = null;
}
public class EnumDoc
{
public DescriptionDoc Description { get; set; } = new();
public Dictionary<string, DefineDoc> EnumValues { get; set; } = [];
public bool IsFlags { get; set; } = false;
public string UnderlyingType { get; set; } = "int32_t";
}
public class StructDoc
{
public DescriptionDoc Description { get; set; } = new();
public Dictionary<string, VariableDoc> Variables { get; set; } = [];
}
public class VariableDoc
{
public FunctionDoc? FunctionPointer { get; set; } = null;
}