updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit

This commit is contained in:
2024-08-05 19:38:13 -05:00
parent 760a1e4322
commit dca0752189
13 changed files with 910 additions and 337 deletions

View File

@ -74,21 +74,21 @@ public:
[[nodiscard]] auto truncate(std::size_t size) -> bool;
#if defined(PROJECT_ENABLE_JSON)
[[nodiscard]] auto write(const nlohmann::json &data,
std::size_t *total_written = nullptr) -> bool {
auto str_data = data.dump();
return write_(reinterpret_cast<const unsigned char *>(str_data.c_str()),
str_data.size(), 0U, total_written);
}
#endif // defined(PROJECT_ENABLE_JSON)
[[nodiscard]] auto write(const data_buffer &data, std::uint64_t offset,
std::size_t *total_written = nullptr) -> bool {
return write_(reinterpret_cast<const unsigned char *>(data.data()),
data.size(), offset, total_written);
}
#if defined(PROJECT_ENABLE_JSON)
[[nodiscard]] auto write_json(const nlohmann::json &data,
std::size_t *total_written = nullptr) -> bool {
auto str_data = data.dump();
return write_(reinterpret_cast<const unsigned char *>(str_data.c_str()),
str_data.size(), 0U, total_written);
}
#endif // defined(PROJECT_ENABLE_JSON)
[[nodiscard]] operator bool() const { return stream_.is_open(); }
private: