mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 05:51:51 +00:00
Merge branch 'main' into blocks-metadata
This commit is contained in:
commit
28b6ec2a0e
73 changed files with 1866 additions and 1730 deletions
|
|
@ -7,14 +7,11 @@
|
|||
#include <vector>
|
||||
|
||||
#include "typedefs.hpp"
|
||||
#include "data/dv.hpp"
|
||||
#include "util/Buffer.hpp"
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
namespace dynamic {
|
||||
class Map;
|
||||
}
|
||||
|
||||
namespace files {
|
||||
/// @brief Read-only random access file
|
||||
class rafile {
|
||||
|
|
@ -47,7 +44,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
|
||||
|
|
@ -55,7 +52,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
|
||||
);
|
||||
|
||||
|
|
@ -67,8 +64,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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue