zengine/game/zworld/editor/zworld_editor.cpp
2024-10-25 22:57:25 +08:00

28 lines
686 B
C++

#define ZLIB_API
#define ZLIB_API_VAL
#define CORE_API
#define CORE_API_VAL
#include "archive/json.h"
#include "test_refl.h"
using namespace api;
using namespace std;
using namespace refl;
int main() {
using TestContainer = vector<Name>;
TestContainer t1, t2;
t1.push_back("hello");
t1.push_back("world");
//t1[1] = "hello";
//t1[2] = "world";
auto text = JsonSerialize(t1);
auto res = JsonDeserialize<TestContainer>(text);
if (res) {
t2 = *res;
}
auto cls = meta_info<api::Guid>();
Any args[3] = { Any{ (int)2 }, Any{ (float)3 }, Any{false} };
Any obj = cls->New(FramePool(), span<Any>{args});
auto ptr = &api::Guid::Multy;
std::cout << "hello world" << std::endl;
}