diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2023-06-22 14:45:39 +0200 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2023-06-22 14:45:39 +0200 |
commit | fd35c046e8bcfa8cd8ee5566084016c56f57bb42 (patch) | |
tree | 25a6ab0d59ec3d64ed05cc8789ffe22036e47e4e /src/codec/proto_forst.h | |
parent | 056ab6893ca18c33c7fb01d24498f9149fba4e8a (diff) |
c++,codec: Protocol forst cleanup
Diffstat (limited to 'src/codec/proto_forst.h')
-rw-r--r-- | src/codec/proto_forst.h | 61 |
1 files changed, 0 insertions, 61 deletions
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>(); - } -}; -} -} |