Grindstone Game Engine
v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
TypeDescriptorStruct.hpp
1
#pragma once
2
3
#include <vector>
4
#include "TypeDescriptor.hpp"
5
#include "Metadata.hpp"
6
#include "PrintReflectionData.hpp"
7
8
namespace
Grindstone::Reflection {
9
struct
TypeDescriptor_Struct
:
TypeDescriptor
{
10
struct
Member
{
11
std::string variableName;
12
std::string displayName;
13
std::string storedName;
14
size_t
offset;
15
16
Metadata metadata;
17
18
TypeDescriptor
* type;
19
20
void (*onChangeCallback)(
void
*owner);
21
};
22
23
struct
Category
{
24
std::string name;
25
std::vector<Member> members;
26
std::vector<Category> categories;
27
};
28
29
Category
category;
30
31
TypeDescriptor_Struct
() =
default
;
32
33
TypeDescriptor_Struct
(
34
void
(*init)(
TypeDescriptor_Struct
*)
35
) :
TypeDescriptor
{ nullptr, 0, ReflectionTypeData::Struct } {
36
init(
this
);
37
}
38
39
TypeDescriptor_Struct
(
40
const
char
* name,
41
size_t
size,
42
const
Category &init
43
) :
TypeDescriptor
{ nullptr, 0, ReflectionTypeData::Struct }, category{ init } {}
44
};
45
}
Grindstone::Reflection::TypeDescriptor_Struct::Category
Definition
TypeDescriptorStruct.hpp:23
Grindstone::Reflection::TypeDescriptor_Struct::Member
Definition
TypeDescriptorStruct.hpp:10
Grindstone::Reflection::TypeDescriptor_Struct
Definition
TypeDescriptorStruct.hpp:9
Grindstone::Reflection::TypeDescriptor
Definition
TypeDescriptor.hpp:6
sources
code
EngineCore
Reflection
TypeDescriptorStruct.hpp
Generated by
1.12.0