forked from focus-creative-games/il2cpp_plus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProperty.cpp
More file actions
47 lines (39 loc) · 1008 Bytes
/
Property.cpp
File metadata and controls
47 lines (39 loc) · 1008 Bytes
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
#include "il2cpp-config.h"
#include "vm/Property.h"
#include "il2cpp-class-internals.h"
namespace il2cpp
{
namespace vm
{
uint32_t Property::GetFlags(const PropertyInfo* prop)
{
return prop->attrs;
}
const MethodInfo* Property::GetGetMethod(const PropertyInfo* prop)
{
return prop->get;
}
const MethodInfo* Property::GetSetMethod(const PropertyInfo* prop)
{
return prop->set;
}
const char* Property::GetName(const PropertyInfo* prop)
{
return prop->name;
}
Il2CppClass* Property::GetParent(const PropertyInfo* prop)
{
return prop->parent;
}
uint32_t Property::GetToken(const PropertyInfo* prop)
{
return prop->token;
}
const Il2CppType* Property::GetType(const PropertyInfo* prop)
{
if (prop->get)
return prop->get->return_type;
return prop->set->parameters[prop->set->parameters_count - 1];
}
} /* namespace vm */
} /* namespace il2cpp */