2024-04-11 10:13:15 +08:00
|
|
|
#include "refl/vertex.h"
|
2024-04-14 22:45:08 +08:00
|
|
|
#include "refl/std/sarray.h"
|
|
|
|
|
#include <array>
|
2024-04-13 17:47:44 +08:00
|
|
|
int main() {
|
2024-04-15 19:53:39 +08:00
|
|
|
auto cls1 = &TypeInfo<void*>::StaticClass;
|
|
|
|
|
auto cls2 = &TypeInfo<const void*>::StaticClass;
|
|
|
|
|
using type1 = real_type_t<const void*>;
|
2024-04-14 22:45:08 +08:00
|
|
|
auto& cls = TypeInfo<vec3>::StaticClass;
|
2024-04-15 19:53:39 +08:00
|
|
|
auto field = cls.GetField(GetStaticFieldID<vec3>("norm"));
|
|
|
|
|
auto ov = cls.New();
|
|
|
|
|
|
2024-04-14 22:45:08 +08:00
|
|
|
int x = 10;
|
2024-04-15 19:53:39 +08:00
|
|
|
field->Call(&vec3::norm, ov.ptr, x, x);
|
|
|
|
|
field->Invoke({ov.ptr, x, x});
|
|
|
|
|
std::vector<ArgsView> ArgsList{{}, ov.ptr, x, x};
|
|
|
|
|
field->Invoke(ArgsList);
|
|
|
|
|
sarray<ArgsView> sa(ArgsList);
|
|
|
|
|
field->Invoke(sa);
|
|
|
|
|
UMethod_Auto<void, const void*, int, int*>::Call(field, { ov.ptr, x, x });
|
|
|
|
|
//fetchUMethod(&vec3::norm)->Call(field, ov.ptr, x, &x);
|
2024-04-13 17:47:44 +08:00
|
|
|
std::cout << "hello world\n";
|
|
|
|
|
return 0;
|
|
|
|
|
}
|