#pragma once #include #include "data.hpp" namespace saw { namespace encode { struct KelForst {}; } } #include "forst.tmpl.hpp" namespace saw { template <> class data { private: own buff_; public: data(own buff): buff_{std::move(buff)} {} }; template class data, encode::KelForst> { public: using Schema = schema::Primitive; private: our buff_; uint64_t displacement_; public: /** * Constructor for root elements */ data(our buff): buff_{std::move(buff)}, displacement_{0u} {} /** * Constructor for child elements */ data(our buff, uint64_t dsp): buff_{std::move(buff)}, displacement_{dsp} {} /** * Get values */ typename native_data_type::type get(){ return {}; } /** * Set values */ void set(typename native_data_type::type val){ (void) val; } }; template class data...>, encode::KelForst> { private: /** * Buffer holding the whole packet */ our buff_; /** * Displacement to show the starting point */ uint64_t displacement_; public: /** * Constructor for root elements */ data(our buff): buff_{std::move(buff)}, displacement_{0u} {} /** * Constructor for child elements */ data(our buff, uint64_t dsp): buff_{std::move(buff)}, displacement_{dsp} {} }; }