From 70a3abcb3aad4c5e74b4b9fa6ac76508ac157f55 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Fri, 5 Jan 2024 05:58:49 +0100 Subject: codec: Adding a basic csv decoder. Unfinished --- modules/codec/c++/schema.h | 48 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 8 deletions(-) (limited to 'modules/codec/c++/schema.h') diff --git a/modules/codec/c++/schema.h b/modules/codec/c++/schema.h index 69233fa..576f378 100644 --- a/modules/codec/c++/schema.h +++ b/modules/codec/c++/schema.h @@ -28,14 +28,6 @@ struct Union...> {}; template struct Array {}; -template struct is_array { - constexpr static bool value = false; -}; - -template struct is_array> { - constexpr static bool value = true; -}; - template struct FixedArray {}; template struct Tuple {}; @@ -55,6 +47,7 @@ class Wrapper {}; struct String {}; + struct SignedInteger {}; struct UnsignedInteger {}; struct FloatingPoint {}; @@ -106,4 +99,43 @@ struct Interface,Names>...> {}; // NOLINTEND } // namespace schema +template struct is_struct { + constexpr static bool value = false; +}; + +template struct is_struct...>> { + constexpr static bool value = true; +}; + +template struct is_string { + constexpr static bool value = false; +}; + +template <> struct is_string { + constexpr static bool value = true; +}; + +template struct is_tuple { + constexpr static bool value = false; +}; + +template struct is_tuple> { + constexpr static bool value = true; +}; + +template struct is_array { + constexpr static bool value = false; +}; + +template struct is_array> { + constexpr static bool value = true; +}; + +template struct is_primitive { + constexpr static bool value = false; +}; + +template struct is_primitive> { + constexpr static bool value = true; +}; } // namespace saw -- cgit v1.2.3