[ox] Add StringView, Writer system, Preloader system

This commit is contained in:
2022-11-30 01:45:11 -06:00
parent 98f35140fe
commit cbb496c59f
64 changed files with 2343 additions and 417 deletions

33
deps/ox/src/ox/preloader/preloader.cpp vendored Normal file
View File

@@ -0,0 +1,33 @@
/*
* Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#include <ox/std/error.hpp>
#include "platspecs.hpp"
#include "preloader.hpp"
namespace ox {
struct TestType {
static constexpr auto TypeName = "net.drinkingtea.nostalgia.preloader.TestType";
static constexpr auto TypeVersion = 1;
uint32_t field1 = 0;
uint32_t *field2 = nullptr;
ox::Vector<uint32_t> field3;
};
oxModelBegin(TestType)
oxModelField(field1)
oxModelField(field2)
oxModelField(field3)
oxModelEnd()
constexpr ox::Error asdf() noexcept {
const TestType t;
return preload<NativePlatSpec>(&t).error;
}
//static_assert(asdf().errCode == 0);
}