diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-04-18 16:25:30 +0200 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-04-18 16:25:30 +0200 |
commit | ae8711ba90ac2a47ea7654dc873927fb2783ff91 (patch) | |
tree | 04f15d1223fec76a02f1c5261256ce4bdd71eeab /c++/descriptor.hpp | |
parent | 80f35c35295eb07f2b9b61d1fb1bd01c37717caa (diff) |
wip rendering in terminal and extracting example code to files
Diffstat (limited to 'c++/descriptor.hpp')
-rw-r--r-- | c++/descriptor.hpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/c++/descriptor.hpp b/c++/descriptor.hpp index 014327c..aa8c943 100644 --- a/c++/descriptor.hpp +++ b/c++/descriptor.hpp @@ -152,6 +152,24 @@ public: static constexpr typename saw::native_data_type<T>::type inv_cs2 = 3.0; static constexpr typename saw::native_data_type<T>::type cs2 = 1./3.; }; + +template<typename Schema> +class cell_schema_builder { +private: + saw::schema_factory<Schema> factory_struct_; +public: + cell_schema_builder() = default; + + cell_schema_builder(saw::schema_factory<Schema> inp): + factory_struct_{inp} + {} + + template<typename TA, saw::string_literal KA> + constexpr auto require() const noexcept { + return {factory_struct_.add_maybe()}; + } +}; + } } |