[ox] Add StringView, Writer system, Preloader system
This commit is contained in:
4
deps/ox/src/ox/oc/read.hpp
vendored
4
deps/ox/src/ox/oc/read.hpp
vendored
@@ -100,11 +100,11 @@ class OrganicClawReader {
|
||||
}
|
||||
|
||||
template<typename T = void>
|
||||
constexpr void setTypeInfo(const char*, int) noexcept {
|
||||
constexpr void setTypeInfo(const char*, int, const Vector<String>& = {}) noexcept {
|
||||
}
|
||||
|
||||
template<typename T = void>
|
||||
constexpr void setTypeInfo(const char*, int, int) noexcept {
|
||||
constexpr void setTypeInfo(const char*, int, const Vector<String>& = {}, int = {}) noexcept {
|
||||
}
|
||||
|
||||
/**
|
||||
|
2
deps/ox/src/ox/oc/test/tests.cpp
vendored
2
deps/ox/src/ox/oc/test/tests.cpp
vendored
@@ -94,7 +94,7 @@ constexpr ox::Error model(auto *io, ox::CommonPtrWith<TestStruct> auto *obj) noe
|
||||
oxReturnError(io->field("Int7", &obj->Int7));
|
||||
oxReturnError(io->field("Int8", &obj->Int8));
|
||||
oxReturnError(io->field("unionIdx", &obj->unionIdx));
|
||||
if (ox_strcmp(io->opType(), ox::OpType::Reflect) == 0) {
|
||||
if (io->opType() == ox::OpType::Reflect) {
|
||||
oxReturnError(io->field("Union", ox::UnionView{&obj->Union, 0}));
|
||||
} else {
|
||||
oxReturnError(io->field("Union", ox::UnionView{&obj->Union, obj->unionIdx}));
|
||||
|
3
deps/ox/src/ox/oc/write.hpp
vendored
3
deps/ox/src/ox/oc/write.hpp
vendored
@@ -176,7 +176,8 @@ class OrganicClawWriter {
|
||||
Error field(const char*, T *val) noexcept;
|
||||
|
||||
template<typename T = void>
|
||||
constexpr void setTypeInfo(const char* = T::TypeName, int = T::TypeVersion, int = ModelFieldCount_v<T>) noexcept {
|
||||
constexpr void setTypeInfo(const char* = T::TypeName, int = T::TypeVersion,
|
||||
const Vector<String>& = {}, int = ModelFieldCount_v<T>) noexcept {
|
||||
}
|
||||
|
||||
static constexpr auto opType() noexcept {
|
||||
|
Reference in New Issue
Block a user