diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2024-05-06 11:42:39 +0200 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2024-05-06 11:42:39 +0200 |
commit | cfc6f8ed68f3718ffe033da2417af5190374ae0e (patch) | |
tree | 4648ef7870aadd99250db1c911423a4d6717b5f9 /modules/codec-json | |
parent | ba3207c9857621e4517eedf7213548b0350e03a2 (diff) |
Renamae rmt to storage since it's not related to remote, but locality
Diffstat (limited to 'modules/codec-json')
-rw-r--r-- | modules/codec-json/c++/json.tmpl.hpp | 6 | ||||
-rw-r--r-- | modules/codec-json/tests/codec-json.cpp | 32 |
2 files changed, 19 insertions, 19 deletions
diff --git a/modules/codec-json/c++/json.tmpl.hpp b/modules/codec-json/c++/json.tmpl.hpp index 0a9f53d..002d477 100644 --- a/modules/codec-json/c++/json.tmpl.hpp +++ b/modules/codec-json/c++/json.tmpl.hpp @@ -773,7 +773,7 @@ struct json_decode<schema::Array<T,D>, ToDecode> { using Schema = schema::Array<T,D>; template<size_t Level> - static error_or<void> decode_flat_level(buffer_view& buff, std::vector<data<T, encode::Native<rmt::Host>>>& to, std::array<std::size_t, D>& index, std::array<std::size_t, D>& dims, bool log_dim){ + static error_or<void> decode_flat_level(buffer_view& buff, std::vector<data<T, encode::Native<storage::Default>>>& to, std::array<std::size_t, D>& index, std::array<std::size_t, D>& dims, bool log_dim){ if constexpr (Level == D) { json_helper::skip_whitespace(buff); try { @@ -830,7 +830,7 @@ struct json_decode<schema::Array<T,D>, ToDecode> { } template<std::size_t Level> - static error_or<void> decode_unflat_level(std::vector<data<T,encode::Native<rmt::Host>>>& flat, data<schema::Array<T,D>, ToDecode>& to, std::array<std::size_t, D>& index, std::size_t& flat_index) { + static error_or<void> decode_unflat_level(std::vector<data<T,encode::Native<storage::Default>>>& flat, data<schema::Array<T,D>, ToDecode>& to, std::array<std::size_t, D>& index, std::size_t& flat_index) { if constexpr ( Level == D ){ auto& flat_data = flat.at(flat_index); to.at(index) = std::move(flat_data); @@ -852,7 +852,7 @@ struct json_decode<schema::Array<T,D>, ToDecode> { std::array<std::size_t, D> index; std::array<std::size_t, D> dims; std::fill(dims.begin(), dims.end(), 0); - std::vector<data<T,encode::Native<rmt::Host>>> flat_array; + std::vector<data<T,encode::Native<storage::Default>>> flat_array; auto eov = decode_flat_level<0>(buff, flat_array, index, dims, true); if(eov.is_error()){ return eov; diff --git a/modules/codec-json/tests/codec-json.cpp b/modules/codec-json/tests/codec-json.cpp index aca4e21..d6492d2 100644 --- a/modules/codec-json/tests/codec-json.cpp +++ b/modules/codec-json/tests/codec-json.cpp @@ -28,7 +28,7 @@ using TestStruct = Struct< SAW_TEST("UInt8 write"){ using namespace saw; - data<schema::UInt8, encode::Native<rmt::Host>> native_int; + data<schema::UInt8, encode::Native<storage::Default>> native_int; data<schema::UInt8, encode::Json> json_int; native_int.set(121); @@ -48,7 +48,7 @@ SAW_TEST("UInt8 write"){ SAW_TEST("UInt16 write"){ using namespace saw; - data<schema::UInt16, encode::Native<rmt::Host>> native_int; + data<schema::UInt16, encode::Native<storage::Default>> native_int; data<schema::UInt16, encode::Json> json_int; native_int.set(24413); @@ -68,7 +68,7 @@ SAW_TEST("UInt16 write"){ SAW_TEST("UInt32 write"){ using namespace saw; - data<schema::UInt32, encode::Native<rmt::Host>> native_int; + data<schema::UInt32, encode::Native<storage::Default>> native_int; data<schema::UInt32, encode::Json> json_int; native_int.set(44123); @@ -88,7 +88,7 @@ SAW_TEST("UInt32 write"){ SAW_TEST("UInt64 write"){ using namespace saw; - data<schema::UInt64, encode::Native<rmt::Host>> native_int; + data<schema::UInt64, encode::Native<storage::Default>> native_int; data<schema::UInt64, encode::Json> json_int; native_int.set(243345543); @@ -108,7 +108,7 @@ SAW_TEST("UInt64 write"){ SAW_TEST("Int8 write"){ using namespace saw; - data<schema::Int8, encode::Native<rmt::Host>> native_int; + data<schema::Int8, encode::Native<storage::Default>> native_int; data<schema::Int8, encode::Json> json_int; native_int.set(-121); @@ -128,7 +128,7 @@ SAW_TEST("Int8 write"){ SAW_TEST("Int16 write"){ using namespace saw; - data<schema::Int16, encode::Native<rmt::Host>> native_int; + data<schema::Int16, encode::Native<storage::Default>> native_int; data<schema::Int16, encode::Json> json_int; native_int.set(-24413); @@ -148,7 +148,7 @@ SAW_TEST("Int16 write"){ SAW_TEST("Int32 write"){ using namespace saw; - data<schema::Int32, encode::Native<rmt::Host>> native_int; + data<schema::Int32, encode::Native<storage::Default>> native_int; data<schema::Int32, encode::Json> json_int; native_int.set(44123); @@ -168,7 +168,7 @@ SAW_TEST("Int32 write"){ SAW_TEST("Int64 write"){ using namespace saw; - data<schema::Int64, encode::Native<rmt::Host>> native_int; + data<schema::Int64, encode::Native<storage::Default>> native_int; data<schema::Int64, encode::Json> json_int; native_int.set(243345543); @@ -188,7 +188,7 @@ SAW_TEST("Int64 write"){ SAW_TEST("String write and read"){ using namespace saw; - data<schema::String, encode::Native<rmt::Host>> nat_str; + data<schema::String, encode::Native<storage::Default>> nat_str; data<schema::String, encode::Json> json_str; nat_str.set("foo"); @@ -215,7 +215,7 @@ SAW_TEST("String write and read"){ SAW_TEST("Tuple read and write"){ using namespace saw; - data<schema::TestTuple, encode::Native<rmt::Host>> native_tup; + data<schema::TestTuple, encode::Native<storage::Default>> native_tup; data<schema::TestTuple, encode::Json> json_tup; auto& nat_zero = native_tup.template get<0>(); @@ -244,7 +244,7 @@ SAW_TEST("Tuple read and write"){ SAW_TEST("Array write"){ using namespace saw; - data<schema::TestArray, encode::Native<rmt::Host>> native{3u}; + data<schema::TestArray, encode::Native<storage::Default>> native{3u}; data<schema::TestArray, encode::Json> json; native.at(0).set("foo"); @@ -264,7 +264,7 @@ SAW_TEST("Array write"){ SAW_TEST("Three Dim Array write and read"){ using namespace saw; - data<schema::TestMultiArray, encode::Native<rmt::Host>> native{2,1,2}; + data<schema::TestMultiArray, encode::Native<storage::Default>> native{2,1,2}; data<schema::TestMultiArray, encode::Json> json; native.at(0,0,0).set("multi"); @@ -294,7 +294,7 @@ SAW_TEST("Three Dim Array write and read"){ SAW_TEST("Struct read and write"){ using namespace saw; - data<schema::TestStruct, encode::Native<rmt::Host>> native; + data<schema::TestStruct, encode::Native<storage::Default>> native; data<schema::TestStruct, encode::Json> json; native.get<"foo">().set(5); @@ -319,7 +319,7 @@ SAW_TEST("Struct read and write"){ SAW_TEST("Int8 read"){ using namespace saw; - data<schema::Int8, encode::Native<rmt::Host>> native_int; + data<schema::Int8, encode::Native<storage::Default>> native_int; data<schema::Int8, encode::Json> json_int{"43"}; codec<schema::Int8, encode::Json> json_codec; @@ -337,7 +337,7 @@ SAW_TEST("Int8 read"){ SAW_TEST("Int64 read"){ using namespace saw; - data<schema::Int64, encode::Native<rmt::Host>> native_int; + data<schema::Int64, encode::Native<storage::Default>> native_int; data<schema::Int64, encode::Json> json_int{"-453"}; codec<schema::Int64, encode::Json> json_codec; @@ -355,7 +355,7 @@ SAW_TEST("Int64 read"){ SAW_TEST("Tuple Pretty Encode and Decode"){ using namespace saw; - data<schema::TestTuple, encode::Native<rmt::Host>> native_tup; + data<schema::TestTuple, encode::Native<storage::Default>> native_tup; data<schema::TestTuple, encode::Json> json_tup; auto& nat_zero = native_tup.template get<0>(); |