26 lines
690 B
C++
26 lines
690 B
C++
#define ZLIB_API
|
|
#define ZLIB_API_VAL
|
|
#define CORE_API
|
|
#define CORE_API_VAL
|
|
#include "archive/json.h"
|
|
#include "test_refl.h"
|
|
#include <os/file_handle.h>
|
|
using namespace api;
|
|
int main() {
|
|
table<uint32_t, string> t1, t2;
|
|
t1[1] = "hello";
|
|
t1[2] = "world";
|
|
auto text = JsonSerialize(t1);
|
|
FileHandle handle("test.txt");
|
|
handle.Open(FILE_OP::WRITE, false);
|
|
handle.Write(text);
|
|
auto res = JsonDeserialize<table<uint32_t, string>>(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;
|
|
} |