Antares_Simulator
Antares_Simulator copied to clipboard
FileWriter class difficult to understand.
- It seems it handles results (I understand simulation results) but it also handles logs (when it's called from importlogs.cpp)
- Method addEntryFromFile : every time I cross this method, I wonder what it does. I must read the body of this function to understand, and I find it hard to read.
- the function's name is unclear to me,
- what the arguments represent is mysterious to me,
- I don't understand why we make a file system copy.
- Function prepareDirectoryHierarchy has name unclear to me : actually it concatenates path elements and then create the resulting path on disk. We should remove this function and keep 2 functions, one for concatenation, the other for creation on disk. Besides, it has an output argument used to store the result of this function. This result should be returned instead.
- This class is supposed to flush something but it does not : the flush function is defined but empty. It looks like a problem of conception.
Originally posted by @guilpier-code in https://github.com/AntaresSimulatorTeam/Antares_Simulator/pull/2066#discussion_r1603006724