diff options
Diffstat (limited to 'src/codec')
-rw-r--r-- | src/codec/forst.h | 4 | ||||
-rw-r--r-- | src/codec/proto_forst.h | 61 |
2 files changed, 2 insertions, 63 deletions
diff --git a/src/codec/forst.h b/src/codec/forst.h index fee5fa6..cadf78e 100644 --- a/src/codec/forst.h +++ b/src/codec/forst.h @@ -4,10 +4,10 @@ namespace saw { namespace encode { -struct Forst {}; +struct KelForst {}; } -class data<schema::String, encode::Forst> { +class data<schema::String, encode::KelForst> { }; } diff --git a/src/codec/proto_forst.h b/src/codec/proto_forst.h deleted file mode 100644 index 1f390fe..0000000 --- a/src/codec/proto_forst.h +++ /dev/null @@ -1,61 +0,0 @@ -#pragma once - -#include "data.h" - -#include <forstio/core/error.h> - -namespace saw { -namespace encode { -struct ProtoForst {}; -} - -template<typename Schema> -class data<Schema, encode::ProtoForst> { -private: - own<buffer> buffer_; -public: - data(own<buffer>&& buffer__):buffer_{std::move(buffer__)}{} - - buffer& get_buffer(){ - return *buffer_; - } - - const buffer& get_buffer() const { - return *buffer_; - } -}; -namespace impl { -template<typename T, size_t N> -class codec<schema::Primitive<T,N>, encode::ProtoForst> { - - - static error encode(typename const data<schema::Primitive<T,N>, encode::Native>& native){ - - return no_error(); - } - - static uint64_t size(const data<schema::Primitive<T,N>, encode::Native>& d) { - return static_cast<uint64_t>(N); - } -}; -} -template<typename Schema> -class codec<Schema, encode::ProtoForst> { -public: - using meta_type = uint64_t; -private: -public: - error_or<data<Schema, encode::Native>> decode(const data<Schema, encode::ProtoForst>& encoded){ - - - return make_error<err::not_implemented>(); - } - - error_or<data<Schema, encode::ProtoForst>> encode(const data<Schema, encode::Native>& native){ - uint64_t length = 0; - - return make_error<err::not_implemented>(); - } -}; -} -} |