migrate from dynamic::Value to dv::value & total erase namespace 'dynamic'

This commit is contained in:
MihailRis
2024-09-18 23:31:18 +03:00
parent d3ba4b2e3e
commit 34d2e6d400
69 changed files with 1247 additions and 2248 deletions
+6 -9
View File
@@ -7,13 +7,10 @@
#include <vector>
#include "typedefs.hpp"
#include "data/dv.hpp"
namespace fs = std::filesystem;
namespace dynamic {
class Map;
}
namespace files {
/// @brief Read-only random access file
class rafile {
@@ -46,7 +43,7 @@ namespace files {
/// @param nice if true, human readable format will be used, otherwise
/// minimal
bool write_json(
const fs::path& filename, const dynamic::Map* obj, bool nice = true
const fs::path& filename, const dv::value& obj, bool nice = true
);
/// @brief Write dynamic data to the binary JSON file
@@ -54,7 +51,7 @@ namespace files {
/// @param compressed use gzip compression
bool write_binary_json(
const fs::path& filename,
const dynamic::Map* obj,
const dv::value& obj,
bool compressed = false
);
@@ -65,8 +62,8 @@ namespace files {
/// @brief Read JSON or BJSON file
/// @param file *.json or *.bjson file
std::shared_ptr<dynamic::Map> read_json(const fs::path& file);
std::shared_ptr<dynamic::Map> read_binary_json(const fs::path& file);
std::shared_ptr<dynamic::Map> read_toml(const fs::path& file);
dv::value read_json(const fs::path& file);
dv::value read_binary_json(const fs::path& file);
dv::value read_toml(const fs::path& file);
std::vector<std::string> read_list(const fs::path& file);
}