summaryrefslogtreecommitdiff
path: root/src/codec
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2023-06-22 14:45:39 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2023-06-22 14:45:39 +0200
commitfd35c046e8bcfa8cd8ee5566084016c56f57bb42 (patch)
tree25a6ab0d59ec3d64ed05cc8789ffe22036e47e4e /src/codec
parent056ab6893ca18c33c7fb01d24498f9149fba4e8a (diff)
c++,codec: Protocol forst cleanup
Diffstat (limited to 'src/codec')
-rw-r--r--src/codec/forst.h4
-rw-r--r--src/codec/proto_forst.h61
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>();
- }
-};
-}
-}