#pragma once #include #include #include "file.h" #include "hash.h" // eine liste an gleichen Dateien, die gemerged werden sollen class MergeFile { public: MergeFile(std::shared_ptr file, Hash&& h); const Hash& getHash() const; // try to add a file, returns true on success bool addFile(std::shared_ptr f, const Hash& h); std::vector>& getFiles(); const std::vector>& getFiles() const; // make sure the main file, which should be the base for the other files is stored at the begin of the vector void updateMainFile(); private: std::vector> files; Hash hash; };