diff -r 8d73bff730a7 -r eb1ecb37c6b7 src/AttributeFinder.h --- a/src/AttributeFinder.h Wed Jan 16 18:16:07 2019 +0100 +++ b/src/AttributeFinder.h Wed Jan 16 18:19:50 2019 +0100 @@ -34,6 +34,9 @@ using namespace relpipe::writer; class AttributeFinder { +protected: + fs::path currentFile; + string currentFileRaw; public: /** @@ -47,14 +50,21 @@ /** * Writing of the record for current file is starting. * Following writeField() calls are related to this file. - * @param file + * @param file path to the file + * @param fileRaw raw file name as it was on the input */ - virtual void startFile(const fs::path& file) = 0; + virtual void startFile(const fs::path& file, const string& fileRaw) { + currentFile = file; + currentFileRaw = fileRaw; + } /** * Writing of the record for current file is finished. All resources linked to this file should be released. */ - virtual void endFile() = 0; + virtual void endFile() { + currentFile.clear(); + currentFileRaw.clear(); + } /** * Writes field attribute(s). The attribute count must match with count of AttributeMetadata returned in toMetadata().