-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathBNFlagConditionForSemanticClass.cs
More file actions
56 lines (48 loc) · 1.39 KB
/
Copy pathBNFlagConditionForSemanticClass.cs
File metadata and controls
56 lines (48 loc) · 1.39 KB
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
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
namespace BinaryNinja
{
[StructLayout(LayoutKind.Sequential)]
public unsafe struct BNFlagConditionForSemanticClass
{
/// <summary>
/// uint32_t semanticClass
/// </summary>
internal uint semanticClass;
/// <summary>
/// BNLowLevelILFlagCondition condition
/// </summary>
internal LowLevelILFlagCondition condition;
}
public sealed class FlagConditionForSemanticClass : INativeWrapper<BNFlagConditionForSemanticClass>
{
public uint SemanticClass { get; } = 0;
public LowLevelILFlagCondition Condition { get; } = LowLevelILFlagCondition.LLFC_E;
public FlagConditionForSemanticClass(
uint semanticClass,
LowLevelILFlagCondition condition)
{
this.SemanticClass = semanticClass;
this.Condition = condition;
}
public FlagConditionForSemanticClass(BNFlagConditionForSemanticClass native)
{
this.SemanticClass = native.semanticClass;
this.Condition = native.condition;
}
internal static FlagConditionForSemanticClass FromNative(BNFlagConditionForSemanticClass native)
{
return new FlagConditionForSemanticClass(native);
}
public BNFlagConditionForSemanticClass ToNative()
{
return new BNFlagConditionForSemanticClass()
{
semanticClass = this.SemanticClass ,
condition = this.Condition
};
}
}
}