forked from focus-creative-games/il2cpp_plus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFieldLayout.h
More file actions
34 lines (30 loc) · 855 Bytes
/
FieldLayout.h
File metadata and controls
34 lines (30 loc) · 855 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
#pragma once
#include <stdint.h>
#include <vector>
#include "metadata/Il2CppTypeVector.h"
namespace il2cpp
{
namespace metadata
{
struct SizeAndAlignment
{
size_t size;
uint8_t alignment;
uint8_t naturalAlignment;
};
class FieldLayout
{
public:
struct FieldLayoutData
{
std::vector<size_t> FieldOffsets;
size_t classSize;
size_t actualClassSize;
uint8_t minimumAlignment;
uint8_t naturalAlignment;
};
static void LayoutFields(size_t parentSize, size_t actualParentSize, size_t parentAlignment, uint8_t packing, const Il2CppTypeVector& fieldTypes, FieldLayoutData& data);
static SizeAndAlignment GetTypeSizeAndAlignment(const Il2CppType* type);
};
} /* namespace metadata */
} /* namespace il2cpp */