I am importing data from WhereIsIt report. There are “chunks” of data - several dozen of rows, where each row is file info entry. I have class Reader which knows report format and classes MemChunk and MemEntry which should not know but I must convert each row to MemEntry object: each row is divided by columns – for example column 0 + column 1 is filename (name+ext), size is parsed column 4, time – parsed column 5 etc.
Two solutions are bad:
1. Is created empty MemEntry object and Reader fill it all fields, it is not objective way.
2. Crated is MemEntry object having in constructor row of columns. Is bad, because MemEntry must knows reader’s structure – which column is which field.
How solve it?