[ox] Make model system's setTypeInfo return an Error
This commit is contained in:
@@ -26,8 +26,13 @@ struct AlignmentCatcher: public ModelHandlerBase<AlignmentCatcher<PlatSpec>> {
|
||||
std::size_t biggestAlignment = 1;
|
||||
|
||||
template<typename T>
|
||||
constexpr void setTypeInfo(const char* = T::TypeName, int = T::TypeVersion,
|
||||
const Vector<String>& = {}, std::size_t = ModelFieldCount_v<T>) noexcept {}
|
||||
constexpr ox::Error setTypeInfo(
|
||||
const char* = T::TypeName,
|
||||
int = T::TypeVersion,
|
||||
const Vector<String>& = {},
|
||||
std::size_t = ModelFieldCount_v<T>) noexcept {
|
||||
return {};
|
||||
}
|
||||
|
||||
template<typename T, bool force>
|
||||
constexpr ox::Error field(CRStringView name, const UnionView<T, force> val) noexcept {
|
||||
|
8
deps/ox/src/ox/preloader/preloader.hpp
vendored
8
deps/ox/src/ox/preloader/preloader.hpp
vendored
@@ -78,11 +78,13 @@ class Preloader: public ModelHandlerBase<Preloader<PlatSpec>> {
|
||||
std::size_t sz = 0) noexcept;
|
||||
|
||||
template<typename T>
|
||||
constexpr void setTypeInfo(
|
||||
ox::CRStringView = T::TypeName,
|
||||
constexpr ox::Error setTypeInfo(
|
||||
const char* = T::TypeName,
|
||||
int = T::TypeVersion,
|
||||
const Vector<String>& = {},
|
||||
std::size_t = ModelFieldCount_v<T>) noexcept {}
|
||||
std::size_t = ModelFieldCount_v<T>) noexcept {
|
||||
return {};
|
||||
}
|
||||
|
||||
template<typename U, bool force>
|
||||
constexpr ox::Error field(CRStringView, const ox::UnionView<U, force> val) noexcept;
|
||||
|
9
deps/ox/src/ox/preloader/sizecatcher.hpp
vendored
9
deps/ox/src/ox/preloader/sizecatcher.hpp
vendored
@@ -32,8 +32,13 @@ class SizeCatcher: public ModelHandlerBase<SizeCatcher<PlatSpec>> {
|
||||
constexpr explicit SizeCatcher() noexcept = default;
|
||||
|
||||
template<typename T>
|
||||
constexpr void setTypeInfo(const char* = T::TypeName, int = T::TypeVersion,
|
||||
const Vector<String>& = {}, std::size_t = ModelFieldCount_v<T>) noexcept {}
|
||||
constexpr ox::Error setTypeInfo(
|
||||
const char* = T::TypeName,
|
||||
int = T::TypeVersion,
|
||||
const Vector<String>& = {},
|
||||
std::size_t = ModelFieldCount_v<T>) noexcept {
|
||||
return {};
|
||||
}
|
||||
|
||||
template<typename T, bool force>
|
||||
constexpr ox::Error field(const char*, UnionView<T, force>) noexcept;
|
||||
|
10
deps/ox/src/ox/preloader/unionsizecatcher.hpp
vendored
10
deps/ox/src/ox/preloader/unionsizecatcher.hpp
vendored
@@ -19,9 +19,15 @@ class UnionSizeCatcher: public ModelHandlerBase<UnionSizeCatcher<PlatSpec>> {
|
||||
std::size_t m_size = 0;
|
||||
|
||||
public:
|
||||
|
||||
template<typename T>
|
||||
constexpr void setTypeInfo(const char* = T::TypeName, int = T::TypeVersion,
|
||||
const Vector<String>& = {}, std::size_t = ModelFieldCount_v<T>) noexcept {}
|
||||
constexpr ox::Error setTypeInfo(
|
||||
const char* = T::TypeName,
|
||||
int = T::TypeVersion,
|
||||
const Vector<String>& = {},
|
||||
std::size_t = ModelFieldCount_v<T>) noexcept {
|
||||
return {};
|
||||
}
|
||||
|
||||
template<typename T, bool force>
|
||||
constexpr ox::Error field(CRStringView, const UnionView<T, force> val) noexcept {
|
||||
|
Reference in New Issue
Block a user