From ac8732867f57f59b8f4aec8d28b8e745046c9ac7 Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 20 Aug 2022 23:04:27 +0200 Subject: Added options to inspect archive content in dat utility Old PrintX methods were replaced by higher order functions ForEachX that are intended to give slighly more granual control and move the responsibility of what actually happens to the user without introducing a whole iterator. --- ArchiveEx/Archive.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ArchiveEx/Archive.h') diff --git a/ArchiveEx/Archive.h b/ArchiveEx/Archive.h index 7ba32e4..9526ff0 100644 --- a/ArchiveEx/Archive.h +++ b/ArchiveEx/Archive.h @@ -2,6 +2,7 @@ #include #include +#include #include @@ -32,8 +33,8 @@ public: void WriteMeta(bool create=false); void GenerateBlockMap(); std::size_t FindFreeSpot(std::size_t bytes) const; - void PrintNamesOfEntries() const; - void PrintBlocks() const; + void ForEachEntry(std::function func) const; + void ForEachBlock(std::function func) const; std::size_t DirectoryBlocks() const; private: const char* path; -- cgit v1.1