mirror of
https://github.com/mhx/dwarfs.git
synced 2025-08-04 02:06:22 -04:00
refactor(filesystem_v2): make filesystem implementation private
This commit is contained in:
parent
ae1358e978
commit
0e18c26e05
@ -1273,6 +1273,9 @@ class filesystem_common_ : public Base {
|
|||||||
void cache_all_blocks() const override { fs_.cache_all_blocks(); }
|
void cache_all_blocks() const override { fs_.cache_all_blocks(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
filesystem_<LoggerPolicy> const& fs() const { return fs_; }
|
||||||
|
|
||||||
|
private:
|
||||||
filesystem_<LoggerPolicy> fs_;
|
filesystem_<LoggerPolicy> fs_;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1286,31 +1289,30 @@ class filesystem_full_
|
|||||||
public:
|
public:
|
||||||
using filesystem_common_<LoggerPolicy,
|
using filesystem_common_<LoggerPolicy,
|
||||||
filesystem_v2::impl>::filesystem_common_;
|
filesystem_v2::impl>::filesystem_common_;
|
||||||
|
using filesystem_common_<LoggerPolicy, filesystem_v2::impl>::fs;
|
||||||
|
|
||||||
int check(filesystem_check_level level, size_t num_threads) const override {
|
int check(filesystem_check_level level, size_t num_threads) const override {
|
||||||
return this->fs_.check(level, num_threads);
|
return fs().check(level, num_threads);
|
||||||
}
|
}
|
||||||
void dump(std::ostream& os, fsinfo_options const& opts) const override {
|
void dump(std::ostream& os, fsinfo_options const& opts) const override {
|
||||||
this->fs_.dump(os, opts);
|
fs().dump(os, opts);
|
||||||
}
|
}
|
||||||
std::string dump(fsinfo_options const& opts) const override {
|
std::string dump(fsinfo_options const& opts) const override {
|
||||||
return this->fs_.dump(opts);
|
return fs().dump(opts);
|
||||||
}
|
}
|
||||||
nlohmann::json info_as_json(fsinfo_options const& opts) const override {
|
nlohmann::json info_as_json(fsinfo_options const& opts) const override {
|
||||||
return this->fs_.info_as_json(opts);
|
return fs().info_as_json(opts);
|
||||||
}
|
}
|
||||||
nlohmann::json metadata_as_json() const override {
|
nlohmann::json metadata_as_json() const override {
|
||||||
return this->fs_.metadata_as_json();
|
return fs().metadata_as_json();
|
||||||
}
|
}
|
||||||
std::string serialize_metadata_as_json(bool simple) const override {
|
std::string serialize_metadata_as_json(bool simple) const override {
|
||||||
return this->fs_.serialize_metadata_as_json(simple);
|
return fs().serialize_metadata_as_json(simple);
|
||||||
}
|
}
|
||||||
std::optional<std::span<uint8_t const>> header() const override {
|
std::optional<std::span<uint8_t const>> header() const override {
|
||||||
return this->fs_.header();
|
return fs().header();
|
||||||
}
|
|
||||||
history const& get_history() const override {
|
|
||||||
return this->fs_.get_history();
|
|
||||||
}
|
}
|
||||||
|
history const& get_history() const override { return fs().get_history(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
Loading…
x
Reference in New Issue
Block a user