diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2024-01-23 13:12:11 +0100 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2024-01-23 13:12:11 +0100 |
commit | 8dad985328e2183b224300aa992951131956fdb3 (patch) | |
tree | ceda3d9805335f36f571fb36585444ebdb421a02 /modules/codec/c++/schema_factory.h | |
parent | a9d2025030d0a7641f4b0701bd4aff7d2db5aeb4 (diff) |
core,codec-json,codec-minecraft,codec-netcdf,codec,io-tls,io,io_codec,window,window-opengl:
Renamed file endings and changed includes
Diffstat (limited to 'modules/codec/c++/schema_factory.h')
-rw-r--r-- | modules/codec/c++/schema_factory.h | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/modules/codec/c++/schema_factory.h b/modules/codec/c++/schema_factory.h deleted file mode 100644 index bb8588f..0000000 --- a/modules/codec/c++/schema_factory.h +++ /dev/null @@ -1,49 +0,0 @@ -#pragma once - -#include "schema.h" - -namespace saw { -template<typename T> -struct schema_factory { - using Schema = T; - static_assert(always_false<T>, "Not supported"); -}; - -template<typename... T, string_literal... Keys> -struct schema_factory<schema::Struct<schema::Member<T,Keys>...>> { - using Schema = schema::Struct<schema::Member<T,Keys>...>; - - template<typename TA, string_literal KA> - constexpr schema_factory<schema::Struct<schema::Member<T,Keys>...,schema::Member<TA,KA>>> add() const noexcept { - return {}; - } -}; - -template<typename... T, string_literal... Keys> -struct schema_factory<schema::Union<schema::Member<T,Keys>...>> { - using Schema = schema::Union<schema::Member<T,Keys>...>; - - template<typename TA, string_literal KA> - constexpr schema_factory<schema::Union<schema::Member<T,Keys>...,schema::Member<TA,KA>>> add() const noexcept { - return {}; - } -}; - -template<typename... T> -struct schema_factory<schema::Tuple<T...>> { - using Schema = schema::Tuple<T...>; - - template<typename TA> - constexpr schema_factory<schema::Tuple<T...,TA>> add() const noexcept { - return {}; - } -}; - -/** - * This creates the base schema. For example an empty struct,tuple,union or anything else. - */ -template<typename T> -constexpr schema_factory<T> build_schema() noexcept { - return {}; -} -} |