any ideas how to cleanly fix it?
imo adding ifdefs to filehandler would be the dirty way...
i would suggest to add an interface like:
Code: Select all
class IFile {
Open()
Close()
Read()
Write()
Seek()
GetPos()
Eof()
}
The DemoRecorder has to be changed to:
DemoRecorder(IFile* demofile, ...)
This way the demotool then just would depend on one class (CFile).
Thoughts?