From ae8711ba90ac2a47ea7654dc873927fb2783ff91 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Fri, 18 Apr 2025 16:25:30 +0200 Subject: wip rendering in terminal and extracting example code to files --- c++/descriptor.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'c++/descriptor.hpp') 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::type inv_cs2 = 3.0; static constexpr typename saw::native_data_type::type cs2 = 1./3.; }; + +template +class cell_schema_builder { +private: + saw::schema_factory factory_struct_; +public: + cell_schema_builder() = default; + + cell_schema_builder(saw::schema_factory inp): + factory_struct_{inp} + {} + + template + constexpr auto require() const noexcept { + return {factory_struct_.add_maybe()}; + } +}; + } } -- cgit v1.2.3