[ox] Add StringView, Writer system, Preloader system
This commit is contained in:
33
deps/ox/src/ox/preloader/preloader.cpp
vendored
Normal file
33
deps/ox/src/ox/preloader/preloader.cpp
vendored
Normal 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);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user