zengine/game/zworld/editor/zworld_editor.cpp

42 lines
782 B
C++
Raw Normal View History

2024-11-16 17:54:37 +08:00
#define ZLIB_API
#define ZLIB_API_VAL
#include "xmalloc_new_delete.h"
2024-11-09 17:59:48 +08:00
#include "archive/pch.h"
2024-10-25 09:45:49 +08:00
#include "test_refl.h"
using namespace api;
2024-10-25 22:57:25 +08:00
using namespace std;
using namespace refl;
2024-08-24 18:01:53 +08:00
int main() {
2024-11-09 17:59:48 +08:00
{
using T = Guid;
T a(1,1.0);
2024-11-16 17:54:37 +08:00
auto ppp = new int(120);
2024-11-14 11:55:32 +08:00
T* c = new T();
2024-11-09 17:59:48 +08:00
a.view = "hello";
auto text = TextSerialize(a);
auto b = TextDeserialize<T>(text);
if (b) {
auto c = b.value();
}
}
{
using T = Guid;
T a(1, 1.0);
a.view = "hello";
auto text = JsonSerialize(a);
auto b = JsonDeserialize<T>(text);
if (b) {
auto c = b.value();
}
}
{
using T = std::basic_string<char>;
T a = "123456";
auto text = TextSerialize(a);
auto b = TextDeserialize<T>(text);
if (b) {
auto c = b.value();
}
}
2024-08-24 18:01:53 +08:00
std::cout << "hello world" << std::endl;
}